Skip to content

A spec-only PR still never verifies the console dist: packages/spec/** is not in ci.yml's console paths filter #9710

Description

@claude

Filed by the PM seat from PR #9706's open question 3. Ruled: B for now (leave the filter alone), C as the shape to reach for — this card is C.

The gap

#9667's headline scenario — a spec-only PR gets a console dist whose bundled @objectstack/spec lags this tree — is still unverified after PR #9706, and the reason is one layer earlier than the cache key that card was about.

ci.yml's console paths filter is exactly (verified at ci.yml:102-106):

console:
- '.objectui-sha'
- 'scripts/build-console.sh'
- 'scripts/check-console-sha.mjs'
- '.github/workflows/ci.yml'

and the job is if: needs.filter.outputs.console != 'false'. packages/spec/** is not there, so a spec-only PR never runs Console Pin Gate, never restores the cache, and never reaches PR #9706's new check:console-injection step.

PR #9706 is still correct and worth having: it verifies every run that actually consumes a restored dist (pin bumps, build-console.sh edits, ci.yml edits, and the whole release path). It just does not, by itself, put a spec-only PR in front of the gate.

⛔ The obvious fix is rejected

Adding packages/spec/** to the console filter makes the job run on every spec PR — and on a cache hit it still pays checkout + pnpm install + turbo run build --filter=@objectstack/client... (spec + core + client) before reaching the cheap assertions.

That is per-spec-change CI cost, which is the exact axis#9667's option A was rejected on (a full cold console rebuild ~20 min on a repo doing ~18 merges/day). Reversing that one question later would be incoherent.

The shape

A separate, much lighter job, filtered on packages/spec/**, that:

  • restores only the console dist from the existing cache key — no pnpm install, no turbo build;
  • runs the single node process pnpm check:console-injection --require-stamp against it;
  • does nothing at all on a cache miss (no dist to check is not a failure).

The stamp PR #9706 writes into dist/.objectstack-injection.json is content-replayed, so this needs no build tree and no network — which is what makes the light job possible at all.

Open questions for whoever takes it

  1. Can a job restore that cache without pnpm install? The check is a plain node script, but confirm pnpm check:console-injection is reachable without a full workspace install — if it is not, invoke the script directly with node, the way lint.yml already does for gates whose alias would otherwise need root package.json.
  2. What should a cache MISS do? Recommended: succeed silently. A spec-only PR with no cached dist has nothing to be stale.
  3. Is the added job worth its own runner slot, given the failure it catches is advisory (Console Pin Gate is not among the six required contexts — I read the live ruleset)? Price it before building.

⚠️ Sequencing: blocked until PR #9706 lands.

Refs: #9667 · PR #9706 · #8134 / PR #9660


Generated by Claude Code

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions