You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[engine-double-contract] Pin the 29 baseline entries #8639 first-measured — each needs a signature widening, a tripwire judgement, a body conversion, or one devDependency #8651
#8639 taught implOf to unwrap a mock constructor's sole function argument, which moved check-engine-double-contract's discovery from 379 doubles to 435. Of the 56 newly discovered
engine-shaped doubles, 21 were pinned in that PR — every one whose pin was a single call —
and 29 (file, verb) pairs entered scripts/engine-double-contract.baseline.json as first
measurements. This card is the remainder.
Same shape as #5855, which closed the six entries #5619's sinking had unlocked.
Why each was not pinned in the same pass, measured
The 29 pairs fall into four classes, and the class is what decides the work:
Signature widening (the bulk). The implementation declares fewer than two parameters, so it
has no binding to hand the predicate — delete: vi.fn(async () => ({ deleted: 1 })). A pin
must first add the options bag / payload the fake omits, which changes the double rather than
routing it. Mostly packages/metadata-protocol/src/seed-loader-*.test.ts.
Deliberate tripwire doubles.protocol.validate-data.test.ts and two doubles in seed-loader-driver-text.test.ts open their body by throwing, because the test asserts the path
performs no write at all. Routing them through the predicate changes which error the assertion
sees, so pinning needs the author's intent read, not a mechanical insert.
Concise arrow bodies.protocol.dropped-fields.test.ts and seed-loader-env-scope.test.ts
have expression-bodied arrows — no statement list to insert in front of, so the body must be
converted to a block first.
@objectstack/mcp (6 pairs). The package depends on neither@objectstack/metadata-core nor@objectstack/objectql, so a pin is not one call: it needs a devDependency first. Those
implementations also declare no parameters, so they need widening too.
Notes for whoever takes it
Each baseline entry already carries its own why and closes naming its specific obstacle.
These entries are first measurements, not a raised ratchet — the doubles were always there,
the scan could not reach them. Removing an entry is the ratchet tightening, squarely the
author's job; the baseline is shrink-only and the checker reconciles in both directions, so a
pinned double's entry must be deleted in the same PR.
Worth doing per package rather than in one sweep: each pin can flip a suite red, and a red here
is a real finding (exercised looseness), not a nuisance to be worked around.
Follow-up to #8639 (PR #8650). Filed unassigned; nobody is on it.
Blocked-by: #8639
#8639 taught
implOfto unwrap a mock constructor's sole function argument, which movedcheck-engine-double-contract's discovery from 379 doubles to 435. Of the 56 newly discoveredengine-shaped doubles, 21 were pinned in that PR — every one whose pin was a single call —
and 29 (file, verb) pairs entered
scripts/engine-double-contract.baseline.jsonas firstmeasurements. This card is the remainder.
Same shape as #5855, which closed the six entries #5619's sinking had unlocked.
Why each was not pinned in the same pass, measured
The 29 pairs fall into four classes, and the class is what decides the work:
has no binding to hand the predicate —
delete: vi.fn(async () => ({ deleted: 1 })). A pinmust first add the options bag / payload the fake omits, which changes the double rather than
routing it. Mostly
packages/metadata-protocol/src/seed-loader-*.test.ts.protocol.validate-data.test.tsand two doubles inseed-loader-driver-text.test.tsopen their body by throwing, because the test asserts the pathperforms no write at all. Routing them through the predicate changes which error the assertion
sees, so pinning needs the author's intent read, not a mechanical insert.
protocol.dropped-fields.test.tsandseed-loader-env-scope.test.tshave expression-bodied arrows — no statement list to insert in front of, so the body must be
converted to a block first.
@objectstack/mcp(6 pairs). The package depends on neither@objectstack/metadata-corenor
@objectstack/objectql, so a pin is not one call: it needs a devDependency first. Thoseimplementations also declare no parameters, so they need widening too.
Notes for whoever takes it
whyandclosesnaming its specific obstacle.the scan could not reach them. Removing an entry is the ratchet tightening, squarely the
author's job; the baseline is shrink-only and the checker reconciles in both directions, so a
pinned double's entry must be deleted in the same PR.
is a real finding (exercised looseness), not a nuisance to be worked around.