Skip to content

chore(codegen): daily schema refresh (2026-05-16)#7

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

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

Conversation

@timgl
Copy link
Copy Markdown
Contributor

@timgl timgl commented May 16, 2026

Summary

Daily refresh of src/generated/api.d.ts from the live PostHog OpenAPI spec.

Spec diff size: 15 lines added, 1 line removed — all on the TrendsFilter component.

The change is purely documentation: inline description strings were added to aggregationAxisFormat, aggregationAxisPostfix, aggregationAxisPrefix, and decimalPlaces. No structural change, no new fields, no removed fields.

New operationIds added to openapi-filter.yaml

None. The drift report lists ~1,400 operationIds in the live spec that are not in our filter, but these are all auxiliary endpoints on resources we already manage (or resources we deliberately do not manage). Concrete categories:

  • Activity / audit log endpoints (*_activity_retrieve, *_all_activity_retrieve)
  • Bulk operations (*_bulk_update_tags_create, *_bulk_delete_create)
  • Sharing / collaborators / passwords (dashboards_sharing_*, dashboards_collaborators_*, insights_sharing_*)
  • Tile/layout helpers (dashboards_copy_tile_create, dashboards_move_tile_partial_update)
  • Full-PUT variants of resources where the IaC client only consumes PATCH (cohorts_update, experiments_update, event_definitions_update, schema_property_groups_update, etc.) — none of the resource clients call api.PUT, so adding these would just inflate the generated surface.
  • Experiment lifecycle actions outside the managed set (experiments_duplicate_create, experiments_reset_create, experiments_ship_variant_create, experiments_recalculate_timeseries_create, …)
  • Endpoint sub-actions (environments_endpoints_run_create, environments_endpoints_materialization_*)
  • Feature-flag introspection (feature_flags_status_retrieve, feature_flags_my_flags_retrieve, feature_flags_dependent_flags_list, …)

None of these are required by src/resources/*/client.ts, which only uses the standard list / retrieve / create / partial_update / destroy surface (plus the six experiment lifecycle actions and project-settings GET/PATCH that are already filtered in).

Resources touched

  • src/generated/api.d.ts — regenerated via pnpm codegen.

No resource clients, Zod schemas, or pipeline.ts projections required changes. pnpm typecheck is clean; pnpm test is 291/291 green.

Unresolved drift

None. No operationIds disappeared from the live spec.

Provenance

  • Branch: posthog-code/schema-refresh-2026-05-16
  • TaskRun: 85dfe592-51b9-41e4-bb15-9271a95dd2ce

Regenerate src/generated/api.d.ts from the live PostHog OpenAPI spec.

Diff is documentation-only on TrendsFilter (aggregationAxisFormat,
aggregationAxisPostfix, aggregationAxisPrefix, decimalPlaces): inline
descriptions were added in the live spec and now flow through.

No structural API changes. No new operationIds need adding to
openapi-filter.yaml — every new operationId in the live spec is an
auxiliary endpoint (activity logs, sharing, bulk tag updates, lifecycle
actions outside the managed set, full-PUT variants the IaC client
doesn't use) on a resource family we already manage with core CRUD.

Generated-By: PostHog Code
Task-Id: 85dfe592-51b9-41e4-bb15-9271a95dd2ce
@timgl timgl requested a review from pl May 16, 2026 07:40
Copy link
Copy Markdown
Contributor Author

timgl commented May 16, 2026

Two required checks are failing, both on workflow files that are outside the scope of this schema-refresh PR and that my run is not allowed to modify:

  • ensure-pinned-actions — flags pnpm/action-setup@v4 as unpinned in .github/workflows/release.yml and .github/workflows/schema-refresh.yml.
  • semgrep — flags ${{ inputs.dist-tag }} interpolation in a run: step of .github/workflows/release.yml (shell-injection rule).

Both findings are pre-existing on main (eb0cc1c) — they are org-level required checks that only fire on PRs, so they weren't visible on the last push to main. They are unrelated to the only file this PR changes (src/generated/api.d.ts, documentation-only delta on TrendsFilter).

I'm leaving the workflow files alone and stopping here so a human can decide whether to fix them in a separate PR or carry them in this one.

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