Skip to content

chore(codegen): daily schema refresh (2026-06-06)#28

Open
timgl wants to merge 1 commit into
mainfrom
posthog-code/schema-refresh-2026-06-06
Open

chore(codegen): daily schema refresh (2026-06-06)#28
timgl wants to merge 1 commit into
mainfrom
posthog-code/schema-refresh-2026-06-06

Conversation

@timgl

@timgl timgl commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Daily OpenAPI schema refresh — 2026-06-06

Regenerated src/generated/api.d.ts from the live PostHog OpenAPI spec
(https://us.posthog.com/api/schema/?format=json), filtered through the curated
openapi-filter.yaml allowlist. Generated file only — not hand-edited.

Spec diff size

  • src/generated/api.d.ts: +1384 / −49 lines (1 file changed)
  • openapi-filter.yaml: unchanged

New operationIds added to the filter

None. The drift report's "new operationIds" list is the entire unmanaged API
surface
(every live operationId minus the allowlist), not net-new endpoints since
the last run. They fall into two buckets, neither of which warrants an automated
filter change:

  1. Auxiliary endpoints on already-managed resources — e.g. insights_sharing_*,
    insights_activity_retrieve, dashboards_collaborators_*, feature_flags_status_retrieve,
    actions_bulk_update_tags_create, cohorts_activity_retrieve. These are read/side
    operations outside the CRUD surface this IaC tool manages.
  2. Entirely separate product families — error tracking, LLM analytics, conversations,
    warehouse, vision scanners, tasks, signals, logs, etc. Managing any of these is a
    deliberate product decision (new resource family + add-resource wiring + tests),
    not a routine schema-drift refresh. Left for human direction.

Resources touched

Only the regenerated types. The schema drift flows into these managed families
(their hand-maintained Zod projections in client.ts still hold — typecheck + tests pass,
so no client edits were needed):

  • experiment / experiment-saved-metricExperimentMetricType gained "retention";
    new ExperimentMetricOutlierHandling, reshaped ExperimentParameters.
  • endpoint — last-execution metadata fields; new AccountsQuery added to the query-source union.
  • environments / project-settings (singleton) — new TeamCustomerAnalyticsConfig,
    TeamWorkflowsConfig, DataWarehouseSyncWarning; CalendarHeatmapFilter.
  • Shared query-node Response* types renumbered.

Verification

  • pnpm typecheck
  • pnpm test ✅ (290/291; the one miss, pull/run.test.ts, is a 500ms timeout under
    parallel load — passes in 221ms in isolation, unrelated to schema drift)
  • All 71 allowlisted operationIds confirmed still present in the regenerated file —
    no managed operation disappeared.

Unresolved drift / for human review

  • No removals. Nothing managed vanished from the live spec.
  • Full-PUT _update variants exist but remain intentionally excluded. The live spec
    exposes cohorts_update, experiments_update, event_definitions_update,
    experiment_holdouts_update, and experiment_saved_metrics_update (full PUT) for
    families the filter currently covers with _partial_update only. The apply pipelines
    update (and even soft-delete) exclusively via PATCH, so adding these would be dead
    type surface. Left out by design — flag for a maintainer if PUT semantics are ever wanted.

TaskRun: 14289890-8baa-4fe4-aedf-28aac14ca00c

🤖 Generated with Claude Code

Regenerate src/generated/api.d.ts from the live PostHog OpenAPI schema
(https://us.posthog.com/api/schema/?format=json), filtered by openapi-filter.yaml.

Additive schema drift only — all 71 allowlisted operationIds remain present.
The openapi-filter.yaml allowlist is unchanged. typecheck and full test suite pass.

Generated-By: PostHog Code
Task-Id: 14289890-8baa-4fe4-aedf-28aac14ca00c
@timgl timgl requested a review from pl June 6, 2026 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant