Skip to content

[finding] measure-self-test-floor's DISPATCH criterion matches only includes()/has(), so six scripts that dispatch --self-test by equality are outside the census — pnpm-filter-targets among them #15421

Closed

Description

@claude

Found while flooring scripts/workspace-enumerator.mjs for #15375. Filed unassigned, out of that card's scope.

The reading

scripts/measure-self-test-floor.mjs selects its population on a --self-test dispatch, and spells that criterion as an argv-membership test:

/** A `--self-test` DISPATCH: argv membership tested, not a literal passed to a child. */
const DISPATCH = /(?:includes|has)\(\s*['"`]--self-test['"`]\s*\)/;

Only includes(...) and has(...) match. A script that dispatches by equality on an already-extracted flag does not:

// scripts/pnpm-filter-targets.mjs:695
if (flag === '--self-test') process.exit(await selfTest());

That is a real dispatch with a real CI invocation — check:pnpm-filter-targets runs node scripts/pnpm-filter-targets.mjs --self-test in lint.yml — and the census still cannot see the file. Measured on b3cc2cd57: the instrument reports 170 files and pnpm-filter-targets.mjs is not among them, under any classification.

Scope, measured

Six tracked scripts/** files dispatch on --self-test by equality and match neither arm of DISPATCH:

  • scripts/check-closing-keyword-parity.mjs
  • scripts/check-pnpm-filter-targets.mjs
  • scripts/check-settings-bind-window.mjs
  • scripts/check-step-collectors.mjs
  • scripts/measure-durability-swallow-family.mjs
  • scripts/pnpm-filter-targets.mjs

Their absence from the census is not a clearance — as with #15375, it is a set of files the criterion cannot reach, so no batch of #13799 will be dispatched against them and nothing records that they were never floored.

Boundary — what this is NOT

This is a different hole from #15375, which reports a module with no dispatch at all and whose header argues it must never acquire one. These six DO dispatch, and five of the six are gates CI already invokes with --self-test; only the criterion's spelling keeps them out. It is also distinct from #15153 (dispatch routed through a MODES table) and from #15339 (PRODUCES_FAILURE and a ternary process.exit), both of which are about other predicates in the same instrument.

Whether the repair is to widen DISPATCH, to add these as ENTRY_BY_HAND rows, or to leave the criterion alone and record the six as a known blind spot is the instrument's own question — the same standing question as #15391 / #15371 / #14963. Not chosen here.

Reproduce

node scripts/measure-self-test-floor.mjs --json | python3 -c "import json,sys; d=json.load(sys.stdin); print(len(d)); print([r for r in d if 'pnpm-filter-targets' in r['file']])"
grep -n "flag === '--self-test'" scripts/pnpm-filter-targets.mjs

Generated by Claude Code

Activity

  1. added
    domain:devxDomain lane — seat card indexed by label:pm:seat
    pm:queueReady for the PM dispatch loop
    toolingFix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface
    on Sep 4, 2026
  2. added
    pm:dispatchedDispatched to a dev agent by /pm-dispatch
    and removed
    pm:queueReady for the PM dispatch loop
    on Sep 4, 2026
  3. claude commented on Sep 4, 2026

    @claude
    ContributorAuthor

    Claim: PM seat domain:devx @ objectstack (#6023), session session_012zGPuVVX3deAx9LdjK8jCk, dispatching to an os-dev subagent on branch claude/issue-15421-instrument-dispatch-criterion. P3 (graded here: instrument precision, no false green on the tree today), S. Scope: scripts/measure-self-test-floor.mjs's DISPATCH criterion — widen it to the spellings the card measures, or record them as NOT MEASURED by name — measured on the tree before and after (ROSTER / NONE / COUNT counts quoted), with a control per newly-admitted spelling. Serial on the instrument: #15491 merged 18:55Z; no open PR touches the file (scan across all open PRs at claim time). Main at a104ad2d7. Assignee field was empty at the read immediately before this write.


    Generated by Claude Code

  4. claude commented on Sep 4, 2026

    @claude
    ContributorAuthor

    os-dev-report

    {
      "issue": 15421,
      "status": "done",
      "branch": "claude/issue-15421-instrument-dispatch-criterion",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/15517",
      "premise_still_valid": true,
      "summary": "Widened measure-self-test-floor's DISPATCH criterion per the PM ruling: it is now published in two halves (DISPATCH_MEMBERSHIP, the existing includes()/has() arm, and DISPATCH_EQUALITY, a bare identifier compared to the literal with ==/===, all three quote styles, literal on either side), composed into DISPATCH exactly as PRODUCES_FAILURE already is. The equality half deliberately requires a BARE identifier: a comparison against a property or call result (renderedArgv(' --self-test').args === '--self-test', live in scripts/pm/dispatch-gates.mjs's own self-test) is a tool examining the flag as data, and admitting it would seed the census with its own instruments. Nine inline controls added in the file's convention (run on every invocation, never behind a flag): membership still admitted; an equality-dispatch fixture admitted and proven not to carry a membership dispatch; each spelling variant (loose equality + double quotes, literal on the left, template literal) admitted; and a mention-only fixture (prose comment, comparison against a call result, literal handed to a child) refused, while matching UNMASKED so the control reads the comment masking rather than assuming it. No ENTRY_BY_HAND rows added, no blind spot recorded, probe verdict semantics / baseline precondition (#15455) / helper-handshake control (#15491) untouched, and none of the six files touched. All six classify NONE, so #13799's population grows by six -- stated in the PR body; flooring them is that card's work, not this one's.",
      "tests": "BEFORE (worktree base 5023630b1, node scripts/measure-self-test-floor.mjs, exit 0): '170 file(s) under scripts/ dispatch on --self-test' / '4 of 170. Floored: 165 roster, 1 count-candidate(s) to read.' AFTER (b907c9f42, exit 0): '176 file(s)' / '10 of 176. Floored: 165 roster, 1 count-candidate(s) to read.' --json diff of the two populations (exit 0 both): ADDED 6, REMOVED 0, 0 pre-existing rows reclassified; the six added are check-closing-keyword-parity, check-pnpm-filter-targets, check-settings-bind-window, check-step-collectors, measure-durability-swallow-family, pnpm-filter-targets, each floor=NONE (not floored). The BEFORE reading transfers to current main 20032594f: the only scripts/ change from 5023630b1 is scripts/engine-double-contract.pinned.json, which the census does not walk (.mjs/.mts/.js/.ts only), and none of the seven files the measurement reads moved. ABLATION on the COMMITTED implementation (equality arm removed from the composed DISPATCH; trap-guarded with absolute paths; mutation confirmed on disk: injected text x1, removed text x0, blob 4afcf7e0 -> fb008999): exit 1, 'measure-self-test-floor: ITS OWN CONTROLS FAILED -- no census printed.' with five control lines red (equality dispatch not admitted; loose equality + double quotes; literal on the LEFT; template-literal spelling; and CONTROL FIXTURE INVALID for the mention fixture, which stops being a trap once the arm is gone). Restore proven by blob hash back to 4afcf7e0 (== HEAD blob), git diff HEAD empty (0 bytes), and a restored run printing 176 file(s) at exit 0. GATES: pnpm -s check:pm-dispatch-gates exit 0 -- 'dispatch-gates self-test: 1402 cases pass.' (cases not edited); node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack exit 0, 22 commands derived, ALL 22 run and ALL exit 0 (no exit 3, no PREREQUISITE NOT MET, no ERR_MODULE_NOT_FOUND); pnpm check:nul-bytes exit 0 -- 'check-nul-bytes: OK (scanned 7511 text file(s) -- 7511 tracked, 0 untracked-not-ignored; skipped 7 binary; no raw ASCII control bytes).'; node scripts/check-self-test-wired.mjs exit 0 -- 'every one of the 169 script(s) CI runs that ship a --self-test has that self-test run by CI'; pnpm lint (eslint . --no-inline-config, whole repo) exit 0 in 93s. Every exit code captured with redirect-then-capture, never through a pipe. No test file in the tree pins measure-self-test-floor.mjs (grep -rl outside node_modules: the file itself, dispatch-gates' compound-anchor ledger row, one comment in check-regen-pending). FULL --probe: NOT MEASURED, not claimed -- 352 spawns against this container's ~10-minute foreground ceiling, one member (check-comment-mask-corpus) taking 65s alone. DECLARED NARROWING instead: probeEarlyReturn over exactly the six newly visible rows using main()'s own entry selection (4s) -- DEFEATED for check-closing-keyword-parity, check-settings-bind-window and pnpm-filter-targets (exit 0, 0 bytes); NOT MEASURED 'baseline run failed (exit 1)' for check-pnpm-filter-targets; NOT MEASURED (ambiguous entry, no ENTRY_BY_HAND row) for check-step-collectors and measure-durability-swallow-family. The dispatch-gates derivation warned the tree was 1 commit behind origin/main, naming scripts/engine-double-contract.pinned.json as the stale input -- in none of this diff's families.",
      "mcp_calls": "0 -- all GitHub reads and writes went through REST with $GH_TOKEN (issue body, open-issue dedup listing, issue create, PR create, label add, both read-backs)",
      "open_questions": [],
      "out_of_scope_findings": [
        "filed as #15515: measure-self-test-floor probeEarlyReturn writes its mutated copy INTO scripts/, so a gate that WALKS that tree reads the copy and refuses -- check-pnpm-filter-targets --self-test exits 0 alone and exit 1 with a copy present, so the probe records NOT MEASURED (baseline run failed) for a green self-test, for a reason belonging to the instrument. Deduped against 471 open issues listed via REST (search API is 403 on this seat); no existing card covers it (#15391 is the precondition itself, #14963 the injection anchor)."
      ]
    }

    Generated by Claude Code

  5. removed
    pm:dispatchedDispatched to a dev agent by /pm-dispatch
    on Sep 4, 2026
  6. claude commented on Sep 4, 2026

    @claude
    ContributorAuthor

    LANDED — PM seat domain:devx @ objectstack (#6023), session session_012zGPuVVX3deAx9LdjK8jCk.

    PR #15517 merged 2026-09-04T20:18Z (merge-queue; merged: true, main 85a245988). Probe on the re-fetched main: DISPATCH_MEMBERSHIP / DISPATCH_EQUALITY / the composed DISPATCH are present in scripts/measure-self-test-floor.mjs; node scripts/measure-self-test-floor.mjs on this seat's checkout exits 0 — measure-self-test-floor: 178 file(s) under scripts/ dispatch on --self-test. (176 with the six equality-dispatch files admitted). Fixes closed this card on merge; pm:dispatched and the assignee are stripped. #13799's population grew by six (all NONE). Next on the instrument, serial: #15515 → #14963.


    Generated by Claude Code

  7. claude commented on Sep 4, 2026

    @claude
    ContributorAuthor

    Addendum — the parenthetical "(176 …)" in the LANDED note above is the dev's reading on its branch head; on current main (85a245988, after later merges added more scripts/ self-tests) the instrument prints 178, which is the line quoted. The six equality-dispatch files are among them.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:devxDomain lane — seat card indexed by label:pm:seatpriority:p3toolingFix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions