chore(codegen): daily schema refresh (2026-05-30)#22
Open
timgl wants to merge 1 commit into
Open
Conversation
Regenerate src/generated/api.d.ts from the live PostHog OpenAPI spec. No changes to openapi-filter.yaml — the diff is entirely upstream schema drift that reaches our kept operations via type references (new query types, response unions, descriptions, an enum rename). Generated-By: PostHog Code Task-Id: 8a4eabac-c4e7-4305-b00f-a9b1cc638b2a
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.
Summary
Daily OpenAPI schema refresh from
https://us.posthog.com/api/schema/?format=json, filtered throughopenapi-filter.yaml.Spec diff:
src/generated/api.d.tschanged by 1007 lines (+983 / -24).New operationIds added to filter
None. The drift is structural (new component schemas pulled in transitively), not new operations against managed resource families. See triage below.
New operationIds triage
The live spec exposes ~1000 operationIds outside our filter. The vast majority are unrelated to the resources we manage (LLM analytics, error tracking, recordings, hog flows, batch exports, integrations, etc.) and are intentionally excluded.
The only candidates that touch a managed family are the missing PUT (
*_update) variants for resources where we already keep PATCH (*_partial_update):cohorts_update,event_definitions_update,experiments_update,experiment_holdouts_update,experiment_saved_metrics_update,environments_update,event_schemas_update,event_schemas_partial_update,schema_property_groups_updateThese are deliberately left out — the existing filter only includes PUT for
insights,dashboards,feature_flags,environments_endpoints, andactions. The asymmetry is intentional; the apply pipeline uses PATCH for the other families. No change.Resources touched
No resource client/pipeline edits were needed. Notable schema deltas:
AccountsQuery,AccountsQueryResponse,CalendarHeatmapFilter,DataWarehouseSyncWarning,ExperimentMetricOutlierHandling,ParserMode,Response7,Response27(referenced transitively from kept operations — no managed resource directly consumes them).AggregationPropertyType1→AggregationPropertyType. Used only inside generated query unions; no resource references it.FeatureFlagFiltersSchema.super_groupsremoved upstream. Our SDK (src/resources/feature-flag/sdk.ts) still exposessuper_groupsfor callers, and writes go throughas unknown as FeatureFlagBodyto bypass the documented upstream schema gap — same pattern noted in existing code comments. No change needed.ExperimentSavedMetricgainedqueryand inline field descriptions;Experimentresponse gainedwarnings. Read paths usez.object(...).loose()so additional fields pass through transparently.Unresolved drift
None.
pnpm typecheckpasses clean.Test status
pnpm testshows an intermittent timeout insrc/pull/run.test.ts > runPull orchestrator > writes files and calls tagOnServer on a non-dry run(500ms test timeout vs. ~300ms isolated runtime — flakes under parallel load). Pre-existing, reproduces onmain, unrelated to schema. The test passes when run in isolation.Task
TaskRun: 8a4eabac-c4e7-4305-b00f-a9b1cc638b2a
Test plan
run.test.tsflake hits)src/generated/api.d.tsreflects the filtered operations only