Repository navigation
test(dogfood): flip the three hook-abort pins to the ruled HOOK_ABORTED wire - #27878
Conversation
…ED wire An undeclared hook abort now answers the /data door with code: 'HOOK_ABORTED' (ruling 6431311681 letter A; declared codes are kept). The error-sentences acceptance[1] case (both POST /data/OBJECT and /createMany) and the object-hook-lifecycle acceptance[6] deep-equal still pinned the code-less body and reddened Dogfood Regression Gate (1/3) on every main push. The sentence-verbatim and nothing-written assertions stay. Claude-Session: https://claude.ai/code/session_01QSeKYmTYfaPbLQD4BJfomW Co-authored-by: Claude <noreply@anthropic.com>
📓 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. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
|
domain:devx#2 · os-justin · session_01QSeKYmTYfaPbLQD4BJfomW 席位核对 — ACCEPT · p0 main-red stop-bleed · domain:devx#2 · head
|
Fixes #27806
Clause-②: no
Metadata-protocol: none
维护者速读
code: 'HOOK_ABORTED';句子原文与"未写入任何行"的断言原样保留。onErrorabort answers the data door with a code-less 400; give it a ledgered ADR-0112 code (#27508 code half) #27597,6431311681 letter A)让未声明 code 的 hook 中止在 /data 门回HOOK_ABORTED,这三处 pin 没跟上,main 每次跑 Dogfood 分片 1/3 都红。packages/qa/dogfood/test/object-hook-lifecycle-scratch.dogfood.test.ts(acceptance[6] 的 deep-equal)、packages/qa/dogfood/test/error-sentences-live.dogfood.test.ts(acceptance[1] 两个写门的 code 断言)。pnpm --filter @objectstack/dogfood exec vitest run test/error-sentences-live.dogfood.test.ts test/object-hook-lifecycle-scratch.dogfood.test.ts,预期 2 个文件、8 个用例全绿。What changes
A stop-bleed for the main-red
Dogfood Regression Gate (1/3)since21c4bdd8. #27667 made an undeclared hook abort answer the /data write door withcode: 'HOOK_ABORTED'(ruling6431311681letter A on #27597; a declared code is kept). Three pins still asserted the old code-less body. Each now asserts the ruled wire:packages/qa/dogfood/test/error-sentences-live.dogfood.test.ts, acceptance[1], forPOST /data/OBJECTandPOST /data/OBJECT/createMany(two pins, one per door). It was'code' in bodyis false. It is nowbody.codeis'HOOK_ABORTED'. Thebody.error === HOOK_SENTENCEassert and the nothing-written assert stay. The case title and the header comment now name the ruled wire.packages/qa/dogfood/test/object-hook-lifecycle-scratch.dogfood.test.ts, acceptance[6] / negative[0]. The deep-equal is now{ error: ABORT_MSG, code: 'HOOK_ABORTED', object: ABORT }. The no-unhandled-error log assert and the no-row assert stay. The comment cites error codes: an undeclared hookonErrorabort answers the data door with a code-less 400; give it a ledgered ADR-0112 code (#27508 code half) #27597.No skip, no
.todo, no retry, no product change, and no other test touched. The spelling follows the existing pin athook-error-format.dogfood.test.ts:124.Tests
All runs used the dependency closure built locally (
pnpm --filter '@objectstack/dogfood^...' build, lock VERDICT command-exit 0).0a4b0fb223, before any edit: the two files gaveTests 3 failed | 5 passed (8). The failures are exactly the three pins:error-sentences-live.dogfood.test.ts:79failed for both doors. Received{"error":"A budget line needs an approver before it can be recorded.","code":"HOOK_ABORTED","object":"errsent_budget"}.object-hook-lifecycle-scratch.dogfood.test.ts:134failed. The diff was+ "code": "HOOK_ABORTED".Test Files 2 passed (2),Tests 8 passed (8), at17b16000d7and again at the final headbd2646adfa(after merging origin/main).scripts/ablation-replace.mjs, which verified the anchor 1 -> 0 and the blob change, then restored blob == HEAD withgit diff HEADempty:Tests 1 failed | 3 passed (4).'code' in bodyfalse givesTests 2 failed | 2 passed (4).hook-after-abort-rollback,hook-after-condition-rollback,hook-capability-refusal,hook-error-format,hook-refusal-user-facing-marking,hook-runas-fls,lowered-body-door,organization-delete-refuse-nonempty,object-hook-lifecycle-showcase) gaveTest Files 9 passed (9),Tests 59 passed (59). A grep ofpackages/qa/dogfood/testfinds no other pin asserting a code-less hook abort.pnpm --filter @objectstack/dogfood typecheckexits 0. The tsconfigincludeistest/**/*, so it covers both files.Acceptance notes
skip-changeset:@objectstack/dogfoodis"private": true, and the diff touches only itstest/files, so nothing is published.Verification
The gates derived by
node scripts/pm/dispatch-gates.mjs --commandswere run locally onbd2646adfa, with each exit code captured before any pipe.check:dual-build-cjs-loadswas NOT MEASURED: it reported PREREQUISITE NOT MET because it needs a fullpnpm buildof unrelated packages. CI runs it. Full results are in the os-dev-report on #27806.Generated by Claude Code