Skip to content

chore(ci): single source of truth for the validation gate set#37

Merged
ben-laird merged 1 commit into
mainfrom
chore/single-ci-gate-script
Jun 9, 2026
Merged

chore(ci): single source of truth for the validation gate set#37
ben-laird merged 1 commit into
mainfrom
chore/single-ci-gate-script

Conversation

@ben-laird

Copy link
Copy Markdown
Owner

deno task verify and .github/workflows/dv-validate.yml were two hand-maintained lists of the same gates — and they had drifted. verify omitted doc:lint (and it was easy to miss publish:check's output), so a public-API change could pass locally and fail in CI. That's exactly what bit the #19 freeze (SCHEMA_URNS tripped both publish:check and doc:lint only in CI).

The fix

A new apps/cli/src/scripts/ci.ts is the single source of truth for the gate set — one ordered list, run as subprocesses (output buffered, shown only on failure), fail-fast. Both entry points point at it:

  • deno task verify → runs the script
  • the validate workflow → its ~dozen steps collapse to one deno task verify

Add or remove a gate in ci.ts and both local and CI pick it up. They can no longer diverge.

Coverage (now identical in both places)

fmt:check · lint · check · test · schemas:check · publish:check · doc:lint · dv validate · dv plugin verify (deno / npm / dv-release) · docs build

The dv-specific gates invoke apps/cli/src/main.ts directly, so CI no longer needs the separate "install dv from source" shim step.

Sample output

▸ fmt:check                          ok     (74ms)
▸ lint                               ok     (140ms)
▸ check                              ok     (422ms)
▸ test                               ok     (22.8s)
...
▸ docs build                         ok     (1.6s)
verify passed (12/12 gates, 26.1s)

On failure it stops at the first failing gate and dumps that gate's stdout/stderr.

Docs updated (CONVENTIONS.md, apps/cli/CLAUDE.md) to point at verify as the one command to run before calling work done. Infra-only — no Record.

🤖 Generated with Claude Code

`deno task verify` and the validate workflow were two hand-maintained
lists of the same gates, and they drifted: verify omitted doc:lint (and
publish:check's failure was easy to miss), so a public-API change could
pass locally and fail in CI — exactly what happened on the #19 freeze.

Introduce apps/cli/src/scripts/ci.ts: one ordered gate list, run as
subprocesses (buffered output, shown only on failure), fail-fast. Both
entry points now point at it:
- `deno task verify` → runs the script
- .github/workflows/dv-validate.yml → collapses its dozen steps to one
  `deno task verify`

The gate set is now complete in both places: fmt:check, lint, check,
test, schemas:check, publish:check, doc:lint, the dogfood gates
(dv validate + plugin verify ×3), and the docs build. The dv-specific
gates invoke apps/cli/src/main.ts directly, so CI no longer needs a
separate "install dv from source" step.

Add/remove a gate in ci.ts and both local and CI pick it up — they can
no longer diverge. Docs (CONVENTIONS.md, apps/cli/CLAUDE.md) updated to
point at `verify` as the one command.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ben-laird ben-laird force-pushed the chore/single-ci-gate-script branch from b3768a7 to 21194f5 Compare June 9, 2026 15:13
@ben-laird ben-laird merged commit 4b40ea1 into main Jun 9, 2026
1 check passed
@ben-laird ben-laird deleted the chore/single-ci-gate-script branch June 9, 2026 15:43
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