Skip to content

docs(check-console-injection): record why packages/spec is not in ci.yml's console filter - #10442

Merged
os-zhuang merged 1 commit into
mainfrom
claude/issue-9710-console-injection-header-note
Aug 21, 2026
Merged

docs(check-console-injection): record why packages/spec is not in ci.yml's console filter#10442
os-zhuang merged 1 commit into
mainfrom
claude/issue-9710-console-injection-header-note

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Header-only. One file, 44 added lines, zero deletions, no behaviour change.

This lands the PM's ruling on #9710's open question — where to record the
measurement
— which was answered C: put it in
scripts/check-console-injection.mjs's header, where #9667's cache-key cost
model already lives, rather than in ci.yml.

Refs: #9710 deliberately, not a closing keyword. That card's ruled outcome
is keep B — do not widen the filter, do not build the light job; this commit
implements none of what the card asked for, so it must not auto-close it. The
PM closes it with the ruling recorded.

What the new section records

A sibling of the existing "Adding packages/spec to the cache key was
considered and REJECTED" paragraph, placed after the EXPIRY section and before
the failure-response one:

  • the gap is real — packages/spec is absent from ci.yml's console paths
    filter, so a spec-only PR never schedules Console Pin Gate;
  • the reason it stays that way is not cost. Of this gate's six failure
    verdicts, five are pure functions of the restored dist plus its stamp —
    which a spec-only diff cannot move, the cache key being the pin and the build
    script and cache entries immutable — and exactly one reads this tree, the
    probe-expiry re-check, which needs packages/spec/dist because
    readSpecBlob resolves the package's exports map;
  • so the proposed restore-only job would start the gate 15 more times per 100
    commits
    (6/100 today, 21/100 with packages/spec added) and skip the only
    tree-sensitive assertion on every one of them;
  • and the fully built variant still passes on "spec moved forward since the
    dist was built"
    — the headline scenario — which PR fix(ci): verify the RESTORED console dist bundles this tree's spec, not only the built one #9706's ruling table
    already calls "not a failure — the ruled cache design accepts lag";
  • check:console-injection silently drops its only tree-sensitive assertion when packages/spec is unbuilt — and nothing requires the spec blob #10428 is named as the exit: derive the expiry probe from packages/spec
    source text, making that assertion buildless, which reopens the trigger
    question on different terms.

Full working (paths-filter replay under both picomatch versions, per-commit
attribution) stays on #9710's ruling comment; the header carries the conclusion
plus the numbers that make it checkable.

Verification — all at c84898aeb (the final commit)

node scripts/pm/dispatch-gates.mjs derived three families for this diff, all
green at head:

gateverdict line
pnpm check:console-injection✓ check-console-injection --self-test: 21 assertions over real fixture trees (real evaluate() path) (exit 0)
node scripts/check-cross-package-test-inputs.mjsOK: 12 package(s) read outside themselves, all declared, and turbo.json hashes every declared glob.
check:nul-bytes (standing, any edit)check-nul-bytes: OK (scanned 6124 text file(s) … no raw ASCII control bytes).

pnpm lintos-verify-lock: VERDICT command-exit 0 · held the lock 58s · waited 171s, ESLint silent. It ran on byte-identical content: the commit
changed no bytes (git status --porcelain = 0 lines, git diff HEAD empty at
c84898aeb). Relevant because PR #10429's
comment-swallow/no-code-inside-block-comment targets exactly this shape —
every added line carries the * prose marker, blank ones included, and the
block contains no */ sequence (packages/spec is written unglobbed for that
reason).

Independently reproduced the ruling's price numbers here before writing them
down, by literal-path replay over the same window (all seven console filter
entries are literal paths, so no matcher is needed): 100 first-parent commits
ending e502a6a8e → baseline 6/100, + packages/spec21/100 (+15),
+ packages/spec/src16/100, and 5 of the 15 add .describe( text
under packages/spec. The five-vs-one verdict split was re-derived from the
current source, not inherited from the brief — it matches.

Not in this diff

  • .github/workflows/ci.yml — that was option A and it is ruled out.
  • No new flag, no new assertion, no test change, no behaviour change.
  • Changeset: scripts/** publishes nothing (the root package is private), so
    skip-changeset. Re-derived at diff time by publish surface.

Refs: #9710 (the card and its ruling) · #9667 (the cost model already in this
header) · #9706 (the ruling table) · #10428 (the exit)


Generated by Claude Code

…yml's console filter
Header-only. A new section beside the existing cache-key economics, recording
the measurement that declined a spec-triggered console job: five of this gate's
six failure verdicts are pure functions of the restored dist plus its stamp,
which a spec-only diff cannot move, and the one that reads the tree needs
packages/spec/dist. So the proposed restore-only job would schedule the gate 15
more times per 100 commits (6/100 -> 21/100) and skip the only tree-sensitive
assertion on every one of them; and the fully built variant still passes on
"spec moved forward since the dist was built", which the cache design accepts by
design. #10428 is named as the exit that would reopen the question.
No behaviour change, no new flag, no ci.yml change.
Refs: #9710 (ruling) - #9667 (cost model) - #9706 (ruling table) - #10428 (the exit)
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DdCnBGcHeufjrq7drTD3wt
@claudeclaudeBot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Aug 20, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review August 20, 2026 21:17
@os-zhuang
os-zhuang added this pull request to the merge queueAug 20, 2026
@github-merge-queue
github-merge-queueBot removed this pull request from the merge queue due to failed status checks Aug 20, 2026
@os-zhuang
os-zhuang added this pull request to the merge queueAug 20, 2026
@github-merge-queue
github-merge-queueBot removed this pull request from the merge queue due to failed status checks Aug 20, 2026
@os-zhuang
os-zhuang added this pull request to the merge queueAug 21, 2026
Merged via the queue into main with commit 25b7939Aug 21, 2026
28 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-9710-console-injection-header-note branch August 21, 2026 01:28
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/sskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@os-zhuang@claude