chore(codegen): daily schema refresh (2026-06-09)#31
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. - +1387 / -50 lines; field-level schema evolution only. - No managed paths added or removed (all 31 intact). - openapi-filter.yaml unchanged — no new operations adopted. - typecheck + test green. Generated-By: PostHog Code Task-Id: c093a88e-8bfe-4124-9f55-7721e70669ad
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-09
Regenerated
src/generated/api.d.tsviapnpm codegenfrom the live spec(
https://us.posthog.com/api/schema/?format=json), filtered byopenapi-filter.yaml.Spec diff size
src/generated/api.d.ts: +1387 / −50 (17,571 → 18,908 lines)openapi-filter.yaml: unchangedwarnings,resolved_compare_date_range,usedLazyPrecompute, outlier-handling params) plus transitively-referenced new component schemas:AccountsQuery,AccountsQueryResponse,AggregationPropertyType,CalendarHeatmapFilter,DataWarehouseSyncWarning,ExperimentMetricType,ExperimentMetricOutlierHandling,ExperimentParameters,IntegrationKind,ParserMode,SearchMatchTypeEnum,TeamCustomerAnalyticsConfig,TeamWorkflowsConfig.New operationIds added to the filter
None. The drift report's "new operationIds" list is
live_ops − filter_ops, i.e. the entire unmanaged API surface (~2,000 of 2,069 live operations). Under the allowlist model this is expected and not per-line actionable.I triaged the gaps that fall under the 13 managed resource families specifically. Every one is either an auxiliary sub-action (sharing, tiles, activity logs, bulk-tag, stats, materialization, code-export) or an unused full-PUT
_updateverb where the client deliberately uses PATCH (partial_update). None are part of the IaC create/update/delete lifecycle, none are referenced by the resource clients, and adding them would only bloat the generated types with unused surface.typecheck+testpass without them, so nothing was adopted. Notable family-prefixed gaps left out (for a human to consider adopting deliberately, if ever):experiments_update,cohorts_update,event_definitions_update,schema_property_groups_update,experiment_holdouts_update,experiment_saved_metrics_update,event_schemas_update/event_schemas_partial_update— full-PUT verbs; clients use PATCH.*_sharing_*,*_activity_retrieve,*_bulk_update_tags_create,dashboards_*_tile*,experiments_stats/timeseries/duplicate/reset/...,feature_flags_local_evaluation/status/...,environments_endpoints_run/materialization/...— auxiliary, not IaC CRUD.No brand-new resource family is introduced. Adopting one requires deliberate design (identity model, pipeline projections, tests, the add-resource safety invariant) and is out of scope for the automated daily refresh.
Resources touched
None. Only the generated types file changed; no
src/resources/<name>/client.tsZod schema orpipeline.tsprojection needed patching — the schema drift was additive and did not break any existing managed shape.Unresolved drift
src/pull/run.test.tshit a 500 ms timeout once under full-suite parallel load on the CI host; it passes cleanly in isolation and on a re-run (291/291). Not schema-related.Verification
pnpm install --frozen-lockfile✓pnpm codegen✓pnpm typecheck✓pnpm test✓ (291 passed)TaskRun: https://us.posthog.com/project/423401/tasks/c093a88e-8bfe-4124-9f55-7721e70669ad