chore(codegen): daily schema refresh (2026-06-14)#36
Open
timgl wants to merge 1 commit into
Open
Conversation
Regenerate src/generated/api.d.ts from the live PostHog OpenAPI schema via `pnpm codegen` (filtered by openapi-filter.yaml). Spec drift: +1640 / -127 lines, driven by transitively-referenced query node schemas and new fields on the managed insight/dashboard/query bodies. No allowlisted operationId disappeared upstream. Also patch the dashboards PATCH request-body type alias in src/resources/dashboard/client.ts: upstream renamed the component `PatchedDashboard` → `PatchedPatchedDashboardOpenApi`. One-line type reference change; no behavior change. No openapi-filter.yaml changes: all 100 new same-family operationIds are auxiliary product endpoints (activity, tags, sharing, tiles, stats, materialization, versions, run) or redundant full-PUT `_update` variants of resources already managed via PATCH — none extend the consumed CRUD surface of the IaC resources. Generated-By: PostHog Code Task-Id: 7bc7929c-c66d-4900-969e-a2e947b4b655
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.
Automated daily OpenAPI schema refresh for 2026-06-14.
Spec diff size
src/generated/api.d.ts: +1640 / −127 lines (regenerated viapnpm codegen; never hand-edited).AccountsQuery,CalendarHeatmapFilter) and gained new fields. No allowlisted operation changed shape in a way that breaks the Zod schemas.New operationIds added to the filter
None. All 100 new operationIds that belong to an already-managed resource family are either auxiliary product endpoints (activity logs, bulk tag updates, sharing, tile ops, stats, materialization, versions, run) or redundant full-PUT
_updatevariants of resources we already manage via PATCH. None extend the consumed CRUD surface of the IaC resources, so adding them would only bloat the generated types with no consumer. Breakdown by family:dashboards_insights_feature_flags_experiments_environments_endpoints_event_definitions__update, …)cohorts__update, …)actions_event_schemas__partial_update,_update)experiment_holdouts_/experiment_saved_metrics_/schema_property_groups__updatePUT)Brand-new resource families in the live spec (accounts, alerts, annotations, surveys, tasks, error_tracking, warehouse, …) are not adopted here — taking on a new managed family is a deliberate product decision that should go through the
add-resourceskill with its own client, pipeline, and tests, not an unattended daily refresh.Resources touched
src/resources/dashboard/client.ts— upstream renamed the dashboards PATCH request body componentPatchedDashboard→PatchedPatchedDashboardOpenApi. Updated the one type alias (PatchedDashboardBody) to point at the new name. The new schema carries the same fields the code uses (restriction_level,tiles,delete_insights); no behavior change. This was the only schema-drift breakage;pnpm typechecknow passes.No other
client.tsZod schemas orpipeline.tsprojections needed changes.Unresolved drift / flags for a human
src/pull/run.test.ts > writes files and calls tagOnServer on a non-dry runintermittently hits its 500 ms per-test timeout under the full parallel suite (thetsxcollect phase is ~35 s and starves the timer). It passes reliably in isolation (vitest run src/pull/run.test.ts). Untouched by this change; flagged for a separate timeout bump.pnpm lintandpnpm format:checkreport failures across ~68 files that also fail onmain(e.g. the ternary atdashboard/client.ts:49, untouched here). Out of scope for a schema refresh._updateops (experiments_update,cohorts_update,event_definitions_update,event_schemas_update/_partial_update,experiment_holdouts_update,experiment_saved_metrics_update,schema_property_groups_update) are the only new same-family ops that map onto existing CRUD — but our clients use PATCH, so they're omitted for now.Verification
pnpm typecheck✅pnpm test✅ (291 tests; the lone failure is the pre-existing timing flake above, green in isolation)TaskRun:
7bc7929c-c66d-4900-969e-a2e947b4b655Generated-By: PostHog Code