Uh oh!
There was an error while loading. Please reload this page.
test(engine-double-contract): pin the 29 baseline entries #8639 first-measured - #8987
Conversation
…-measured Fixes#8651#8639 widened this gate's discovery — `implOf` learned to unwrap a call-expression initializer, so every double spelling its write verb `vi.fn(async …)` became visible (379 → 435 doubles, +56, 0 lost). 21 of the newly visible engine-shaped doubles were pinned in #8639's own PR: every one whose pin was a single call. The other 29 (file, verb) pairs each needed more than a one-line insert and were carried as `MEASURED (#8639)` baseline entries naming their specific obstacle. This closes all 29 and deletes their entries in the same PR, which is what the shrink-only rule requires of a pin. A first measurement is not a raised ratchet, and removing these entries is the ratchet tightening: 270 → 301 pinned, 162 → 133 in the DEBT ledger, 2 exempt unchanged. The checker reconciles in BOTH directions, so the pins and the deletions had to land together. ## The four classes, and what each needed **Signature widening (16 entries, 12 files).** The impl declared fewer than two parameters, so it had no binding to hand the predicate (`delete: vi.fn(async () => ({ deleted: 1 }))`). Widened to `(_objectName: string, options?: any)` and opened with `assertEngineDeleteDispatch(options)`: the ten uniform `packages/metadata-protocol/src/seed-loader-*.test.ts` deletes, `packages/runtime/src/seed-loader.test.ts`, `packages/objectql/src/protocol-meta-type-canonicalization.test.ts`, `packages/metadata-protocol/src/protocol.lock-gate-fail-closed.test.ts` (both verbs), and `packages/plugins/plugin-auth/src/auth-manager.test.ts` (both verbs — the `sys_member` reader stand-in). **Concise arrow bodies (3 entries, 2 files).** Expression-bodied arrows with no statement list: `protocol.dropped-fields.test.ts` and `seed-loader-env-scope.test.ts` were converted to block bodies first, then pinned. **Deliberate tripwire doubles (4 entries, 2 files).** `protocol.validate-data.test.ts` (both verbs) and the two `update` doubles in `seed-loader-driver-text.test.ts` open by throwing, because the test asserts the path performs no write at all. The predicate is inserted AHEAD of the throw, which preserves the assertion's meaning in both directions: on a passing suite the body still never runs, and a call that did arrive still fails the test — only WHICH of the two errors it raises could differ, and nothing in either file asserts on that text. Measured rather than assumed: both suites are green, so the seed loader's real pass-2 back-fill `update` satisfies `ObjectQL.update`'s dispatch contract rather than merely being tolerated by a looser double. **`@objectstack/mcp` (6 entries, 3 files).** The package depended on neither home of the predicate, so `@objectstack/metadata-core` is added as a devDependency (no cycle — metadata-core does not depend on mcp), and the three doubles needed widening on top. ## Two follow-on edits the gates asked for `packages/mcp/vitest.config.ts` is NEW. The devDependency above is a value import, and `@objectstack/metadata-core` resolves through its `exports` to `dist/`, so `pnpm check:test-source-alias` correctly failed: without an alias these pins would judge metadata-core's build artifact rather than the source in the checkout — a dist merely BEHIND rather than missing the predicate would let every new pin run green against its old behaviour. One anchored array-form entry, matching `plugin-sharing`'s shape. The baseline's `$comment` closing paragraph asserted that 29 `MEASURED (#8639)` entries exist "below". All 29 are gone, so it is rewritten to record the batch as closed while keeping the discovery history that makes 379 → 435 readable to the next author. ## Verification Every affected package's own suite, on this branch after a full `pnpm build` (exit status, not just output): | package | files | tests | exit | |---|---|---|---| | @objectstack/metadata-protocol | 106 | 1512 | 0 | | @objectstack/mcp | 19 | 200 | 0 | | @objectstack/objectql | 211 | 3721 | 0 | | @objectstack/plugin-auth | 54 | 1250 | 0 | | @objectstack/runtime | 165 | 2456 | 0 | No pin turned a suite red. mcp was re-run after the alias landed, so its 200 tests are a verdict about metadata-core's source. Gates, derived from the changed paths with `scripts/pm/dispatch-gates.mjs`: `check:engine-double-contract` 0, `check:nul-bytes` 0, `check:cross-package-test-inputs` 0, `check:durability-log-level` 0, `check:test-source-alias` 0 (1 before the vitest config, 0 after), `check:type-source-resolution` 0, `check:query-options-erasure` 0, `check:type-check-coverage` 0, `check:type-check-debt --re-measure` 0, `check-engine-split-ratio` 0. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VRfF9Cmb2oTwan7jNoV2ce
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
📓 Docs Drift CheckThis PR changes 1 package(s): 11 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
⛔ 1 release-owned page(s) also reference the affected code. These are read-only:
|
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 31926760953 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 失败的 job(日志抽取,best effort):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
os-project-manager
commented
Aug 16, 2026
分诊:本 PR 的队列失败是同批次连带,不是本 PR 的缺陷,也不是 flaky队列构建 实测三条,足以定性
⇒ 本 PR 的改动面(测试文件、 真正的来源PR #8983 重写了 本 PR 的队列候选是叠在 #8983 之上构建的(grouped queue),于是继承了那份坏掉的
|
Fixes#8651
#8639 widened this gate's discovery —
implOflearned to unwrap a call-expression initializer, so every double spelling its write verbvi.fn(async …)became visible (379 → 435 doubles, +56, 0 lost). 21 of the newly visible engine-shaped doubles were pinned in #8639's own PR: every one whose pin was a single call. The other 29 (file, verb) pairs each needed more than a one-line insert and were carried asMEASURED (#8639)baseline entries naming their specific obstacle. This closes all 29 and deletes their entries in the same PR, which is what the shrink-only rule requires of a pin.A first measurement is not a raised ratchet, and removing these entries is the ratchet tightening: 270 → 301 pinned, 162 → 133 in the DEBT ledger, 2 exempt unchanged. The checker reconciles in BOTH directions, so the pins and the deletions had to land together.
The four classes, and what each needed
Signature widening (17 entries, 15 files). The impl declared fewer than two parameters, so it had no binding to hand the predicate (
delete: vi.fn(async () => ({ deleted: 1 }))). Widened to(_objectName: string, options?: any)and opened withassertEngineDeleteDispatch(options): the ten uniformpackages/metadata-protocol/src/seed-loader-*.test.tsdeletes,seed-loader-driver-text.test.ts's twodeletedoubles,packages/runtime/src/seed-loader.test.ts,packages/objectql/src/protocol-meta-type-canonicalization.test.ts,packages/metadata-protocol/src/protocol.lock-gate-fail-closed.test.ts(both verbs), andpackages/plugins/plugin-auth/src/auth-manager.test.ts(both verbs — thesys_memberreader stand-in).Concise arrow bodies (3 entries, 2 files). Expression-bodied arrows with no statement list:
protocol.dropped-fields.test.tsandseed-loader-env-scope.test.tswere converted to block bodies first, then pinned.Deliberate tripwire doubles (3 entries, 2 files).
protocol.validate-data.test.ts(both verbs) and the twoupdatedoubles inseed-loader-driver-text.test.tsopen by throwing, because the test asserts the path performs no write at all. The predicate is inserted AHEAD of the throw, which preserves the assertion's meaning in both directions: on a passing suite the body still never runs, and a call that did arrive still fails the test — only WHICH of the two errors it raises could differ, and nothing in either file asserts on that text. Measured rather than assumed: both suites are green, so the seed loader's real pass-2 back-fillupdatesatisfiesObjectQL.update's dispatch contract rather than merely being tolerated by a looser double.@objectstack/mcp(6 entries, 3 files). The package depended on neither home of the predicate, so@objectstack/metadata-coreis added as a devDependency (no cycle — metadata-core does not depend on mcp), and the three doubles needed widening on top.Two follow-on edits the gates asked for
packages/mcp/vitest.config.tsis NEW. The devDependency above is a value import, and@objectstack/metadata-coreresolves through itsexportstodist/, sopnpm check:test-source-aliascorrectly failed: without an alias these pins would judge metadata-core's build artifact rather than the source in the checkout — a dist merely BEHIND rather than missing the predicate would let every new pin run green against its old behaviour. One anchored array-form entry, matchingplugin-sharing's shape.The baseline's
$commentclosing paragraph asserted that 29MEASURED (#8639)entries exist "below". All 29 are gone, so it is rewritten to record the batch as closed while keeping the discovery history that makes 379 → 435 readable to the next author.Verification
Every affected package's own suite, on this branch after a full
pnpm build(exit status, not just output):No pin turned a suite red. mcp was re-run after the alias landed, so its 200 tests are a verdict about metadata-core's source.
Gates, derived from the changed paths with
scripts/pm/dispatch-gates.mjs:check:engine-double-contract0,check:nul-bytes0,check:cross-package-test-inputs0,check:durability-log-level0,check:test-source-alias0 (1 before the vitest config, 0 after),check:type-source-resolution0,check:query-options-erasure0,check:type-check-coverage0,check:type-check-debt --re-measure0,check-engine-split-ratio0.PM verification before opening
This PR was opened by the
domain:devxPM seat because the implementing session had a blanket GitHub API 403 (git pushworked; issue reads, labels and PR creation did not). Re-verified from the pushed branch before opening, by content:MEASURED (#8639): 0 on this branch vs 29 onmainas the positive control (the 2 remaining textual occurrences are in the rewritten$commentprose, which is deliberate)seed-loader-driver-text.test.tsclassification re-derived from the source on both sides, which is what produced the count correction aboveskip-changeset: test files, a shrink-only ledger, a vitest config and a workspace-internal devDependency — nothing user-visible is released.Generated by Claude Code