You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A stale tool count survived a green gate in the file the gate swept — the detector matches phrasings, not claims
scripts/lib/mcp-split.mjs (#575) checks always-on/gated claims against MCP_TOOL_ALWAYS_ON / MCP_TOOL_GATED. Its success line reports 40 swept (3 required to state it).
workers/mcp/AGENTS.mdis in that swept set. Line 15 says:
"18 of the 124 registrations are gated"
Actual: 19 of 136. The phrasing did not match the detector's pattern, so the file was swept, matched nothing, and passed. pnpm docs:drift reports all 13 checks green with that sentence present.
This is the file whose entire job is to be the calling agent's contract, and it has been telling every agent the wrong surface size.
This is the second instance of the same defect class today
#600 — state-vocabulary.ts's scanner returned [] for the two health descriptions that had actually drifted, because it reads (a/b/c) and backtick chains while those wrote `working` (gloss), `waiting` (gloss) — the shape a good description uses. The claim was never in the denominator, so no inventory entry could record it.
Same shape here: the denominator is "files swept", not "claims found", so a claim the detector cannot parse is invisible and indistinguishable from a file that makes no claim. Both guards report a healthy-looking number over a population that silently excludes the thing they exist to catch.
That is an ADR 0002 violation inside guards written to enforce ADR 0002: the success line states what was read, not what was checked.
Why "just widen the regex" is the wrong answer
#600's agent measured exactly that for the vocabulary scanner: 8 candidates over the surface, 6 false positives (result field names, write/destructive, a pair of tool names), and on the very description in question it recovered only two of four values. It chose generation over detection, which is that file's own stated doctrine.
The same is available here: MCP_TOOL_COUNT and MCP_TOOL_ALWAYS_ON are already constants. A doc could render them rather than restate them, or the check could assert that a file mentioning tool counts at all matches some known pattern — a shape requirement rather than a broader match.
The success line states claims found, not files swept — or states both, distinguishing "no claim" from "claim not parsed". This is the load-bearing change.
A file in the swept set that mentions a guarded quantity in a shape the detector cannot parse fails rather than passing silently. If that produces false positives, report the count and rate rather than widening quietly.
Denominator per ADR 0002, and the same audit applied to mcp-split.mjs's sibling checks — the "N tools" check reported 5 claims in 39 files, which is the right shape; establish whether the others are.
Inferred: that the phrasing is why it was missed, rather than an exclusion elsewhere in the sweep. The file is in the swept set and the number is wrong and the gate is green — but the detector was not stepped through against this line. Confirm that before fixing; if the cause is an exclusion instead, the fix is different.
A stale tool count survived a green gate in the file the gate swept — the detector matches phrasings, not claims
scripts/lib/mcp-split.mjs(#575) checks always-on/gated claims againstMCP_TOOL_ALWAYS_ON/MCP_TOOL_GATED. Its success line reports40 swept (3 required to state it).workers/mcp/AGENTS.mdis in that swept set. Line 15 says:Actual: 19 of 136. The phrasing did not match the detector's pattern, so the file was swept, matched nothing, and passed.
pnpm docs:driftreports all 13 checks green with that sentence present.This is the file whose entire job is to be the calling agent's contract, and it has been telling every agent the wrong surface size.
This is the second instance of the same defect class today
#600 —
state-vocabulary.ts's scanner returned[]for the twohealthdescriptions that had actually drifted, because it reads(a/b/c)and backtick chains while those wrote`working` (gloss), `waiting` (gloss)— the shape a good description uses. The claim was never in the denominator, so no inventory entry could record it.Same shape here: the denominator is "files swept", not "claims found", so a claim the detector cannot parse is invisible and indistinguishable from a file that makes no claim. Both guards report a healthy-looking number over a population that silently excludes the thing they exist to catch.
That is an ADR 0002 violation inside guards written to enforce ADR 0002: the success line states what was read, not what was checked.
Why "just widen the regex" is the wrong answer
#600's agent measured exactly that for the vocabulary scanner: 8 candidates over the surface, 6 false positives (result field names,
write/destructive, a pair of tool names), and on the very description in question it recovered only two of four values. It chose generation over detection, which is that file's own stated doctrine.The same is available here:
MCP_TOOL_COUNTandMCP_TOOL_ALWAYS_ONare already constants. A doc could render them rather than restate them, or the check could assert that a file mentioning tool counts at all matches some known pattern — a shape requirement rather than a broader match.Acceptance criteria
workers/mcp/AGENTS.md:15's claim is caught by a gate. Demonstrated red before the number is fixed (Agent-facing docs state four numbers the code disproves, and root AGENTS.md predates the output-schema change its first recipe depends on #602 fixes the number; this issue makes it catchable).mcp-split.mjs's sibling checks — the "N tools" check reported5 claims in 39 files, which is the right shape; establish whether the others are.Verified vs inferred
AGENTS.md:15's text;tool-count.ts's constants; thatdocs:driftpasses all 13 checks with the stale sentence present;mcp-split.mjs's40 swept (3 required)output; The vocabulary inventory's own citations are unchecked — three name files or symbols that do not exist #600's measurement of the vocabulary scanner.