Skip to content

chore(preflight): read specs from gitignored schemas/ alias; drop CI preflight gate#200

Merged
cdot65 merged 2 commits into
mainfrom
cdot65/chore/preflight-use-schemas-alias
Jul 9, 2026
Merged

chore(preflight): read specs from gitignored schemas/ alias; drop CI preflight gate#200
cdot65 merged 2 commits into
mainfrom
cdot65/chore/preflight-use-schemas-alias

Conversation

@cdot65

@cdot65 cdot65 commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Removes the committed specs/ tree and points preflight at the gitignored schemas/ alias (symlinks to a local pan.dev openapi-specs checkout), per the decision to keep a single always-current spec source.

Why

Modeling schemas from PRD prose instead of the real OpenAPI caused the ChannelStats field-name bug (#198). Reading the authoritative upstream schemas directly is what prevents that class of error.

Changes

  • preflight-schemas.ts reads schemas/ via an explicit MODELED_SPECS list (the exact files we model). Explicit rather than globbed because the alias tree also holds -latest duplicates and unmodeled specs (most of dlp/) whose components would collide and produce false drift. Friendly error if schemas/ is absent.
  • ci.yml — removed the preflight step. schemas/ is gitignored, so it can't run in a fresh CI checkout; preflight is now a local / pre-release check (as CLAUDE.md already framed "run before tagging a release").
  • specs/ deleted (it was never published — package.json files: ["dist"]).
  • allowlist — one entry: CustomerAppObject.tsg_id (the latest mgmt spec loosened it to optional; the SDK keeps it required since every customer app carries a TSG). Note: switching to the latest specs is what surfaced this.
  • .gitignore ignores schemas/.
  • CLAUDE.md / AGENTS.md updated to describe the local-only flow and the MODELED_SPECS list.

Verification

preflight against schemas/ is clean (0 unacknowledged drift, 236 matched). lint, typecheck, format, full Vitest green locally. The missing-schemas/ path prints a clear setup message.

Note

Preflight is no longer a per-PR CI gate — it's a local/pre-release check. Contributors without the schemas/ alias simply can't run it (clear error), which matches the "run before tagging a release" intent.

🤖 Generated with Claude Code

cdot65 added 2 commits July 9, 2026 04:18
…gate

Point preflight at the gitignored schemas/ directory (symlinks to a local
pan.dev openapi-specs checkout) via an explicit MODELED_SPECS list, and
remove the committed specs/ tree. schemas/ isn't in CI checkouts, so the
preflight step is removed from ci.yml — it's now a local/pre-release check.
Using the always-current upstream schemas is what prevents modeling drift
like the ChannelStats field-name bug.

- MODELED_SPECS lists the exact files we model (avoids -latest/unmodeled
  collisions from the full alias tree)
- allowlist CustomerAppObject.tsg_id (latest mgmt spec loosened it; SDK keeps
  it required since every customer app carries a TSG)
- friendly error if schemas/ is absent
- CLAUDE.md/AGENTS.md updated to describe the new local-only flow
@cdot65
cdot65 merged commit fdb891c into main Jul 9, 2026
4 of 8 checks passed
@cdot65
cdot65 deleted the cdot65/chore/preflight-use-schemas-alias branch July 9, 2026 09:36
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