Skip to content

chore(codegen): daily schema refresh (2026-05-26)#18

Open
timgl wants to merge 1 commit into
mainfrom
posthog-code/schema-refresh-2026-05-26
Open

chore(codegen): daily schema refresh (2026-05-26)#18
timgl wants to merge 1 commit into
mainfrom
posthog-code/schema-refresh-2026-05-26

Conversation

@timgl
Copy link
Copy Markdown
Contributor

@timgl timgl commented May 26, 2026

Summary

Daily refresh of src/generated/api.d.ts from the live PostHog OpenAPI spec.

  • Diff size: 160 lines changed in src/generated/api.d.ts (+149 / -11).
  • No path/operationId changes in the filtered surface — every operationId listed in openapi-filter.yaml is still present, none added or removed.
  • Schema-only updates within already-managed operations: new property descriptions (aggregationAxisFormat, aggregationAxisPrefix/Postfix, decimalPlaces, query on ExperimentSavedMetric, test_account_filters, etc.) plus a handful of new optional fields on already-projected response shapes:
    • ParserMode enum + parserMode on HogQL query schemas
    • usedLazyPrecompute on cached query response shapes (CachedHogQLQueryResponse, CachedWebOverviewQueryResponse, CachedWebStatsTableQueryResponse)
    • useWebAnalyticsPrecompute on WebOverviewQuery and WebStatsTableQuery
    • cohortLabelStartIndex on RetentionFilter
    • resultCustomizations on TrendsFilter
    • TeamCustomerAnalyticsConfig expanded from Record<string, never> to a typed object
    • exclude_hidden / exclude_stale query params on event_definitions_list
    • prompt_name query param on experiments_list

New operationIds added to the filter

None. The codegen output's path set is byte-for-byte identical at the operations level — only schema details changed. No filter edits required.

Resources touched

None. Zod schemas in src/resources/**/client.ts and projections in pipeline.ts do not reference any of the new fields. Typecheck and full vitest suite pass unchanged (291 tests).

Unresolved drift

  • The TaskRun's drift detector lists ~900 operationIds that exist in the live spec but are not in openapi-filter.yaml. These are not new today — they are the long-standing out-of-scope surface (signals, llm_analytics, error_tracking, hog_flows, mcp_*, integrations, sandbox, tasks, vision_scanners, web_experiments, …). They are intentionally excluded from the managed client and remain so. Adding any of them would require either a new resource family (use add-resource skill) or a deliberate scope extension to an existing family — both out of scope for an automated refresh.
  • No operationIds disappeared from the live spec, so no deletion review needed.

Test plan

  • pnpm install --frozen-lockfile
  • pnpm codegen
  • pnpm typecheck
  • pnpm test — 291/291 passing

TaskRun: ec47f3e4-4ce8-4ab8-aa13-e58e4f97a9ac

Regenerate src/generated/api.d.ts from the live PostHog OpenAPI spec.
No path/operationId changes — only schema property/description updates
within already-managed operations.

Generated-By: PostHog Code
Task-Id: ec47f3e4-4ce8-4ab8-aa13-e58e4f97a9ac
@timgl timgl requested a review from pl May 26, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant