fix(scripts): give 24 more self-tests a verdict handshake at their dispatch (#13798 batch 2) - #14853

Merged
baozhoutao merged 4 commits into
mainfrom
claude/issue-13798-self-test-handshake-b2
Sep 3, 2026
Merged

fix(scripts): give 24 more self-tests a verdict handshake at their dispatch (#13798 batch 2)#14853
baozhoutao merged 4 commits into
mainfrom
claude/issue-13798-self-test-handshake-b2

Conversation

@claude

@claudeclaudeBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Part of #13798 (batch 2). Batch 1 is PR #14479, merged.

node scripts/measure-self-test-floor.mjs --probe injects return; as the first
statement of the function each --self-test dispatch calls, runs the gate and reads
the exit code before any pipe. Exit 0 is the defect: a self-test that never finished,
reported as one that passed.

What this batch does

The same boundary-only handshake batch 1 landed, transplanted to 24 more files. Two
shapes, one per dispatch spelling, both taken verbatim from the PR #13797 precedent:

  • sentinel (13 files) — selfTest() returns SELF_TEST_VERDICT only after its
    verdict line, and the dispatch refuses anything else. Used where the dispatch discards
    the return value. 10 files take it for the first time; the other 3 are the
    production-path additions below, on files that already carry the sentinel from batch 1.
  • module-level selfTestReachedVerdict flag (11 files) — used where the
    self-test's own exit code is load-bearing (process.exit(selfTest()),
    return selfTest(), the ternary form) or where the self-test already ends in
    process.exit and an appended sentinel would be dead code.

Nothing inside a self-test body changes beyond the verdict marker on the line after
the success line. The census's hole-1 floor classification is identical for all 165
files
before and after — the mechanical proof the remedy is boundary-only.

The probe, before and after

Measured on this branch's own merge base, not re-derived by hand.

populationDEFEATEDHELDNOT MEASURED
before (2d40f9146)165161436
after16521576

The 2 that remain are asserted equal as a set to the two files held by an open PR
and deliberately excluded here: scripts/check-type-check-coverage.mjs (PR #14805)
and scripts/pm/bare-root-worklist.mjs (PR #14800). Nothing else is left defeated.

14 of the 24 flipped DEFEATED -> HELD in the census. The other 10 are shapes the
census reads HELD or NOT MEASURED for reasons that are not a handshake, and each
carries its own evidence below.

The six that held only by accident

The card's own note: "5 gates hold today only by luck — a downstream TypeError or a
usage error, not a handshake."
The ACCEPT ruled them into this batch (Q1 → A). The
census verdict does not move for these (HELD before, HELD after), so the evidence is
the first line the mutated run prints — the accident replaced by the named refusal:

filemutated head, beforemutated head, after
check-osv-exemptions.mjsfile:///… (TypeError stack)the named refusal
typecheck-configs.mjsfile:///… (TypeError stack)the named refusal
check-exported-any-returns.mts/home/… (TypeError stack)the named refusal
checklist-select.mjsusage: node scripts/checklist-select.mjs … (exit 2)the named refusal
run-with-stall-guard.mjsrun-with-stall-guard: unknown option --self-testthe named refusal
check-page-declaration-shape.mjs(printed nothing, exit 1)the named refusal

check-osv-exemptions.mjs needed one extra line beyond the transplant, in its own
commit: its dispatch destructures the result (const { passed, lines } = selfTest()),
so on an early return the destructuring threw before the handshake could run — the
accident survived the first attempt, and the census said so. The result is now read
into a local first and destructured after the handshake.

Three traps this surface carries

  1. Unbraced branch bodies.} else if (argv.includes('--self-test')) selfTest();
    followed by else run(); needs braces, or the trailing else re-binds.
  2. The temporal dead zone.scripts/run-with-stall-guard.mjs dispatches at the top
    of the file, above the self-test definition; the flag is declared above the
    dispatch, not next to the function.
  3. A never return type.check-exported-any-returns.mts declares
    function selfTest(): never. It takes the flag rather than the sentinel precisely so
    the annotation does not have to move — check-test-typecheck.mts in batch 1 is the
    precedent for how a sentinel return drifts a shrink-only DEBT ledger, and raising a
    ledger is maintainer-only.

The production-path half (ACCEPT Q2 → A)

check-filter-alias-parity.mjs, check-meta-type-normalized.mjs and
check-test-completeness.mjs also run their self-test on the production path and
discarded the result there — the same silence one seam over, and one the census never
drives because it only runs --self-test. Each now compares the sentinel on that path
too. Ablated by hand with the census's own injector, run with no--self-test on
the command line: baseline exit 0 / 0 / 3, mutated exit 1 / 1 / 1, each printing the
named refusal.

check-workspace-manifest-cycles.mjs is fixed but still NOT MEASURED

Its dispatch calls runSelfTest(), which wraps a selfTest() that returns a failure
list. The census picks an entry only when a file defines exactly one self-test-shaped
function or has an ENTRY_BY_HAND row; this file has two and no row, so it reads
NOT MEASURED (ambiguous entry) both before and after — the handshake is real, the
instrument just cannot see it.

Ablated by hand instead, with the census's own probeEarlyReturn:

  • entry runSelfTest (what the dispatch actually calls): baseline exit 0, mutated
    exit 1, head ✗ check-workspace-manifest-cycles self-test: runSelfTest() returned without reaching its verdict,HELD.
  • entry selfTest (what the census would pick if the ambiguity were resolved the
    wrong way): mutated exit 1 with a TypeError stack — an accident, not a handshake.

⚠️ The one-line 'scripts/check-workspace-manifest-cycles.mjs': 'runSelfTest' row that
would make this measurable lives in scripts/measure-self-test-floor.mjs, which is
outside this batch's declared file surface. It is not edited here; it is filed as
#14842 instead, with the two readings that say which entry the row must name.

Local verification

origin/main merged once more (a real merge, no rebase) before opening this PR. The gate
union was re-derived AFTER the final commit and run on that head, 61850abbf:

  • node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands,
    DG_EXIT 0, 24 paths vs merge base f3ae441fa, 47 families, every one run from
    --commands. Plus the dispatch-named check:declared-population-live, the
    any-edit check:nul-bytes, and scripts/pm/check-governed-queue-guard.mjs --self-test
    (that file is edited here and governed-surface-guard.yml runs it, but the derivation
    did not list it).
  • 51 RAN-PASS, 1 NOT MEASURED. The one is
    node scripts/check-test-completeness.mjs — exit 3, PREREQUISITE NOT MET (it grades a
    saved turbo run test log and none exists locally). Never read as a pass.
    node scripts/check-engine-split-ratio.mjs first came back exit 2 on the shallow
    clone; after git fetch --shallow-since=2026-05-29 origin it is exit 0 with a real
    ratio, so it counts as RAN-PASS.
  • pnpm check:pm-dispatch-gates ran to completion: dispatch-gates self-test: 1241 cases pass.
  • pnpm build exit 0. pnpm lint over the WHOLE repo, not narrowed: exit 0, 5779 files,
    0 errors, 0 warnings (counts read from --format json).
  • Every one of the 24 files runs its own --self-test to the SAME exit code and
    byte-identical output as before the change (captured before the codemod, again after,
    then diffed). One file differs on one nondeterministic field:
    release-rehearsal-clone.mjs prints an elapsed-milliseconds figure (115 ms vs
    102 ms).
  • pnpm check:nul-bytes exit 0, plus a direct control-byte sweep of the touched files:
    no match.

Every exit code above was captured by redirecting first and reading $? after — never
through a pipe.

skip-changeset: scripts/** only, nothing published from any package.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LAwHpn4uVuf4N1geBcD5i3


Generated by Claude Code

…spatch
Batch 2 of the #13798 remedy: the boundary-only PR #13797 shape, transplanted
to the 14 files the probe still reads DEFEATED and released by their holding
PRs, the six that hold today only by accident (a downstream TypeError or a
usage error, not a handshake), the three that also call their self-test on the
production path and discard the result, and check-workspace-manifest-cycles.mjs
(runSelfTest() shape, NOT MEASURED by the census for want of an ENTRY_BY_HAND
row, defeated in fact).
Two shapes, one per dispatch spelling, both from batch 1 verbatim:
- sentinel: the self-test returns SELF_TEST_VERDICT only after its verdict
line, and the dispatch refuses anything else (where the return value is
discarded);
- module-level `selfTestReachedVerdict` flag (where the self-test's own exit
code is load-bearing, or where it ends in process.exit and an appended
sentinel would be dead code).
Nothing inside any self-test body changes beyond the verdict marker on the line
after the success line.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LAwHpn4uVuf4N1geBcD5i3
…ng it
The handshake was placed after `const { passed, lines } = selfTest()`, so an
early return made the destructuring throw a TypeError before the check could
run — the very accident that made this gate read HELD without a handshake. The
census now reports the named refusal instead of a stack trace.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LAwHpn4uVuf4N1geBcD5i3
@claudeclaudeBot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 3, 2026
@claude

claudeBot commented Sep 3, 2026

Copy link
Copy Markdown
ContributorAuthor

PM status (domain:devx execution seat, session session_01LAwHpn4uVuf4N1geBcD5i3): reviewed and ACCEPTED on #13798 (batch-2 checklist there). Held as draft on one red check that is not this PR's:Validate Package Dependencies on 61850abbf — run 33719242879, job 100534794466 — fails only at step 12 "Audit dependencies for known vulnerabilities (OSV-Scanner)"; step 11 (this PR's own check-osv-exemptions.mjs --self-test + gate) passed. The workflow ran here because the PR edits scripts/check-osv-exemptions.mjs (path filter), and the scanner reads the base's lockfile, which still carries the four fast-uri advisories (#14732). The fix is PR #14783 (fast-uri 3.1.5 → 3.1.7), already in the merge queue. Plan: once #14783 lands, merge origin/main into this branch via update-branch (real merge commit), let the check re-run, then flip ready + arm. No re-run is requested for the red itself — it is deterministic on the current base.


Generated by Claude Code

@claude

claudeBot commented Sep 3, 2026

Copy link
Copy Markdown
ContributorAuthor

PM action (domain:devx seat, session session_01LAwHpn4uVuf4N1geBcD5i3, closing shift): update-branch issued 10:3xZ — PR #14783 (the fast-uri lift that clears Validate Package Dependencies on the base) MERGED 08:38Z as b69da43d5. Next sitter: on GREEN flip ready + arm; any red on a shard this diff does not touch ⇒ read the anchor #14822 first.


Generated by Claude Code

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

Labels

size/mskip-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

@baozhoutao@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

fix(scripts): give 24 more self-tests a verdict handshake at their dispatch (#13798 batch 2) - #14853

Merged
baozhoutao merged 4 commits into
mainfrom
claude/issue-13798-self-test-handshake-b2
Sep 3, 2026
Merged

fix(scripts): give 24 more self-tests a verdict handshake at their dispatch (#13798 batch 2)#14853
baozhoutao merged 4 commits into
mainfrom
claude/issue-13798-self-test-handshake-b2

Conversation

@claude

@claudeclaudeBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Part of #13798 (batch 2). Batch 1 is PR #14479, merged.

node scripts/measure-self-test-floor.mjs --probe injects return; as the first
statement of the function each --self-test dispatch calls, runs the gate and reads
the exit code before any pipe. Exit 0 is the defect: a self-test that never finished,
reported as one that passed.

What this batch does

The same boundary-only handshake batch 1 landed, transplanted to 24 more files. Two
shapes, one per dispatch spelling, both taken verbatim from the PR #13797 precedent:

  • sentinel (13 files) — selfTest() returns SELF_TEST_VERDICT only after its
    verdict line, and the dispatch refuses anything else. Used where the dispatch discards
    the return value. 10 files take it for the first time; the other 3 are the
    production-path additions below, on files that already carry the sentinel from batch 1.
  • module-level selfTestReachedVerdict flag (11 files) — used where the
    self-test's own exit code is load-bearing (process.exit(selfTest()),
    return selfTest(), the ternary form) or where the self-test already ends in
    process.exit and an appended sentinel would be dead code.

Nothing inside a self-test body changes beyond the verdict marker on the line after
the success line. The census's hole-1 floor classification is identical for all 165
files
before and after — the mechanical proof the remedy is boundary-only.

The probe, before and after

Measured on this branch's own merge base, not re-derived by hand.

populationDEFEATEDHELDNOT MEASURED
before (2d40f9146)165161436
after16521576

The 2 that remain are asserted equal as a set to the two files held by an open PR
and deliberately excluded here: scripts/check-type-check-coverage.mjs (PR #14805)
and scripts/pm/bare-root-worklist.mjs (PR #14800). Nothing else is left defeated.

14 of the 24 flipped DEFEATED -> HELD in the census. The other 10 are shapes the
census reads HELD or NOT MEASURED for reasons that are not a handshake, and each
carries its own evidence below.

The six that held only by accident

The card's own note: "5 gates hold today only by luck — a downstream TypeError or a
usage error, not a handshake."
The ACCEPT ruled them into this batch (Q1 → A). The
census verdict does not move for these (HELD before, HELD after), so the evidence is
the first line the mutated run prints — the accident replaced by the named refusal:

filemutated head, beforemutated head, after
check-osv-exemptions.mjsfile:///… (TypeError stack)the named refusal
typecheck-configs.mjsfile:///… (TypeError stack)the named refusal
check-exported-any-returns.mts/home/… (TypeError stack)the named refusal
checklist-select.mjsusage: node scripts/checklist-select.mjs … (exit 2)the named refusal
run-with-stall-guard.mjsrun-with-stall-guard: unknown option --self-testthe named refusal
check-page-declaration-shape.mjs(printed nothing, exit 1)the named refusal

check-osv-exemptions.mjs needed one extra line beyond the transplant, in its own
commit: its dispatch destructures the result (const { passed, lines } = selfTest()),
so on an early return the destructuring threw before the handshake could run — the
accident survived the first attempt, and the census said so. The result is now read
into a local first and destructured after the handshake.

Three traps this surface carries

  1. Unbraced branch bodies.} else if (argv.includes('--self-test')) selfTest();
    followed by else run(); needs braces, or the trailing else re-binds.
  2. The temporal dead zone.scripts/run-with-stall-guard.mjs dispatches at the top
    of the file, above the self-test definition; the flag is declared above the
    dispatch, not next to the function.
  3. A never return type.check-exported-any-returns.mts declares
    function selfTest(): never. It takes the flag rather than the sentinel precisely so
    the annotation does not have to move — check-test-typecheck.mts in batch 1 is the
    precedent for how a sentinel return drifts a shrink-only DEBT ledger, and raising a
    ledger is maintainer-only.

The production-path half (ACCEPT Q2 → A)

check-filter-alias-parity.mjs, check-meta-type-normalized.mjs and
check-test-completeness.mjs also run their self-test on the production path and
discarded the result there — the same silence one seam over, and one the census never
drives because it only runs --self-test. Each now compares the sentinel on that path
too. Ablated by hand with the census's own injector, run with no--self-test on
the command line: baseline exit 0 / 0 / 3, mutated exit 1 / 1 / 1, each printing the
named refusal.

check-workspace-manifest-cycles.mjs is fixed but still NOT MEASURED

Its dispatch calls runSelfTest(), which wraps a selfTest() that returns a failure
list. The census picks an entry only when a file defines exactly one self-test-shaped
function or has an ENTRY_BY_HAND row; this file has two and no row, so it reads
NOT MEASURED (ambiguous entry) both before and after — the handshake is real, the
instrument just cannot see it.

Ablated by hand instead, with the census's own probeEarlyReturn:

  • entry runSelfTest (what the dispatch actually calls): baseline exit 0, mutated
    exit 1, head ✗ check-workspace-manifest-cycles self-test: runSelfTest() returned without reaching its verdict,HELD.
  • entry selfTest (what the census would pick if the ambiguity were resolved the
    wrong way): mutated exit 1 with a TypeError stack — an accident, not a handshake.

⚠️ The one-line 'scripts/check-workspace-manifest-cycles.mjs': 'runSelfTest' row that
would make this measurable lives in scripts/measure-self-test-floor.mjs, which is
outside this batch's declared file surface. It is not edited here; it is filed as
#14842 instead, with the two readings that say which entry the row must name.

Local verification

origin/main merged once more (a real merge, no rebase) before opening this PR. The gate
union was re-derived AFTER the final commit and run on that head, 61850abbf:

  • node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands,
    DG_EXIT 0, 24 paths vs merge base f3ae441fa, 47 families, every one run from
    --commands. Plus the dispatch-named check:declared-population-live, the
    any-edit check:nul-bytes, and scripts/pm/check-governed-queue-guard.mjs --self-test
    (that file is edited here and governed-surface-guard.yml runs it, but the derivation
    did not list it).
  • 51 RAN-PASS, 1 NOT MEASURED. The one is
    node scripts/check-test-completeness.mjs — exit 3, PREREQUISITE NOT MET (it grades a
    saved turbo run test log and none exists locally). Never read as a pass.
    node scripts/check-engine-split-ratio.mjs first came back exit 2 on the shallow
    clone; after git fetch --shallow-since=2026-05-29 origin it is exit 0 with a real
    ratio, so it counts as RAN-PASS.
  • pnpm check:pm-dispatch-gates ran to completion: dispatch-gates self-test: 1241 cases pass.
  • pnpm build exit 0. pnpm lint over the WHOLE repo, not narrowed: exit 0, 5779 files,
    0 errors, 0 warnings (counts read from --format json).
  • Every one of the 24 files runs its own --self-test to the SAME exit code and
    byte-identical output as before the change (captured before the codemod, again after,
    then diffed). One file differs on one nondeterministic field:
    release-rehearsal-clone.mjs prints an elapsed-milliseconds figure (115 ms vs
    102 ms).
  • pnpm check:nul-bytes exit 0, plus a direct control-byte sweep of the touched files:
    no match.

Every exit code above was captured by redirecting first and reading $? after — never
through a pipe.

skip-changeset: scripts/** only, nothing published from any package.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LAwHpn4uVuf4N1geBcD5i3


Generated by Claude Code

…spatch
Batch 2 of the #13798 remedy: the boundary-only PR #13797 shape, transplanted
to the 14 files the probe still reads DEFEATED and released by their holding
PRs, the six that hold today only by accident (a downstream TypeError or a
usage error, not a handshake), the three that also call their self-test on the
production path and discard the result, and check-workspace-manifest-cycles.mjs
(runSelfTest() shape, NOT MEASURED by the census for want of an ENTRY_BY_HAND
row, defeated in fact).
Two shapes, one per dispatch spelling, both from batch 1 verbatim:
- sentinel: the self-test returns SELF_TEST_VERDICT only after its verdict
line, and the dispatch refuses anything else (where the return value is
discarded);
- module-level `selfTestReachedVerdict` flag (where the self-test's own exit
code is load-bearing, or where it ends in process.exit and an appended
sentinel would be dead code).
Nothing inside any self-test body changes beyond the verdict marker on the line
after the success line.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LAwHpn4uVuf4N1geBcD5i3
…ng it
The handshake was placed after `const { passed, lines } = selfTest()`, so an
early return made the destructuring throw a TypeError before the check could
run — the very accident that made this gate read HELD without a handshake. The
census now reports the named refusal instead of a stack trace.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LAwHpn4uVuf4N1geBcD5i3
@claudeclaudeBot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 3, 2026
@claude

claudeBot commented Sep 3, 2026

Copy link
Copy Markdown
ContributorAuthor

PM status (domain:devx execution seat, session session_01LAwHpn4uVuf4N1geBcD5i3): reviewed and ACCEPTED on #13798 (batch-2 checklist there). Held as draft on one red check that is not this PR's:Validate Package Dependencies on 61850abbf — run 33719242879, job 100534794466 — fails only at step 12 "Audit dependencies for known vulnerabilities (OSV-Scanner)"; step 11 (this PR's own check-osv-exemptions.mjs --self-test + gate) passed. The workflow ran here because the PR edits scripts/check-osv-exemptions.mjs (path filter), and the scanner reads the base's lockfile, which still carries the four fast-uri advisories (#14732). The fix is PR #14783 (fast-uri 3.1.5 → 3.1.7), already in the merge queue. Plan: once #14783 lands, merge origin/main into this branch via update-branch (real merge commit), let the check re-run, then flip ready + arm. No re-run is requested for the red itself — it is deterministic on the current base.


Generated by Claude Code

@claude

claudeBot commented Sep 3, 2026

Copy link
Copy Markdown
ContributorAuthor

PM action (domain:devx seat, session session_01LAwHpn4uVuf4N1geBcD5i3, closing shift): update-branch issued 10:3xZ — PR #14783 (the fast-uri lift that clears Validate Package Dependencies on the base) MERGED 08:38Z as b69da43d5. Next sitter: on GREEN flip ready + arm; any red on a shard this diff does not touch ⇒ read the anchor #14822 first.


Generated by Claude Code

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

Labels

size/mskip-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

@baozhoutao@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

fix(scripts): give 24 more self-tests a verdict handshake at their dispatch (#13798 batch 2) - #14853

Merged
baozhoutao merged 4 commits into
mainfrom
claude/issue-13798-self-test-handshake-b2
Sep 3, 2026
Merged

fix(scripts): give 24 more self-tests a verdict handshake at their dispatch (#13798 batch 2)#14853
baozhoutao merged 4 commits into
mainfrom
claude/issue-13798-self-test-handshake-b2

Conversation

@claude

@claudeclaudeBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Part of #13798 (batch 2). Batch 1 is PR #14479, merged.

node scripts/measure-self-test-floor.mjs --probe injects return; as the first
statement of the function each --self-test dispatch calls, runs the gate and reads
the exit code before any pipe. Exit 0 is the defect: a self-test that never finished,
reported as one that passed.

What this batch does

The same boundary-only handshake batch 1 landed, transplanted to 24 more files. Two
shapes, one per dispatch spelling, both taken verbatim from the PR #13797 precedent:

  • sentinel (13 files) — selfTest() returns SELF_TEST_VERDICT only after its
    verdict line, and the dispatch refuses anything else. Used where the dispatch discards
    the return value. 10 files take it for the first time; the other 3 are the
    production-path additions below, on files that already carry the sentinel from batch 1.
  • module-level selfTestReachedVerdict flag (11 files) — used where the
    self-test's own exit code is load-bearing (process.exit(selfTest()),
    return selfTest(), the ternary form) or where the self-test already ends in
    process.exit and an appended sentinel would be dead code.

Nothing inside a self-test body changes beyond the verdict marker on the line after
the success line. The census's hole-1 floor classification is identical for all 165
files
before and after — the mechanical proof the remedy is boundary-only.

The probe, before and after

Measured on this branch's own merge base, not re-derived by hand.

populationDEFEATEDHELDNOT MEASURED
before (2d40f9146)165161436
after16521576

The 2 that remain are asserted equal as a set to the two files held by an open PR
and deliberately excluded here: scripts/check-type-check-coverage.mjs (PR #14805)
and scripts/pm/bare-root-worklist.mjs (PR #14800). Nothing else is left defeated.

14 of the 24 flipped DEFEATED -> HELD in the census. The other 10 are shapes the
census reads HELD or NOT MEASURED for reasons that are not a handshake, and each
carries its own evidence below.

The six that held only by accident

The card's own note: "5 gates hold today only by luck — a downstream TypeError or a
usage error, not a handshake."
The ACCEPT ruled them into this batch (Q1 → A). The
census verdict does not move for these (HELD before, HELD after), so the evidence is
the first line the mutated run prints — the accident replaced by the named refusal:

filemutated head, beforemutated head, after
check-osv-exemptions.mjsfile:///… (TypeError stack)the named refusal
typecheck-configs.mjsfile:///… (TypeError stack)the named refusal
check-exported-any-returns.mts/home/… (TypeError stack)the named refusal
checklist-select.mjsusage: node scripts/checklist-select.mjs … (exit 2)the named refusal
run-with-stall-guard.mjsrun-with-stall-guard: unknown option --self-testthe named refusal
check-page-declaration-shape.mjs(printed nothing, exit 1)the named refusal

check-osv-exemptions.mjs needed one extra line beyond the transplant, in its own
commit: its dispatch destructures the result (const { passed, lines } = selfTest()),
so on an early return the destructuring threw before the handshake could run — the
accident survived the first attempt, and the census said so. The result is now read
into a local first and destructured after the handshake.

Three traps this surface carries

  1. Unbraced branch bodies.} else if (argv.includes('--self-test')) selfTest();
    followed by else run(); needs braces, or the trailing else re-binds.
  2. The temporal dead zone.scripts/run-with-stall-guard.mjs dispatches at the top
    of the file, above the self-test definition; the flag is declared above the
    dispatch, not next to the function.
  3. A never return type.check-exported-any-returns.mts declares
    function selfTest(): never. It takes the flag rather than the sentinel precisely so
    the annotation does not have to move — check-test-typecheck.mts in batch 1 is the
    precedent for how a sentinel return drifts a shrink-only DEBT ledger, and raising a
    ledger is maintainer-only.

The production-path half (ACCEPT Q2 → A)

check-filter-alias-parity.mjs, check-meta-type-normalized.mjs and
check-test-completeness.mjs also run their self-test on the production path and
discarded the result there — the same silence one seam over, and one the census never
drives because it only runs --self-test. Each now compares the sentinel on that path
too. Ablated by hand with the census's own injector, run with no--self-test on
the command line: baseline exit 0 / 0 / 3, mutated exit 1 / 1 / 1, each printing the
named refusal.

check-workspace-manifest-cycles.mjs is fixed but still NOT MEASURED

Its dispatch calls runSelfTest(), which wraps a selfTest() that returns a failure
list. The census picks an entry only when a file defines exactly one self-test-shaped
function or has an ENTRY_BY_HAND row; this file has two and no row, so it reads
NOT MEASURED (ambiguous entry) both before and after — the handshake is real, the
instrument just cannot see it.

Ablated by hand instead, with the census's own probeEarlyReturn:

  • entry runSelfTest (what the dispatch actually calls): baseline exit 0, mutated
    exit 1, head ✗ check-workspace-manifest-cycles self-test: runSelfTest() returned without reaching its verdict,HELD.
  • entry selfTest (what the census would pick if the ambiguity were resolved the
    wrong way): mutated exit 1 with a TypeError stack — an accident, not a handshake.

⚠️ The one-line 'scripts/check-workspace-manifest-cycles.mjs': 'runSelfTest' row that
would make this measurable lives in scripts/measure-self-test-floor.mjs, which is
outside this batch's declared file surface. It is not edited here; it is filed as
#14842 instead, with the two readings that say which entry the row must name.

Local verification

origin/main merged once more (a real merge, no rebase) before opening this PR. The gate
union was re-derived AFTER the final commit and run on that head, 61850abbf:

  • node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands,
    DG_EXIT 0, 24 paths vs merge base f3ae441fa, 47 families, every one run from
    --commands. Plus the dispatch-named check:declared-population-live, the
    any-edit check:nul-bytes, and scripts/pm/check-governed-queue-guard.mjs --self-test
    (that file is edited here and governed-surface-guard.yml runs it, but the derivation
    did not list it).
  • 51 RAN-PASS, 1 NOT MEASURED. The one is
    node scripts/check-test-completeness.mjs — exit 3, PREREQUISITE NOT MET (it grades a
    saved turbo run test log and none exists locally). Never read as a pass.
    node scripts/check-engine-split-ratio.mjs first came back exit 2 on the shallow
    clone; after git fetch --shallow-since=2026-05-29 origin it is exit 0 with a real
    ratio, so it counts as RAN-PASS.
  • pnpm check:pm-dispatch-gates ran to completion: dispatch-gates self-test: 1241 cases pass.
  • pnpm build exit 0. pnpm lint over the WHOLE repo, not narrowed: exit 0, 5779 files,
    0 errors, 0 warnings (counts read from --format json).
  • Every one of the 24 files runs its own --self-test to the SAME exit code and
    byte-identical output as before the change (captured before the codemod, again after,
    then diffed). One file differs on one nondeterministic field:
    release-rehearsal-clone.mjs prints an elapsed-milliseconds figure (115 ms vs
    102 ms).
  • pnpm check:nul-bytes exit 0, plus a direct control-byte sweep of the touched files:
    no match.

Every exit code above was captured by redirecting first and reading $? after — never
through a pipe.

skip-changeset: scripts/** only, nothing published from any package.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LAwHpn4uVuf4N1geBcD5i3


Generated by Claude Code

…spatch
Batch 2 of the #13798 remedy: the boundary-only PR #13797 shape, transplanted
to the 14 files the probe still reads DEFEATED and released by their holding
PRs, the six that hold today only by accident (a downstream TypeError or a
usage error, not a handshake), the three that also call their self-test on the
production path and discard the result, and check-workspace-manifest-cycles.mjs
(runSelfTest() shape, NOT MEASURED by the census for want of an ENTRY_BY_HAND
row, defeated in fact).
Two shapes, one per dispatch spelling, both from batch 1 verbatim:
- sentinel: the self-test returns SELF_TEST_VERDICT only after its verdict
line, and the dispatch refuses anything else (where the return value is
discarded);
- module-level `selfTestReachedVerdict` flag (where the self-test's own exit
code is load-bearing, or where it ends in process.exit and an appended
sentinel would be dead code).
Nothing inside any self-test body changes beyond the verdict marker on the line
after the success line.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LAwHpn4uVuf4N1geBcD5i3
…ng it
The handshake was placed after `const { passed, lines } = selfTest()`, so an
early return made the destructuring throw a TypeError before the check could
run — the very accident that made this gate read HELD without a handshake. The
census now reports the named refusal instead of a stack trace.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LAwHpn4uVuf4N1geBcD5i3
@claudeclaudeBot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 3, 2026
@claude

claudeBot commented Sep 3, 2026

Copy link
Copy Markdown
ContributorAuthor

PM status (domain:devx execution seat, session session_01LAwHpn4uVuf4N1geBcD5i3): reviewed and ACCEPTED on #13798 (batch-2 checklist there). Held as draft on one red check that is not this PR's:Validate Package Dependencies on 61850abbf — run 33719242879, job 100534794466 — fails only at step 12 "Audit dependencies for known vulnerabilities (OSV-Scanner)"; step 11 (this PR's own check-osv-exemptions.mjs --self-test + gate) passed. The workflow ran here because the PR edits scripts/check-osv-exemptions.mjs (path filter), and the scanner reads the base's lockfile, which still carries the four fast-uri advisories (#14732). The fix is PR #14783 (fast-uri 3.1.5 → 3.1.7), already in the merge queue. Plan: once #14783 lands, merge origin/main into this branch via update-branch (real merge commit), let the check re-run, then flip ready + arm. No re-run is requested for the red itself — it is deterministic on the current base.


Generated by Claude Code

@claude

claudeBot commented Sep 3, 2026

Copy link
Copy Markdown
ContributorAuthor

PM action (domain:devx seat, session session_01LAwHpn4uVuf4N1geBcD5i3, closing shift): update-branch issued 10:3xZ — PR #14783 (the fast-uri lift that clears Validate Package Dependencies on the base) MERGED 08:38Z as b69da43d5. Next sitter: on GREEN flip ready + arm; any red on a shard this diff does not touch ⇒ read the anchor #14822 first.


Generated by Claude Code

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

Labels

size/mskip-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

@baozhoutao@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

fix(scripts): give 24 more self-tests a verdict handshake at their dispatch (#13798 batch 2) - #14853

Merged
baozhoutao merged 4 commits into
mainfrom
claude/issue-13798-self-test-handshake-b2
Sep 3, 2026
Merged

fix(scripts): give 24 more self-tests a verdict handshake at their dispatch (#13798 batch 2)#14853
baozhoutao merged 4 commits into
mainfrom
claude/issue-13798-self-test-handshake-b2

Conversation

@claude

@claudeclaudeBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Part of #13798 (batch 2). Batch 1 is PR #14479, merged.

node scripts/measure-self-test-floor.mjs --probe injects return; as the first
statement of the function each --self-test dispatch calls, runs the gate and reads
the exit code before any pipe. Exit 0 is the defect: a self-test that never finished,
reported as one that passed.

What this batch does

The same boundary-only handshake batch 1 landed, transplanted to 24 more files. Two
shapes, one per dispatch spelling, both taken verbatim from the PR #13797 precedent:

  • sentinel (13 files) — selfTest() returns SELF_TEST_VERDICT only after its
    verdict line, and the dispatch refuses anything else. Used where the dispatch discards
    the return value. 10 files take it for the first time; the other 3 are the
    production-path additions below, on files that already carry the sentinel from batch 1.
  • module-level selfTestReachedVerdict flag (11 files) — used where the
    self-test's own exit code is load-bearing (process.exit(selfTest()),
    return selfTest(), the ternary form) or where the self-test already ends in
    process.exit and an appended sentinel would be dead code.

Nothing inside a self-test body changes beyond the verdict marker on the line after
the success line. The census's hole-1 floor classification is identical for all 165
files
before and after — the mechanical proof the remedy is boundary-only.

The probe, before and after

Measured on this branch's own merge base, not re-derived by hand.

populationDEFEATEDHELDNOT MEASURED
before (2d40f9146)165161436
after16521576

The 2 that remain are asserted equal as a set to the two files held by an open PR
and deliberately excluded here: scripts/check-type-check-coverage.mjs (PR #14805)
and scripts/pm/bare-root-worklist.mjs (PR #14800). Nothing else is left defeated.

14 of the 24 flipped DEFEATED -> HELD in the census. The other 10 are shapes the
census reads HELD or NOT MEASURED for reasons that are not a handshake, and each
carries its own evidence below.

The six that held only by accident

The card's own note: "5 gates hold today only by luck — a downstream TypeError or a
usage error, not a handshake."
The ACCEPT ruled them into this batch (Q1 → A). The
census verdict does not move for these (HELD before, HELD after), so the evidence is
the first line the mutated run prints — the accident replaced by the named refusal:

filemutated head, beforemutated head, after
check-osv-exemptions.mjsfile:///… (TypeError stack)the named refusal
typecheck-configs.mjsfile:///… (TypeError stack)the named refusal
check-exported-any-returns.mts/home/… (TypeError stack)the named refusal
checklist-select.mjsusage: node scripts/checklist-select.mjs … (exit 2)the named refusal
run-with-stall-guard.mjsrun-with-stall-guard: unknown option --self-testthe named refusal
check-page-declaration-shape.mjs(printed nothing, exit 1)the named refusal

check-osv-exemptions.mjs needed one extra line beyond the transplant, in its own
commit: its dispatch destructures the result (const { passed, lines } = selfTest()),
so on an early return the destructuring threw before the handshake could run — the
accident survived the first attempt, and the census said so. The result is now read
into a local first and destructured after the handshake.

Three traps this surface carries

  1. Unbraced branch bodies.} else if (argv.includes('--self-test')) selfTest();
    followed by else run(); needs braces, or the trailing else re-binds.
  2. The temporal dead zone.scripts/run-with-stall-guard.mjs dispatches at the top
    of the file, above the self-test definition; the flag is declared above the
    dispatch, not next to the function.
  3. A never return type.check-exported-any-returns.mts declares
    function selfTest(): never. It takes the flag rather than the sentinel precisely so
    the annotation does not have to move — check-test-typecheck.mts in batch 1 is the
    precedent for how a sentinel return drifts a shrink-only DEBT ledger, and raising a
    ledger is maintainer-only.

The production-path half (ACCEPT Q2 → A)

check-filter-alias-parity.mjs, check-meta-type-normalized.mjs and
check-test-completeness.mjs also run their self-test on the production path and
discarded the result there — the same silence one seam over, and one the census never
drives because it only runs --self-test. Each now compares the sentinel on that path
too. Ablated by hand with the census's own injector, run with no--self-test on
the command line: baseline exit 0 / 0 / 3, mutated exit 1 / 1 / 1, each printing the
named refusal.

check-workspace-manifest-cycles.mjs is fixed but still NOT MEASURED

Its dispatch calls runSelfTest(), which wraps a selfTest() that returns a failure
list. The census picks an entry only when a file defines exactly one self-test-shaped
function or has an ENTRY_BY_HAND row; this file has two and no row, so it reads
NOT MEASURED (ambiguous entry) both before and after — the handshake is real, the
instrument just cannot see it.

Ablated by hand instead, with the census's own probeEarlyReturn:

  • entry runSelfTest (what the dispatch actually calls): baseline exit 0, mutated
    exit 1, head ✗ check-workspace-manifest-cycles self-test: runSelfTest() returned without reaching its verdict,HELD.
  • entry selfTest (what the census would pick if the ambiguity were resolved the
    wrong way): mutated exit 1 with a TypeError stack — an accident, not a handshake.

⚠️ The one-line 'scripts/check-workspace-manifest-cycles.mjs': 'runSelfTest' row that
would make this measurable lives in scripts/measure-self-test-floor.mjs, which is
outside this batch's declared file surface. It is not edited here; it is filed as
#14842 instead, with the two readings that say which entry the row must name.

Local verification

origin/main merged once more (a real merge, no rebase) before opening this PR. The gate
union was re-derived AFTER the final commit and run on that head, 61850abbf:

  • node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands,
    DG_EXIT 0, 24 paths vs merge base f3ae441fa, 47 families, every one run from
    --commands. Plus the dispatch-named check:declared-population-live, the
    any-edit check:nul-bytes, and scripts/pm/check-governed-queue-guard.mjs --self-test
    (that file is edited here and governed-surface-guard.yml runs it, but the derivation
    did not list it).
  • 51 RAN-PASS, 1 NOT MEASURED. The one is
    node scripts/check-test-completeness.mjs — exit 3, PREREQUISITE NOT MET (it grades a
    saved turbo run test log and none exists locally). Never read as a pass.
    node scripts/check-engine-split-ratio.mjs first came back exit 2 on the shallow
    clone; after git fetch --shallow-since=2026-05-29 origin it is exit 0 with a real
    ratio, so it counts as RAN-PASS.
  • pnpm check:pm-dispatch-gates ran to completion: dispatch-gates self-test: 1241 cases pass.
  • pnpm build exit 0. pnpm lint over the WHOLE repo, not narrowed: exit 0, 5779 files,
    0 errors, 0 warnings (counts read from --format json).
  • Every one of the 24 files runs its own --self-test to the SAME exit code and
    byte-identical output as before the change (captured before the codemod, again after,
    then diffed). One file differs on one nondeterministic field:
    release-rehearsal-clone.mjs prints an elapsed-milliseconds figure (115 ms vs
    102 ms).
  • pnpm check:nul-bytes exit 0, plus a direct control-byte sweep of the touched files:
    no match.

Every exit code above was captured by redirecting first and reading $? after — never
through a pipe.

skip-changeset: scripts/** only, nothing published from any package.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LAwHpn4uVuf4N1geBcD5i3


Generated by Claude Code

…spatch
Batch 2 of the #13798 remedy: the boundary-only PR #13797 shape, transplanted
to the 14 files the probe still reads DEFEATED and released by their holding
PRs, the six that hold today only by accident (a downstream TypeError or a
usage error, not a handshake), the three that also call their self-test on the
production path and discard the result, and check-workspace-manifest-cycles.mjs
(runSelfTest() shape, NOT MEASURED by the census for want of an ENTRY_BY_HAND
row, defeated in fact).
Two shapes, one per dispatch spelling, both from batch 1 verbatim:
- sentinel: the self-test returns SELF_TEST_VERDICT only after its verdict
line, and the dispatch refuses anything else (where the return value is
discarded);
- module-level `selfTestReachedVerdict` flag (where the self-test's own exit
code is load-bearing, or where it ends in process.exit and an appended
sentinel would be dead code).
Nothing inside any self-test body changes beyond the verdict marker on the line
after the success line.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LAwHpn4uVuf4N1geBcD5i3
…ng it
The handshake was placed after `const { passed, lines } = selfTest()`, so an
early return made the destructuring throw a TypeError before the check could
run — the very accident that made this gate read HELD without a handshake. The
census now reports the named refusal instead of a stack trace.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LAwHpn4uVuf4N1geBcD5i3
@claudeclaudeBot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 3, 2026
@claude

claudeBot commented Sep 3, 2026

Copy link
Copy Markdown
ContributorAuthor

PM status (domain:devx execution seat, session session_01LAwHpn4uVuf4N1geBcD5i3): reviewed and ACCEPTED on #13798 (batch-2 checklist there). Held as draft on one red check that is not this PR's:Validate Package Dependencies on 61850abbf — run 33719242879, job 100534794466 — fails only at step 12 "Audit dependencies for known vulnerabilities (OSV-Scanner)"; step 11 (this PR's own check-osv-exemptions.mjs --self-test + gate) passed. The workflow ran here because the PR edits scripts/check-osv-exemptions.mjs (path filter), and the scanner reads the base's lockfile, which still carries the four fast-uri advisories (#14732). The fix is PR #14783 (fast-uri 3.1.5 → 3.1.7), already in the merge queue. Plan: once #14783 lands, merge origin/main into this branch via update-branch (real merge commit), let the check re-run, then flip ready + arm. No re-run is requested for the red itself — it is deterministic on the current base.


Generated by Claude Code

@claude

claudeBot commented Sep 3, 2026

Copy link
Copy Markdown
ContributorAuthor

PM action (domain:devx seat, session session_01LAwHpn4uVuf4N1geBcD5i3, closing shift): update-branch issued 10:3xZ — PR #14783 (the fast-uri lift that clears Validate Package Dependencies on the base) MERGED 08:38Z as b69da43d5. Next sitter: on GREEN flip ready + arm; any red on a shard this diff does not touch ⇒ read the anchor #14822 first.


Generated by Claude Code

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

Labels

size/mskip-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

@baozhoutao@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

fix(scripts): give 24 more self-tests a verdict handshake at their dispatch (#13798 batch 2) - #14853

Merged
baozhoutao merged 4 commits into
mainfrom
claude/issue-13798-self-test-handshake-b2
Sep 3, 2026
Merged

fix(scripts): give 24 more self-tests a verdict handshake at their dispatch (#13798 batch 2)#14853
baozhoutao merged 4 commits into
mainfrom
claude/issue-13798-self-test-handshake-b2

Conversation

@claude

@claudeclaudeBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Part of #13798 (batch 2). Batch 1 is PR #14479, merged.

node scripts/measure-self-test-floor.mjs --probe injects return; as the first
statement of the function each --self-test dispatch calls, runs the gate and reads
the exit code before any pipe. Exit 0 is the defect: a self-test that never finished,
reported as one that passed.

What this batch does

The same boundary-only handshake batch 1 landed, transplanted to 24 more files. Two
shapes, one per dispatch spelling, both taken verbatim from the PR #13797 precedent:

  • sentinel (13 files) — selfTest() returns SELF_TEST_VERDICT only after its
    verdict line, and the dispatch refuses anything else. Used where the dispatch discards
    the return value. 10 files take it for the first time; the other 3 are the
    production-path additions below, on files that already carry the sentinel from batch 1.
  • module-level selfTestReachedVerdict flag (11 files) — used where the
    self-test's own exit code is load-bearing (process.exit(selfTest()),
    return selfTest(), the ternary form) or where the self-test already ends in
    process.exit and an appended sentinel would be dead code.

Nothing inside a self-test body changes beyond the verdict marker on the line after
the success line. The census's hole-1 floor classification is identical for all 165
files
before and after — the mechanical proof the remedy is boundary-only.

The probe, before and after

Measured on this branch's own merge base, not re-derived by hand.

populationDEFEATEDHELDNOT MEASURED
before (2d40f9146)165161436
after16521576

The 2 that remain are asserted equal as a set to the two files held by an open PR
and deliberately excluded here: scripts/check-type-check-coverage.mjs (PR #14805)
and scripts/pm/bare-root-worklist.mjs (PR #14800). Nothing else is left defeated.

14 of the 24 flipped DEFEATED -> HELD in the census. The other 10 are shapes the
census reads HELD or NOT MEASURED for reasons that are not a handshake, and each
carries its own evidence below.

The six that held only by accident

The card's own note: "5 gates hold today only by luck — a downstream TypeError or a
usage error, not a handshake."
The ACCEPT ruled them into this batch (Q1 → A). The
census verdict does not move for these (HELD before, HELD after), so the evidence is
the first line the mutated run prints — the accident replaced by the named refusal:

filemutated head, beforemutated head, after
check-osv-exemptions.mjsfile:///… (TypeError stack)the named refusal
typecheck-configs.mjsfile:///… (TypeError stack)the named refusal
check-exported-any-returns.mts/home/… (TypeError stack)the named refusal
checklist-select.mjsusage: node scripts/checklist-select.mjs … (exit 2)the named refusal
run-with-stall-guard.mjsrun-with-stall-guard: unknown option --self-testthe named refusal
check-page-declaration-shape.mjs(printed nothing, exit 1)the named refusal

check-osv-exemptions.mjs needed one extra line beyond the transplant, in its own
commit: its dispatch destructures the result (const { passed, lines } = selfTest()),
so on an early return the destructuring threw before the handshake could run — the
accident survived the first attempt, and the census said so. The result is now read
into a local first and destructured after the handshake.

Three traps this surface carries

  1. Unbraced branch bodies.} else if (argv.includes('--self-test')) selfTest();
    followed by else run(); needs braces, or the trailing else re-binds.
  2. The temporal dead zone.scripts/run-with-stall-guard.mjs dispatches at the top
    of the file, above the self-test definition; the flag is declared above the
    dispatch, not next to the function.
  3. A never return type.check-exported-any-returns.mts declares
    function selfTest(): never. It takes the flag rather than the sentinel precisely so
    the annotation does not have to move — check-test-typecheck.mts in batch 1 is the
    precedent for how a sentinel return drifts a shrink-only DEBT ledger, and raising a
    ledger is maintainer-only.

The production-path half (ACCEPT Q2 → A)

check-filter-alias-parity.mjs, check-meta-type-normalized.mjs and
check-test-completeness.mjs also run their self-test on the production path and
discarded the result there — the same silence one seam over, and one the census never
drives because it only runs --self-test. Each now compares the sentinel on that path
too. Ablated by hand with the census's own injector, run with no--self-test on
the command line: baseline exit 0 / 0 / 3, mutated exit 1 / 1 / 1, each printing the
named refusal.

check-workspace-manifest-cycles.mjs is fixed but still NOT MEASURED

Its dispatch calls runSelfTest(), which wraps a selfTest() that returns a failure
list. The census picks an entry only when a file defines exactly one self-test-shaped
function or has an ENTRY_BY_HAND row; this file has two and no row, so it reads
NOT MEASURED (ambiguous entry) both before and after — the handshake is real, the
instrument just cannot see it.

Ablated by hand instead, with the census's own probeEarlyReturn:

  • entry runSelfTest (what the dispatch actually calls): baseline exit 0, mutated
    exit 1, head ✗ check-workspace-manifest-cycles self-test: runSelfTest() returned without reaching its verdict,HELD.
  • entry selfTest (what the census would pick if the ambiguity were resolved the
    wrong way): mutated exit 1 with a TypeError stack — an accident, not a handshake.

⚠️ The one-line 'scripts/check-workspace-manifest-cycles.mjs': 'runSelfTest' row that
would make this measurable lives in scripts/measure-self-test-floor.mjs, which is
outside this batch's declared file surface. It is not edited here; it is filed as
#14842 instead, with the two readings that say which entry the row must name.

Local verification

origin/main merged once more (a real merge, no rebase) before opening this PR. The gate
union was re-derived AFTER the final commit and run on that head, 61850abbf:

  • node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands,
    DG_EXIT 0, 24 paths vs merge base f3ae441fa, 47 families, every one run from
    --commands. Plus the dispatch-named check:declared-population-live, the
    any-edit check:nul-bytes, and scripts/pm/check-governed-queue-guard.mjs --self-test
    (that file is edited here and governed-surface-guard.yml runs it, but the derivation
    did not list it).
  • 51 RAN-PASS, 1 NOT MEASURED. The one is
    node scripts/check-test-completeness.mjs — exit 3, PREREQUISITE NOT MET (it grades a
    saved turbo run test log and none exists locally). Never read as a pass.
    node scripts/check-engine-split-ratio.mjs first came back exit 2 on the shallow
    clone; after git fetch --shallow-since=2026-05-29 origin it is exit 0 with a real
    ratio, so it counts as RAN-PASS.
  • pnpm check:pm-dispatch-gates ran to completion: dispatch-gates self-test: 1241 cases pass.
  • pnpm build exit 0. pnpm lint over the WHOLE repo, not narrowed: exit 0, 5779 files,
    0 errors, 0 warnings (counts read from --format json).
  • Every one of the 24 files runs its own --self-test to the SAME exit code and
    byte-identical output as before the change (captured before the codemod, again after,
    then diffed). One file differs on one nondeterministic field:
    release-rehearsal-clone.mjs prints an elapsed-milliseconds figure (115 ms vs
    102 ms).
  • pnpm check:nul-bytes exit 0, plus a direct control-byte sweep of the touched files:
    no match.

Every exit code above was captured by redirecting first and reading $? after — never
through a pipe.

skip-changeset: scripts/** only, nothing published from any package.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LAwHpn4uVuf4N1geBcD5i3


Generated by Claude Code

…spatch
Batch 2 of the #13798 remedy: the boundary-only PR #13797 shape, transplanted
to the 14 files the probe still reads DEFEATED and released by their holding
PRs, the six that hold today only by accident (a downstream TypeError or a
usage error, not a handshake), the three that also call their self-test on the
production path and discard the result, and check-workspace-manifest-cycles.mjs
(runSelfTest() shape, NOT MEASURED by the census for want of an ENTRY_BY_HAND
row, defeated in fact).
Two shapes, one per dispatch spelling, both from batch 1 verbatim:
- sentinel: the self-test returns SELF_TEST_VERDICT only after its verdict
line, and the dispatch refuses anything else (where the return value is
discarded);
- module-level `selfTestReachedVerdict` flag (where the self-test's own exit
code is load-bearing, or where it ends in process.exit and an appended
sentinel would be dead code).
Nothing inside any self-test body changes beyond the verdict marker on the line
after the success line.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LAwHpn4uVuf4N1geBcD5i3
…ng it
The handshake was placed after `const { passed, lines } = selfTest()`, so an
early return made the destructuring throw a TypeError before the check could
run — the very accident that made this gate read HELD without a handshake. The
census now reports the named refusal instead of a stack trace.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LAwHpn4uVuf4N1geBcD5i3
@claudeclaudeBot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 3, 2026
@claude

claudeBot commented Sep 3, 2026

Copy link
Copy Markdown
ContributorAuthor

PM status (domain:devx execution seat, session session_01LAwHpn4uVuf4N1geBcD5i3): reviewed and ACCEPTED on #13798 (batch-2 checklist there). Held as draft on one red check that is not this PR's:Validate Package Dependencies on 61850abbf — run 33719242879, job 100534794466 — fails only at step 12 "Audit dependencies for known vulnerabilities (OSV-Scanner)"; step 11 (this PR's own check-osv-exemptions.mjs --self-test + gate) passed. The workflow ran here because the PR edits scripts/check-osv-exemptions.mjs (path filter), and the scanner reads the base's lockfile, which still carries the four fast-uri advisories (#14732). The fix is PR #14783 (fast-uri 3.1.5 → 3.1.7), already in the merge queue. Plan: once #14783 lands, merge origin/main into this branch via update-branch (real merge commit), let the check re-run, then flip ready + arm. No re-run is requested for the red itself — it is deterministic on the current base.


Generated by Claude Code

@claude

claudeBot commented Sep 3, 2026

Copy link
Copy Markdown
ContributorAuthor

PM action (domain:devx seat, session session_01LAwHpn4uVuf4N1geBcD5i3, closing shift): update-branch issued 10:3xZ — PR #14783 (the fast-uri lift that clears Validate Package Dependencies on the base) MERGED 08:38Z as b69da43d5. Next sitter: on GREEN flip ready + arm; any red on a shard this diff does not touch ⇒ read the anchor #14822 first.


Generated by Claude Code

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

Labels

size/mskip-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

@baozhoutao@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

fix(scripts): give 24 more self-tests a verdict handshake at their dispatch (#13798 batch 2) - #14853

Merged
baozhoutao merged 4 commits into
mainfrom
claude/issue-13798-self-test-handshake-b2
Sep 3, 2026
Merged

fix(scripts): give 24 more self-tests a verdict handshake at their dispatch (#13798 batch 2)#14853
baozhoutao merged 4 commits into
mainfrom
claude/issue-13798-self-test-handshake-b2

Conversation

@claude

@claudeclaudeBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Part of #13798 (batch 2). Batch 1 is PR #14479, merged.

node scripts/measure-self-test-floor.mjs --probe injects return; as the first
statement of the function each --self-test dispatch calls, runs the gate and reads
the exit code before any pipe. Exit 0 is the defect: a self-test that never finished,
reported as one that passed.

What this batch does

The same boundary-only handshake batch 1 landed, transplanted to 24 more files. Two
shapes, one per dispatch spelling, both taken verbatim from the PR #13797 precedent:

  • sentinel (13 files) — selfTest() returns SELF_TEST_VERDICT only after its
    verdict line, and the dispatch refuses anything else. Used where the dispatch discards
    the return value. 10 files take it for the first time; the other 3 are the
    production-path additions below, on files that already carry the sentinel from batch 1.
  • module-level selfTestReachedVerdict flag (11 files) — used where the
    self-test's own exit code is load-bearing (process.exit(selfTest()),
    return selfTest(), the ternary form) or where the self-test already ends in
    process.exit and an appended sentinel would be dead code.

Nothing inside a self-test body changes beyond the verdict marker on the line after
the success line. The census's hole-1 floor classification is identical for all 165
files
before and after — the mechanical proof the remedy is boundary-only.

The probe, before and after

Measured on this branch's own merge base, not re-derived by hand.

populationDEFEATEDHELDNOT MEASURED
before (2d40f9146)165161436
after16521576

The 2 that remain are asserted equal as a set to the two files held by an open PR
and deliberately excluded here: scripts/check-type-check-coverage.mjs (PR #14805)
and scripts/pm/bare-root-worklist.mjs (PR #14800). Nothing else is left defeated.

14 of the 24 flipped DEFEATED -> HELD in the census. The other 10 are shapes the
census reads HELD or NOT MEASURED for reasons that are not a handshake, and each
carries its own evidence below.

The six that held only by accident

The card's own note: "5 gates hold today only by luck — a downstream TypeError or a
usage error, not a handshake."
The ACCEPT ruled them into this batch (Q1 → A). The
census verdict does not move for these (HELD before, HELD after), so the evidence is
the first line the mutated run prints — the accident replaced by the named refusal:

filemutated head, beforemutated head, after
check-osv-exemptions.mjsfile:///… (TypeError stack)the named refusal
typecheck-configs.mjsfile:///… (TypeError stack)the named refusal
check-exported-any-returns.mts/home/… (TypeError stack)the named refusal
checklist-select.mjsusage: node scripts/checklist-select.mjs … (exit 2)the named refusal
run-with-stall-guard.mjsrun-with-stall-guard: unknown option --self-testthe named refusal
check-page-declaration-shape.mjs(printed nothing, exit 1)the named refusal

check-osv-exemptions.mjs needed one extra line beyond the transplant, in its own
commit: its dispatch destructures the result (const { passed, lines } = selfTest()),
so on an early return the destructuring threw before the handshake could run — the
accident survived the first attempt, and the census said so. The result is now read
into a local first and destructured after the handshake.

Three traps this surface carries

  1. Unbraced branch bodies.} else if (argv.includes('--self-test')) selfTest();
    followed by else run(); needs braces, or the trailing else re-binds.
  2. The temporal dead zone.scripts/run-with-stall-guard.mjs dispatches at the top
    of the file, above the self-test definition; the flag is declared above the
    dispatch, not next to the function.
  3. A never return type.check-exported-any-returns.mts declares
    function selfTest(): never. It takes the flag rather than the sentinel precisely so
    the annotation does not have to move — check-test-typecheck.mts in batch 1 is the
    precedent for how a sentinel return drifts a shrink-only DEBT ledger, and raising a
    ledger is maintainer-only.

The production-path half (ACCEPT Q2 → A)

check-filter-alias-parity.mjs, check-meta-type-normalized.mjs and
check-test-completeness.mjs also run their self-test on the production path and
discarded the result there — the same silence one seam over, and one the census never
drives because it only runs --self-test. Each now compares the sentinel on that path
too. Ablated by hand with the census's own injector, run with no--self-test on
the command line: baseline exit 0 / 0 / 3, mutated exit 1 / 1 / 1, each printing the
named refusal.

check-workspace-manifest-cycles.mjs is fixed but still NOT MEASURED

Its dispatch calls runSelfTest(), which wraps a selfTest() that returns a failure
list. The census picks an entry only when a file defines exactly one self-test-shaped
function or has an ENTRY_BY_HAND row; this file has two and no row, so it reads
NOT MEASURED (ambiguous entry) both before and after — the handshake is real, the
instrument just cannot see it.

Ablated by hand instead, with the census's own probeEarlyReturn:

  • entry runSelfTest (what the dispatch actually calls): baseline exit 0, mutated
    exit 1, head ✗ check-workspace-manifest-cycles self-test: runSelfTest() returned without reaching its verdict,HELD.
  • entry selfTest (what the census would pick if the ambiguity were resolved the
    wrong way): mutated exit 1 with a TypeError stack — an accident, not a handshake.

⚠️ The one-line 'scripts/check-workspace-manifest-cycles.mjs': 'runSelfTest' row that
would make this measurable lives in scripts/measure-self-test-floor.mjs, which is
outside this batch's declared file surface. It is not edited here; it is filed as
#14842 instead, with the two readings that say which entry the row must name.

Local verification

origin/main merged once more (a real merge, no rebase) before opening this PR. The gate
union was re-derived AFTER the final commit and run on that head, 61850abbf:

  • node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands,
    DG_EXIT 0, 24 paths vs merge base f3ae441fa, 47 families, every one run from
    --commands. Plus the dispatch-named check:declared-population-live, the
    any-edit check:nul-bytes, and scripts/pm/check-governed-queue-guard.mjs --self-test
    (that file is edited here and governed-surface-guard.yml runs it, but the derivation
    did not list it).
  • 51 RAN-PASS, 1 NOT MEASURED. The one is
    node scripts/check-test-completeness.mjs — exit 3, PREREQUISITE NOT MET (it grades a
    saved turbo run test log and none exists locally). Never read as a pass.
    node scripts/check-engine-split-ratio.mjs first came back exit 2 on the shallow
    clone; after git fetch --shallow-since=2026-05-29 origin it is exit 0 with a real
    ratio, so it counts as RAN-PASS.
  • pnpm check:pm-dispatch-gates ran to completion: dispatch-gates self-test: 1241 cases pass.
  • pnpm build exit 0. pnpm lint over the WHOLE repo, not narrowed: exit 0, 5779 files,
    0 errors, 0 warnings (counts read from --format json).
  • Every one of the 24 files runs its own --self-test to the SAME exit code and
    byte-identical output as before the change (captured before the codemod, again after,
    then diffed). One file differs on one nondeterministic field:
    release-rehearsal-clone.mjs prints an elapsed-milliseconds figure (115 ms vs
    102 ms).
  • pnpm check:nul-bytes exit 0, plus a direct control-byte sweep of the touched files:
    no match.

Every exit code above was captured by redirecting first and reading $? after — never
through a pipe.

skip-changeset: scripts/** only, nothing published from any package.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LAwHpn4uVuf4N1geBcD5i3


Generated by Claude Code

…spatch
Batch 2 of the #13798 remedy: the boundary-only PR #13797 shape, transplanted
to the 14 files the probe still reads DEFEATED and released by their holding
PRs, the six that hold today only by accident (a downstream TypeError or a
usage error, not a handshake), the three that also call their self-test on the
production path and discard the result, and check-workspace-manifest-cycles.mjs
(runSelfTest() shape, NOT MEASURED by the census for want of an ENTRY_BY_HAND
row, defeated in fact).
Two shapes, one per dispatch spelling, both from batch 1 verbatim:
- sentinel: the self-test returns SELF_TEST_VERDICT only after its verdict
line, and the dispatch refuses anything else (where the return value is
discarded);
- module-level `selfTestReachedVerdict` flag (where the self-test's own exit
code is load-bearing, or where it ends in process.exit and an appended
sentinel would be dead code).
Nothing inside any self-test body changes beyond the verdict marker on the line
after the success line.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LAwHpn4uVuf4N1geBcD5i3
…ng it
The handshake was placed after `const { passed, lines } = selfTest()`, so an
early return made the destructuring throw a TypeError before the check could
run — the very accident that made this gate read HELD without a handshake. The
census now reports the named refusal instead of a stack trace.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LAwHpn4uVuf4N1geBcD5i3
@claudeclaudeBot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 3, 2026
@claude

claudeBot commented Sep 3, 2026

Copy link
Copy Markdown
ContributorAuthor

PM status (domain:devx execution seat, session session_01LAwHpn4uVuf4N1geBcD5i3): reviewed and ACCEPTED on #13798 (batch-2 checklist there). Held as draft on one red check that is not this PR's:Validate Package Dependencies on 61850abbf — run 33719242879, job 100534794466 — fails only at step 12 "Audit dependencies for known vulnerabilities (OSV-Scanner)"; step 11 (this PR's own check-osv-exemptions.mjs --self-test + gate) passed. The workflow ran here because the PR edits scripts/check-osv-exemptions.mjs (path filter), and the scanner reads the base's lockfile, which still carries the four fast-uri advisories (#14732). The fix is PR #14783 (fast-uri 3.1.5 → 3.1.7), already in the merge queue. Plan: once #14783 lands, merge origin/main into this branch via update-branch (real merge commit), let the check re-run, then flip ready + arm. No re-run is requested for the red itself — it is deterministic on the current base.


Generated by Claude Code

@claude

claudeBot commented Sep 3, 2026

Copy link
Copy Markdown
ContributorAuthor

PM action (domain:devx seat, session session_01LAwHpn4uVuf4N1geBcD5i3, closing shift): update-branch issued 10:3xZ — PR #14783 (the fast-uri lift that clears Validate Package Dependencies on the base) MERGED 08:38Z as b69da43d5. Next sitter: on GREEN flip ready + arm; any red on a shard this diff does not touch ⇒ read the anchor #14822 first.


Generated by Claude Code

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

Labels

size/mskip-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

@baozhoutao@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

fix(scripts): give 24 more self-tests a verdict handshake at their dispatch (#13798 batch 2) - #14853

Merged
baozhoutao merged 4 commits into
mainfrom
claude/issue-13798-self-test-handshake-b2
Sep 3, 2026
Merged

fix(scripts): give 24 more self-tests a verdict handshake at their dispatch (#13798 batch 2)#14853
baozhoutao merged 4 commits into
mainfrom
claude/issue-13798-self-test-handshake-b2

Conversation

@claude

@claudeclaudeBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Part of #13798 (batch 2). Batch 1 is PR #14479, merged.

node scripts/measure-self-test-floor.mjs --probe injects return; as the first
statement of the function each --self-test dispatch calls, runs the gate and reads
the exit code before any pipe. Exit 0 is the defect: a self-test that never finished,
reported as one that passed.

What this batch does

The same boundary-only handshake batch 1 landed, transplanted to 24 more files. Two
shapes, one per dispatch spelling, both taken verbatim from the PR #13797 precedent:

  • sentinel (13 files) — selfTest() returns SELF_TEST_VERDICT only after its
    verdict line, and the dispatch refuses anything else. Used where the dispatch discards
    the return value. 10 files take it for the first time; the other 3 are the
    production-path additions below, on files that already carry the sentinel from batch 1.
  • module-level selfTestReachedVerdict flag (11 files) — used where the
    self-test's own exit code is load-bearing (process.exit(selfTest()),
    return selfTest(), the ternary form) or where the self-test already ends in
    process.exit and an appended sentinel would be dead code.

Nothing inside a self-test body changes beyond the verdict marker on the line after
the success line. The census's hole-1 floor classification is identical for all 165
files
before and after — the mechanical proof the remedy is boundary-only.

The probe, before and after

Measured on this branch's own merge base, not re-derived by hand.

populationDEFEATEDHELDNOT MEASURED
before (2d40f9146)165161436
after16521576

The 2 that remain are asserted equal as a set to the two files held by an open PR
and deliberately excluded here: scripts/check-type-check-coverage.mjs (PR #14805)
and scripts/pm/bare-root-worklist.mjs (PR #14800). Nothing else is left defeated.

14 of the 24 flipped DEFEATED -> HELD in the census. The other 10 are shapes the
census reads HELD or NOT MEASURED for reasons that are not a handshake, and each
carries its own evidence below.

The six that held only by accident

The card's own note: "5 gates hold today only by luck — a downstream TypeError or a
usage error, not a handshake."
The ACCEPT ruled them into this batch (Q1 → A). The
census verdict does not move for these (HELD before, HELD after), so the evidence is
the first line the mutated run prints — the accident replaced by the named refusal:

filemutated head, beforemutated head, after
check-osv-exemptions.mjsfile:///… (TypeError stack)the named refusal
typecheck-configs.mjsfile:///… (TypeError stack)the named refusal
check-exported-any-returns.mts/home/… (TypeError stack)the named refusal
checklist-select.mjsusage: node scripts/checklist-select.mjs … (exit 2)the named refusal
run-with-stall-guard.mjsrun-with-stall-guard: unknown option --self-testthe named refusal
check-page-declaration-shape.mjs(printed nothing, exit 1)the named refusal

check-osv-exemptions.mjs needed one extra line beyond the transplant, in its own
commit: its dispatch destructures the result (const { passed, lines } = selfTest()),
so on an early return the destructuring threw before the handshake could run — the
accident survived the first attempt, and the census said so. The result is now read
into a local first and destructured after the handshake.

Three traps this surface carries

  1. Unbraced branch bodies.} else if (argv.includes('--self-test')) selfTest();
    followed by else run(); needs braces, or the trailing else re-binds.
  2. The temporal dead zone.scripts/run-with-stall-guard.mjs dispatches at the top
    of the file, above the self-test definition; the flag is declared above the
    dispatch, not next to the function.
  3. A never return type.check-exported-any-returns.mts declares
    function selfTest(): never. It takes the flag rather than the sentinel precisely so
    the annotation does not have to move — check-test-typecheck.mts in batch 1 is the
    precedent for how a sentinel return drifts a shrink-only DEBT ledger, and raising a
    ledger is maintainer-only.

The production-path half (ACCEPT Q2 → A)

check-filter-alias-parity.mjs, check-meta-type-normalized.mjs and
check-test-completeness.mjs also run their self-test on the production path and
discarded the result there — the same silence one seam over, and one the census never
drives because it only runs --self-test. Each now compares the sentinel on that path
too. Ablated by hand with the census's own injector, run with no--self-test on
the command line: baseline exit 0 / 0 / 3, mutated exit 1 / 1 / 1, each printing the
named refusal.

check-workspace-manifest-cycles.mjs is fixed but still NOT MEASURED

Its dispatch calls runSelfTest(), which wraps a selfTest() that returns a failure
list. The census picks an entry only when a file defines exactly one self-test-shaped
function or has an ENTRY_BY_HAND row; this file has two and no row, so it reads
NOT MEASURED (ambiguous entry) both before and after — the handshake is real, the
instrument just cannot see it.

Ablated by hand instead, with the census's own probeEarlyReturn:

  • entry runSelfTest (what the dispatch actually calls): baseline exit 0, mutated
    exit 1, head ✗ check-workspace-manifest-cycles self-test: runSelfTest() returned without reaching its verdict,HELD.
  • entry selfTest (what the census would pick if the ambiguity were resolved the
    wrong way): mutated exit 1 with a TypeError stack — an accident, not a handshake.

⚠️ The one-line 'scripts/check-workspace-manifest-cycles.mjs': 'runSelfTest' row that
would make this measurable lives in scripts/measure-self-test-floor.mjs, which is
outside this batch's declared file surface. It is not edited here; it is filed as
#14842 instead, with the two readings that say which entry the row must name.

Local verification

origin/main merged once more (a real merge, no rebase) before opening this PR. The gate
union was re-derived AFTER the final commit and run on that head, 61850abbf:

  • node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands,
    DG_EXIT 0, 24 paths vs merge base f3ae441fa, 47 families, every one run from
    --commands. Plus the dispatch-named check:declared-population-live, the
    any-edit check:nul-bytes, and scripts/pm/check-governed-queue-guard.mjs --self-test
    (that file is edited here and governed-surface-guard.yml runs it, but the derivation
    did not list it).
  • 51 RAN-PASS, 1 NOT MEASURED. The one is
    node scripts/check-test-completeness.mjs — exit 3, PREREQUISITE NOT MET (it grades a
    saved turbo run test log and none exists locally). Never read as a pass.
    node scripts/check-engine-split-ratio.mjs first came back exit 2 on the shallow
    clone; after git fetch --shallow-since=2026-05-29 origin it is exit 0 with a real
    ratio, so it counts as RAN-PASS.
  • pnpm check:pm-dispatch-gates ran to completion: dispatch-gates self-test: 1241 cases pass.
  • pnpm build exit 0. pnpm lint over the WHOLE repo, not narrowed: exit 0, 5779 files,
    0 errors, 0 warnings (counts read from --format json).
  • Every one of the 24 files runs its own --self-test to the SAME exit code and
    byte-identical output as before the change (captured before the codemod, again after,
    then diffed). One file differs on one nondeterministic field:
    release-rehearsal-clone.mjs prints an elapsed-milliseconds figure (115 ms vs
    102 ms).
  • pnpm check:nul-bytes exit 0, plus a direct control-byte sweep of the touched files:
    no match.

Every exit code above was captured by redirecting first and reading $? after — never
through a pipe.

skip-changeset: scripts/** only, nothing published from any package.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LAwHpn4uVuf4N1geBcD5i3


Generated by Claude Code

…spatch
Batch 2 of the #13798 remedy: the boundary-only PR #13797 shape, transplanted
to the 14 files the probe still reads DEFEATED and released by their holding
PRs, the six that hold today only by accident (a downstream TypeError or a
usage error, not a handshake), the three that also call their self-test on the
production path and discard the result, and check-workspace-manifest-cycles.mjs
(runSelfTest() shape, NOT MEASURED by the census for want of an ENTRY_BY_HAND
row, defeated in fact).
Two shapes, one per dispatch spelling, both from batch 1 verbatim:
- sentinel: the self-test returns SELF_TEST_VERDICT only after its verdict
line, and the dispatch refuses anything else (where the return value is
discarded);
- module-level `selfTestReachedVerdict` flag (where the self-test's own exit
code is load-bearing, or where it ends in process.exit and an appended
sentinel would be dead code).
Nothing inside any self-test body changes beyond the verdict marker on the line
after the success line.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LAwHpn4uVuf4N1geBcD5i3
…ng it
The handshake was placed after `const { passed, lines } = selfTest()`, so an
early return made the destructuring throw a TypeError before the check could
run — the very accident that made this gate read HELD without a handshake. The
census now reports the named refusal instead of a stack trace.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LAwHpn4uVuf4N1geBcD5i3
@claudeclaudeBot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 3, 2026
@claude

claudeBot commented Sep 3, 2026

Copy link
Copy Markdown
ContributorAuthor

PM status (domain:devx execution seat, session session_01LAwHpn4uVuf4N1geBcD5i3): reviewed and ACCEPTED on #13798 (batch-2 checklist there). Held as draft on one red check that is not this PR's:Validate Package Dependencies on 61850abbf — run 33719242879, job 100534794466 — fails only at step 12 "Audit dependencies for known vulnerabilities (OSV-Scanner)"; step 11 (this PR's own check-osv-exemptions.mjs --self-test + gate) passed. The workflow ran here because the PR edits scripts/check-osv-exemptions.mjs (path filter), and the scanner reads the base's lockfile, which still carries the four fast-uri advisories (#14732). The fix is PR #14783 (fast-uri 3.1.5 → 3.1.7), already in the merge queue. Plan: once #14783 lands, merge origin/main into this branch via update-branch (real merge commit), let the check re-run, then flip ready + arm. No re-run is requested for the red itself — it is deterministic on the current base.


Generated by Claude Code

@claude

claudeBot commented Sep 3, 2026

Copy link
Copy Markdown
ContributorAuthor

PM action (domain:devx seat, session session_01LAwHpn4uVuf4N1geBcD5i3, closing shift): update-branch issued 10:3xZ — PR #14783 (the fast-uri lift that clears Validate Package Dependencies on the base) MERGED 08:38Z as b69da43d5. Next sitter: on GREEN flip ready + arm; any red on a shard this diff does not touch ⇒ read the anchor #14822 first.


Generated by Claude Code

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

Labels

size/mskip-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

@baozhoutao@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

fix(scripts): give 24 more self-tests a verdict handshake at their dispatch (#13798 batch 2) - #14853

Merged
baozhoutao merged 4 commits into
mainfrom
claude/issue-13798-self-test-handshake-b2
Sep 3, 2026
Merged

fix(scripts): give 24 more self-tests a verdict handshake at their dispatch (#13798 batch 2)#14853
baozhoutao merged 4 commits into
mainfrom
claude/issue-13798-self-test-handshake-b2

Conversation

@claude

@claudeclaudeBot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Part of #13798 (batch 2). Batch 1 is PR #14479, merged.

node scripts/measure-self-test-floor.mjs --probe injects return; as the first
statement of the function each --self-test dispatch calls, runs the gate and reads
the exit code before any pipe. Exit 0 is the defect: a self-test that never finished,
reported as one that passed.

What this batch does

The same boundary-only handshake batch 1 landed, transplanted to 24 more files. Two
shapes, one per dispatch spelling, both taken verbatim from the PR #13797 precedent:

  • sentinel (13 files) — selfTest() returns SELF_TEST_VERDICT only after its
    verdict line, and the dispatch refuses anything else. Used where the dispatch discards
    the return value. 10 files take it for the first time; the other 3 are the
    production-path additions below, on files that already carry the sentinel from batch 1.
  • module-level selfTestReachedVerdict flag (11 files) — used where the
    self-test's own exit code is load-bearing (process.exit(selfTest()),
    return selfTest(), the ternary form) or where the self-test already ends in
    process.exit and an appended sentinel would be dead code.

Nothing inside a self-test body changes beyond the verdict marker on the line after
the success line. The census's hole-1 floor classification is identical for all 165
files
before and after — the mechanical proof the remedy is boundary-only.

The probe, before and after

Measured on this branch's own merge base, not re-derived by hand.

populationDEFEATEDHELDNOT MEASURED
before (2d40f9146)165161436
after16521576

The 2 that remain are asserted equal as a set to the two files held by an open PR
and deliberately excluded here: scripts/check-type-check-coverage.mjs (PR #14805)
and scripts/pm/bare-root-worklist.mjs (PR #14800). Nothing else is left defeated.

14 of the 24 flipped DEFEATED -> HELD in the census. The other 10 are shapes the
census reads HELD or NOT MEASURED for reasons that are not a handshake, and each
carries its own evidence below.

The six that held only by accident

The card's own note: "5 gates hold today only by luck — a downstream TypeError or a
usage error, not a handshake."
The ACCEPT ruled them into this batch (Q1 → A). The
census verdict does not move for these (HELD before, HELD after), so the evidence is
the first line the mutated run prints — the accident replaced by the named refusal:

filemutated head, beforemutated head, after
check-osv-exemptions.mjsfile:///… (TypeError stack)the named refusal
typecheck-configs.mjsfile:///… (TypeError stack)the named refusal
check-exported-any-returns.mts/home/… (TypeError stack)the named refusal
checklist-select.mjsusage: node scripts/checklist-select.mjs … (exit 2)the named refusal
run-with-stall-guard.mjsrun-with-stall-guard: unknown option --self-testthe named refusal
check-page-declaration-shape.mjs(printed nothing, exit 1)the named refusal

check-osv-exemptions.mjs needed one extra line beyond the transplant, in its own
commit: its dispatch destructures the result (const { passed, lines } = selfTest()),
so on an early return the destructuring threw before the handshake could run — the
accident survived the first attempt, and the census said so. The result is now read
into a local first and destructured after the handshake.

Three traps this surface carries

  1. Unbraced branch bodies.} else if (argv.includes('--self-test')) selfTest();
    followed by else run(); needs braces, or the trailing else re-binds.
  2. The temporal dead zone.scripts/run-with-stall-guard.mjs dispatches at the top
    of the file, above the self-test definition; the flag is declared above the
    dispatch, not next to the function.
  3. A never return type.check-exported-any-returns.mts declares
    function selfTest(): never. It takes the flag rather than the sentinel precisely so
    the annotation does not have to move — check-test-typecheck.mts in batch 1 is the
    precedent for how a sentinel return drifts a shrink-only DEBT ledger, and raising a
    ledger is maintainer-only.

The production-path half (ACCEPT Q2 → A)

check-filter-alias-parity.mjs, check-meta-type-normalized.mjs and
check-test-completeness.mjs also run their self-test on the production path and
discarded the result there — the same silence one seam over, and one the census never
drives because it only runs --self-test. Each now compares the sentinel on that path
too. Ablated by hand with the census's own injector, run with no--self-test on
the command line: baseline exit 0 / 0 / 3, mutated exit 1 / 1 / 1, each printing the
named refusal.

check-workspace-manifest-cycles.mjs is fixed but still NOT MEASURED

Its dispatch calls runSelfTest(), which wraps a selfTest() that returns a failure
list. The census picks an entry only when a file defines exactly one self-test-shaped
function or has an ENTRY_BY_HAND row; this file has two and no row, so it reads
NOT MEASURED (ambiguous entry) both before and after — the handshake is real, the
instrument just cannot see it.

Ablated by hand instead, with the census's own probeEarlyReturn:

  • entry runSelfTest (what the dispatch actually calls): baseline exit 0, mutated
    exit 1, head ✗ check-workspace-manifest-cycles self-test: runSelfTest() returned without reaching its verdict,HELD.
  • entry selfTest (what the census would pick if the ambiguity were resolved the
    wrong way): mutated exit 1 with a TypeError stack — an accident, not a handshake.

⚠️ The one-line 'scripts/check-workspace-manifest-cycles.mjs': 'runSelfTest' row that
would make this measurable lives in scripts/measure-self-test-floor.mjs, which is
outside this batch's declared file surface. It is not edited here; it is filed as
#14842 instead, with the two readings that say which entry the row must name.

Local verification

origin/main merged once more (a real merge, no rebase) before opening this PR. The gate
union was re-derived AFTER the final commit and run on that head, 61850abbf:

  • node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands,
    DG_EXIT 0, 24 paths vs merge base f3ae441fa, 47 families, every one run from
    --commands. Plus the dispatch-named check:declared-population-live, the
    any-edit check:nul-bytes, and scripts/pm/check-governed-queue-guard.mjs --self-test
    (that file is edited here and governed-surface-guard.yml runs it, but the derivation
    did not list it).
  • 51 RAN-PASS, 1 NOT MEASURED. The one is
    node scripts/check-test-completeness.mjs — exit 3, PREREQUISITE NOT MET (it grades a
    saved turbo run test log and none exists locally). Never read as a pass.
    node scripts/check-engine-split-ratio.mjs first came back exit 2 on the shallow
    clone; after git fetch --shallow-since=2026-05-29 origin it is exit 0 with a real
    ratio, so it counts as RAN-PASS.
  • pnpm check:pm-dispatch-gates ran to completion: dispatch-gates self-test: 1241 cases pass.
  • pnpm build exit 0. pnpm lint over the WHOLE repo, not narrowed: exit 0, 5779 files,
    0 errors, 0 warnings (counts read from --format json).
  • Every one of the 24 files runs its own --self-test to the SAME exit code and
    byte-identical output as before the change (captured before the codemod, again after,
    then diffed). One file differs on one nondeterministic field:
    release-rehearsal-clone.mjs prints an elapsed-milliseconds figure (115 ms vs
    102 ms).
  • pnpm check:nul-bytes exit 0, plus a direct control-byte sweep of the touched files:
    no match.

Every exit code above was captured by redirecting first and reading $? after — never
through a pipe.

skip-changeset: scripts/** only, nothing published from any package.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LAwHpn4uVuf4N1geBcD5i3


Generated by Claude Code

…spatch
Batch 2 of the #13798 remedy: the boundary-only PR #13797 shape, transplanted
to the 14 files the probe still reads DEFEATED and released by their holding
PRs, the six that hold today only by accident (a downstream TypeError or a
usage error, not a handshake), the three that also call their self-test on the
production path and discard the result, and check-workspace-manifest-cycles.mjs
(runSelfTest() shape, NOT MEASURED by the census for want of an ENTRY_BY_HAND
row, defeated in fact).
Two shapes, one per dispatch spelling, both from batch 1 verbatim:
- sentinel: the self-test returns SELF_TEST_VERDICT only after its verdict
line, and the dispatch refuses anything else (where the return value is
discarded);
- module-level `selfTestReachedVerdict` flag (where the self-test's own exit
code is load-bearing, or where it ends in process.exit and an appended
sentinel would be dead code).
Nothing inside any self-test body changes beyond the verdict marker on the line
after the success line.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LAwHpn4uVuf4N1geBcD5i3
…ng it
The handshake was placed after `const { passed, lines } = selfTest()`, so an
early return made the destructuring throw a TypeError before the check could
run — the very accident that made this gate read HELD without a handshake. The
census now reports the named refusal instead of a stack trace.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LAwHpn4uVuf4N1geBcD5i3
@claudeclaudeBot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 3, 2026
@claude

claudeBot commented Sep 3, 2026

Copy link
Copy Markdown
ContributorAuthor

PM status (domain:devx execution seat, session session_01LAwHpn4uVuf4N1geBcD5i3): reviewed and ACCEPTED on #13798 (batch-2 checklist there). Held as draft on one red check that is not this PR's:Validate Package Dependencies on 61850abbf — run 33719242879, job 100534794466 — fails only at step 12 "Audit dependencies for known vulnerabilities (OSV-Scanner)"; step 11 (this PR's own check-osv-exemptions.mjs --self-test + gate) passed. The workflow ran here because the PR edits scripts/check-osv-exemptions.mjs (path filter), and the scanner reads the base's lockfile, which still carries the four fast-uri advisories (#14732). The fix is PR #14783 (fast-uri 3.1.5 → 3.1.7), already in the merge queue. Plan: once #14783 lands, merge origin/main into this branch via update-branch (real merge commit), let the check re-run, then flip ready + arm. No re-run is requested for the red itself — it is deterministic on the current base.


Generated by Claude Code

@claude

claudeBot commented Sep 3, 2026

Copy link
Copy Markdown
ContributorAuthor

PM action (domain:devx seat, session session_01LAwHpn4uVuf4N1geBcD5i3, closing shift): update-branch issued 10:3xZ — PR #14783 (the fast-uri lift that clears Validate Package Dependencies on the base) MERGED 08:38Z as b69da43d5. Next sitter: on GREEN flip ready + arm; any red on a shard this diff does not touch ⇒ read the anchor #14822 first.


Generated by Claude Code

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

Labels

size/mskip-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

@baozhoutao@claude