chore(codegen): daily schema refresh (2026-06-04)#26
Open
timgl wants to merge 1 commit into
Open
Conversation
Regenerate src/generated/api.d.ts from the live PostHog OpenAPI spec via `pnpm codegen`. openapi-filter.yaml is unchanged — drift is confined to shared component schemas referenced by the existing managed operations. Generated file only; no hand edits. Generated-By: PostHog Code Task-Id: 40726497-80c3-4a98-a535-ebc90cb498f9
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-04
Regenerated
src/generated/api.d.tsfrom the live PostHog OpenAPI spec(
https://us.posthog.com/api/schema/?format=json, filtered byopenapi-filter.yaml)via
pnpm codegen. Generated file only — no hand edits.Spec diff size
src/generated/api.d.ts: +1050 / −44 lines (17,571 → ~18,500).openapi-filter.yaml: unchanged.The drift is confined to shared component schemas referenced by the existing
managed operations' query/filter union types — new schemas
(
AccountsQuery/AccountsQueryResponse,CalendarHeatmapFilter,ExperimentMetricOutlierHandling,TeamCustomerAnalyticsConfig,AggregationPropertyType,DataWarehouseSyncWarning,ParserMode), a couple ofnew optional fields (
test_account_filters,tags, revenue-analytics eventfields), and renumbered anonymous
Response*aliases. No managed operation wasadded or removed.
New operationIds added to the filter
None.
The drift detector reports the entire un-allowlisted API surface as "new" (this is
the allowlist's complement, not genuinely newly-shipped endpoints). Triaged against
the 13 managed resource families:
endpoints (
*_activity_retrieve,*_bulk_update_tags_create,*_sharing_*,*_references_list,actions_references_list,cohorts_persons_retrieve,experiments_duplicate_create/_reset_create/_ship_variant_create, etc.). They are notpart of the declarative create/update/delete model, so none were added.
annotations_*,surveys_*,alerts_*,comments_*,roles_*,subscriptions_*,notebooks_*, …) — adopting one of these is a deliberateadd-resourcedecision (new client schema, pipeline projection, registration, tests, andthe tag-based safety invariant). That is out of scope for an unattended daily refresh and is
left for a human to prioritise rather than auto-adopting dozens of families.
Resources touched
None. Only the generated schema changed. No
src/resources/*/client.tsZod schemas orpipeline.tsprojections required patching.Verification
pnpm typecheck→ pass.pnpm test→ 290/291 pass. The one failure (src/pull/run.test.ts > writes files and calls tagOnServer on a non-dry run) is a pre-existing environmental flake: a 500 ms testtimeout that trips only under full-suite parallel transform load (collect ~35 s). It passes
in isolation (298 ms) and fails identically on the baseline
api.d.ts, so it is unrelatedto this refresh. Left untouched per "do not touch unrelated files."
Unresolved drift / removed operations
still present in the regenerated output.
TaskRun: https://us.posthog.com/project/423401/tasks/40726497-80c3-4a98-a535-ebc90cb498f9
🤖 Generated with Claude Code