chore(codegen): daily schema refresh (2026-06-03)#25
Open
timgl wants to merge 1 commit into
Open
Conversation
Regenerate src/generated/api.d.ts from the live PostHog OpenAPI spec (https://us.posthog.com/api/schema/?format=json), filtered by openapi-filter.yaml. Generated via `pnpm codegen` — not hand-edited. The diff is schema-field expansion on already-managed operations (insight/experiment query responses, experiment metric outlier-handling fields, query metadata like warnings/timings/modifiers). No paths added or removed; the filter allowlist is unchanged. typecheck + test pass. Generated-By: PostHog Code Task-Id: 297bb831-3b69-4471-978a-dea5576f818c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Daily OpenAPI schema refresh — 2026-06-03
Regenerated
src/generated/api.d.tsfrom the live PostHog OpenAPI spec viapnpm codegen(filtered byopenapi-filter.yaml). Generated output only — not hand-edited.Spec diff size
src/generated/api.d.ts: +1043 / −41 lines (≈ 725.6 KB → 790.6 KB, +63 KB)openapi-filter.yaml: unchangedThe diff is entirely schema-field expansion on already-managed operations:
query response metadata (
warnings,timings,modifiers,query_status,usedLazyPrecompute,usedPreAggregatedTables,hasMore/limit/offset), experiment ratio-metric fields (numerator_outlier_handling,denominator_outlier_handling,lower_bound_percentile,upper_bound_percentile,ignore_zeros), and assorted insight/trends fields (xAxisLabel,yAxisLabel,stackBreakdownValues,tags).New operationIds added to the filter
None.
The drift detector reports ~1,400 "new" operationIds, but this is the full PostHog API surface minus the curated 76-op allowlist — not a set of genuinely-new endpoints. Because the spec's path set is unchanged from the previous generation, nothing was newly added to any managed family this cycle. Every entry on the list falls into one of:
actions_bulk_update_tags_create,actions_references_list,cohorts_activity_retrieve,dashboards_collaborators_*,*_sharing_*. The clients manage a deliberate minimal CRUD surface.*_updatevariants where the client deliberately uses PATCH — e.g.cohorts_update,experiments_update,event_definitions_update,event_schemas_update,experiment_holdouts_update,experiment_saved_metrics_update,schema_property_groups_update. These have always existed in the spec and were excluded by design (the resource clients usepartial_update). Adding them would produce unused types with no consumer, not a refresh.surveys_*,annotations_*,tasks_*,alerts_*,accounts_*,error_tracking_*,warehouse_*,llm_analytics_*, the entireenvironments_*mirror, etc. are a product decision to manage, requiring a new resource module + pipeline + tests. Not appropriate to add autonomously in a daily refresh.query_*,*_activity_retrieve,live_debugger_*,sandbox_*,signals_*, etc. Not manageable IaC resources.Resources touched
None beyond the regenerated
src/generated/api.d.ts. Noclient.tsZod schemas orpipeline.tsprojections needed patching — typecheck and the full test suite pass against the new schema.Verification
pnpm typecheck✅pnpm test✅ — 290/290 real tests pass. One unrelated timing flake (src/pull/run.test.ts"writes files and calls tagOnServer", a 500 ms timeout under parallel load) passes deterministically in isolation (406 ms). Not schema-related.Removed operationIds (disappeared from live spec)
None. All 76 allowlisted operationIds still resolve in the regenerated schema. (Per policy, disappeared ops would be flagged here for a human to delete rather than auto-removed.)
Candidates a human may want to consider managing
Not actioned — flagged only for product judgment:
surveys_*,annotations_*,early_access_feature_*,web_experiments_*are the closest in spirit to the existing dashboards/insights/experiments surface.TaskRun:
297bb831-3b69-4471-978a-dea5576f818c