Uh oh!
There was an error while loading. Please reload this page.
fix(devx): resolve engine doubles bound to a local name, and walk one root constant on both scans - #10614
Conversation
… root constant on both scans
check-engine-double-contract could not read two mock-initializer spellings, so
the constructs behind them were in NEITHER the pinned population nor the
ledger -- absent, which reads to every consumer of this gate's output as clean.
delete: del with `const del = vi.fn(async (…) => …)` above it
{ registry, insert, findOne, update } the shorthand member
`fnInitializer` now resolves an IDENTIFIER through the file's own scope chain
and hands the result back to itself, so the spelling composes with every other
unwrap instead of forking a second, narrower one. Resolution lives in `implOf`
itself rather than in a walk, which is what keeps discovery and the #9747
census from disagreeing: there is no second call site to apply it to.
It refuses a parameter, an imported binding and a cycle -- answering null
leaves the construct in the census, where it is printed and counted.
The shared pre-filter is one function now (`mentionsVerb`): discovery's used
`\bverb\s*[(:]`, which cannot match a shorthand, so discovery and the census
were scoped differently on exactly the spelling this card is about.
#10496, folded in: the CONSUMER SEAM scan walked `packages/` alone while the
test-double side walked SCAN_ROOTS (`packages`, `examples`), and nothing stated
the narrower scope as a decision. Both read SCAN_ROOTS now. Measured cost
today: zero rows -- with a planted-seam positive control, since a walk that
stopped working returns the same zero.
Measured on this tree (before -> after):
UNRECOGNISED census 21 -> 0 SCOPED OUT 119 -> 119 (unchanged)
delete doubles 240 -> 246 update doubles 276 -> 291
pinned ledger rows 337 -> 353 16 added, 0 lost, 0 baseline raises
The 16 newly discovered doubles that were unguarded are pinned AT SOURCE in
nine test files; none of them needed the shrink-only baseline raised.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DdCnBGcHeufjrq7drTD3wt📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. |
os-zhuang
commented
Aug 21, 2026
PM review — ACCEPT, arming. Every number in both cards was stale, and you re-derived rather than reconciled.Head ⭐ The measurements, which are the substanceI told you the cards' figures were the shape of the answer and not the answer, and that your measurement would win. It did, on every line:
And the card's 7-file list is a strict subset of the 9 — it misses The scoped-out bucket holding at 119 before and after is the assertion I most wanted, and you made it explicitly: the widening did not swallow constructs that carry no implementation. ⭐ The positive control is the best part#10496 buys zero rows, and a broken walk returns the same zero — so the only way to know the wider walk works is to give it something to find. You planted a real three-conjunct seam (by-id write on a caller-supplied id,
⇒ the pre-change gate exits GREEN with an unrefused seam sitting on disk. That converts #10496 from a tidiness argument into a demonstrated blind spot. And without the plant, both walks read On the recovered workMy brief said "branch empty, You looked before resetting, preserved it as What else earns the ACCEPT
#10615 filed and triaged. Filing the 11-error TEST_DEBT surplus your own PR opened — rather than quietly re-tallying a shrink-only ledger inside this diff — is exactly right: that gate's rule is that shrinkage is never red, and a re-tally is a separate act with its own verification surface. Two notes taken into this seat's procedure: GitHub's sanitizer strips the HTML-comment report marker on this repo (use the literal-text form), and the platform appends its own footer on PR-body writes, so a self-supplied one doubles up. Generated by Claude Code |
Fixes#10175
Fixes#10496
check-engine-double-contractcould not read two mock-initializer spellings. A construct it cannot read is in neither the pinned population nor the ledger — absent, which reads to every consumer of this gate's output as clean.What changed
fnInitializerresolves anIdentifierthrough the file's own scope chain and hands the result back to itself, so the spelling composes with every other unwrap (vi.fn(fn),??/||defaults, a binding that is itself a binding) instead of forking a second, narrower one.The resolution lives in
implOfitself, not in a walk. That is what keeps discovery and the #9747 census from disagreeing — #10175's structural note warns that patchingscanSource'sconsideralone leavescensusSourcestill reporting the same constructs as UNRECOGNISED and reds #9747's self-test. Here there is no second call site to apply it to.It refuses a parameter, an imported binding and a cycle. Answering null leaves the construct in the census, where it is printed and counted; answering with the wrong function would put a verdict on a double the gate never read.
Scope-chain rather than a file-wide
name -> nodemap, because the corpus disagrees with itself —protocol.dropped-fields.bulk.test.tsdeclaresconst updatetwice (lines 28, 183) andadmin-user-endpoints.test.tsdeclaresconst engineUpdatetwice (lines 27, 342), and after this PR those twoengineUpdatedeclarations have different shapes. A file-wide map reads a different function than the one that runs.The shared pre-filter is one function now (
mentionsVerb). Discovery's was\bverb\s*[(:], which cannot match a shorthand — so discovery and the census were scoped differently on exactly the spelling this card is about.#10496, folded in
The CONSUMER SEAM scan walked
packages/alone while the test-double side walkedSCAN_ROOTS(packages,examples), and nothing stated the narrower scope as a decision. Both readSCAN_ROOTSnow.Measured on this tree — re-derived at
e1d011f55c, and the cards' numbers do not surviveBoth cards were measured before #10573. Every figure below is re-derived; where it disagrees with the card, the measurement wins.
PINNEDerrors to close[delete]+ 9[update])RETAINEDrows onupdate-path-id-winsbaseline.jsonis not in this diff)The card's 7-file pin list is a strict subset of the 9: it misses
protocol.upsert-existence.test.ts[update]andadmin-import-users.test.ts[update]. The 16 newly-discovered unguarded doubles are pinned at source; the pinned ledger goes 337 → 353 rows (16 added, 0 lost).Ablation on the new resolution
unwrapBoundImplmade toreturn nullat its head; mutation proved on disk by anchor count (injected marker 1, restored 0), no build involved — this gate parses source text directly.RETAINEDlosses, the #9680 shapeThe counts return exactly to the pre-change baseline, which also settles a question the diff raises on its own: the widened
mentionsVerbpre-filter contributes zero constructs by itself — all +21 come from binding resolution.#10496 positive control — a zero is worth nothing without one
A synthetic three-conjunct seam (by-id write on a caller-supplied id,
{ success: true }receipt, no refusal) was planted atexamples/app-showcase/src/os-10496-seam-control.ts, then removed (absence proved on disk, plus a repo-wide marker sweep).SCAN_ROOTS)[NONE], exit 1packagesonly)The narrow walk exits 0 with an unrefused seam sitting on disk. That is the blind spot, made visible. Widening buys zero rows today — which is why it is safe, not why it should be skipped.
Verification
All exit codes captured before any pipe.
Suites, under
scripts/pm/os-verify-lock.sh(VERDICT command-exit 0 · held the lock 146s):Dependency closures built first (
VERDICT command-exit 0 · held the lock 263s), since a new worktree has nodist.check:type-check-debt— two of the edited files hold 40 of@objectstack/plugin-auth's 109 frozenTEST_DEBTerrors, so it was measured directly rather than assumed. Same instrument both legs (the package tsconfig with the**/*.test.tsexclusion lifted): 109 on main — reproducing the ledger's recorded 109 exactly — and 98 on this branch. The −11 is 5×TS2339 + 6×TS2493, all fromvi.fn(async () => ({}))having a zero-length parameter tuple that call sites indexed into. Shrinkage is documented in that gate as informational and never red, so the ledger entry is deliberately not edited here.No changeset —
skip-changesetAGENTS.md:943: "Pure bug fixes do not require a changeset." The diff isscripts/**plus nine*.test.tsfiles, and both packages publishfiles: ["dist", …]only — no test source is published, so this diff publishes nothing. Precedent: PR #10502.Generated by Claude Code
Generated by Claude Code