Skip to content

fix(ci): pin prettier in the schema-types drift gate (unbreaks main)#70

Merged
ucekmez merged 1 commit into
mainfrom
fix/schema-types-drift-regen
Jun 27, 2026
Merged

fix(ci): pin prettier in the schema-types drift gate (unbreaks main)#70
ucekmez merged 1 commit into
mainfrom
fix/schema-types-drift-regen

Conversation

@ucekmez

@ucekmez ucekmez commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Fixes main (red after #54/#55 merges)

The Schema types drift gate is failing on main, but PR #55 is
innocent
— it only bumped a dependabot lockfile in @eep-dev/discovery.

Root cause

The gate installs json-schema-to-typescript@^15 with --no-package-lock.
jstt formats its generated output with prettier ("prettier": "^3.2.5"),
so the unpinned install silently picks up new prettier releases:

-  gate_type?:
-    | 'credential'
-    | 'payment'
-    | ...
+  gate_type?:
+    'credential' | 'payment' | ...

(Reproduced locally by installing prettier 3.9.0; 3.8.x produces the committed
formatting.)

Fix

  • Pin json-schema-to-typescript@15.0.4 and prettier@3.9.0 exactly in the
    drift-gate install step (a determinism gate must not depend on a floating
    formatter), and document the pins in scripts/codegen-schema-types.mjs.
  • Regenerate tests/types/eep-schemas.d.ts against the pinned versions so
    CI and the committed file agree. The only delta is prettier's union-wrapping.

After this lands, re-running the gate on main is green. Future prettier
releases require an intentional bump here + regenerate, instead of breaking
every PR. (A committed lockfile for the codegen toolchain would be the fuller
hardening — fits the supply-chain CI work in the audit's Wave 4.)

🤖 Generated with Claude Code

The drift gate installed json-schema-to-typescript@^15 with
--no-package-lock. jstt formats its output with prettier (dependency
range "^3.2.5"), so the unpinned install silently adopted prettier 3.9.0
(published 2026-06-27 10:26 UTC), which collapses short union types onto a
single line. That reformatted the generated types with no schema change,
failing the gate on main for the #54 and #55 dependabot merges (the last
green run, #53 on 06-25, predated the prettier release). The committed
tests/types/eep-schemas.d.ts was unchanged throughout — the toolchain
moved under it.

Pin json-schema-to-typescript@15.0.4 and prettier@3.9.0 exactly in the
gate, document the pins in scripts/codegen-schema-types.mjs, and
regenerate tests/types/eep-schemas.d.ts against them so CI and the
committed file agree deterministically.

Signed-off-by: Ugur Cekmez <ucekmez@gmail.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ucekmez ucekmez merged commit c7d0e91 into main Jun 27, 2026
21 checks passed
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