Skip to content

check-engine-double-contract still cannot read 21 constructs at the local-binding and shorthand spellings — measured at 7 files needing a pin, 0 needing a baseline raise #10175

Description

@os-zhuang

Filed unassigned by the dev seat working #9877, whose PR takes the first of the
three spellings that card names (the ?? / || default) and deliberately narrows away
from the other two. This is the remainder, with the price measured rather than estimated.

What is left

After #9877's PR, UNRECOGNISED stands at 21, in two spellings — both of which need
localFunctions-style resolution rather than a one-line unwrap:

spellingcountexample
the initializer roots at a binding the file declares7delete: del, with const del = vi.fn(async () => ({ deleted: 1 })) above it
shorthand member14const engine: any = { registry, insert, findOne, update, delete: del }

The price, measured on claude/issue-9877-engine-double-recogniser

Measured with a throwaway probe that resolved an Identifier initializer and a
ShorthandPropertyAssignment through the file's own bindings, then reverted. Numbers
from the gate's own output, not from a hand count:

  • +10 constructs enter the discovered population (delete 232 → 238, update 265 → 269).
  • 7 PINNED errors, in 7 files, all pinnable at source:
    • packages/metadata-protocol/src/protocol.batch-atomic.test.ts[delete]
    • packages/metadata-protocol/src/protocol.batch-not-attempted.test.ts[delete]
    • packages/metadata-protocol/src/protocol.bulk-record-not-found.test.ts[delete]
    • packages/metadata-protocol/src/protocol.many-data-atomic.test.ts[delete]
    • packages/metadata-protocol/src/protocol.record-not-found.test.ts[delete]
    • packages/metadata-protocol/src/protocol.dropped-fields.bulk.test.ts[update]
    • packages/plugins/plugin-auth/src/admin-user-endpoints.test.ts[update]
  • 2 further RETAINED rows on protocol.update-path-id-wins.test.ts — new pinned
    coverage the ledger has to learn, i.e. a --write, not a problem.
  • 0 of them require raising the shrink-only baseline. That is the headline: the
    guardrail that made check-engine-double-contract cannot read three mock-initializer spellings, and one of them hides a live unguarded engine delete double #9877 expensive does not bind here either. This is pinning work in
    two packages, not a ratchet negotiation.

Why it was not folded into #9877's PR

Ruling on that dispatch was "pin the newly-visible doubles, or narrow the widening to
what you can pin
". The ?? half is two constructs in one file and was pinned outright;
this half is seven test files across two packages, each needing the dispatch predicate
wired into a fake whose call shapes those suites drive deliberately (not-attempted,
record-not-found, bulk) — a different act with its own verification surface.

One structural note for whoever takes it

⛔ Do not do what the probe did. It patched scanSource's consider only, which left
censusSource still reporting the same constructs as UNRECOGNISED — discovery and the
census then disagree, and #9747's self-test asserts they agree. The real change moves
implOf itself, which means threading the SourceFile (or a resolved binding map) into
it and through both walks. That is the reason this is not a one-line follow-up.

node scripts/check-engine-double-contract.mjs --census (added by #9943's commit on the
same PR) prints the per-kind read rates, so the 34 identifier and 21 shorthand members
are re-derivable rather than quoted from this card.

Related: #9877 (parent) · #8639 (the same blind half at vi.fn(fn)) · #9747 (the census
that made this countable)


Generated by Claude Code

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions