Skip to content

test(dogfood): flip the three hook-abort pins to the ruled HOOK_ABORTED wire - #27878

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-27806-hook-aborted-pins
Oct 30, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-27806-hook-aborted-pins

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #27806

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:把两个 dogfood 测试文件里三处仍断言"hook 中止不带 code"的旧线形 pin,翻成裁决后的 code: 'HOOK_ABORTED';句子原文与"未写入任何行"的断言原样保留。
  • 为什么改:fix(rest): an undeclared hook abort answers the data door with HOOK_ABORTED #27667 按裁决(error codes: an undeclared hook onError abort 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 都红。
  • 风险与回滚:只改测试断言与注释,不动产品代码、不跳过、不放宽;回滚即 revert 本 PR(main 会重新变红)。
  • 先看: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) since 21c4bdd8. #27667 made an undeclared hook abort answer the /data write door with code: 'HOOK_ABORTED' (ruling 6431311681 letter 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], for POST /data/OBJECT and POST /data/OBJECT/createMany (two pins, one per door). It was 'code' in body is false. It is now body.code is 'HOOK_ABORTED'. The body.error === HOOK_SENTENCE assert 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 hook onError abort 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 at hook-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).

  • Red reproduced at origin/main 0a4b0fb223, before any edit: the two files gave Tests 3 failed | 5 passed (8). The failures are exactly the three pins:
    • error-sentences-live.dogfood.test.ts:79 failed 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:134 failed. The diff was + "code": "HOOK_ABORTED".
  • Green after the flip: Test Files 2 passed (2), Tests 8 passed (8), at 17b16000d7 and again at the final head bd2646adfa (after merging origin/main).
  • The flips have teeth. Each mutation went through scripts/ablation-replace.mjs, which verified the anchor 1 -> 0 and the blob change, then restored blob == HEAD with git diff HEAD empty:
    • The deep-equal reverted to the code-less body gives Tests 1 failed | 3 passed (4).
    • The error-sentences assert reverted to 'code' in body false gives Tests 2 failed | 2 passed (4).
  • Sibling hook-refusal files in shard 1 (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) gave Test Files 9 passed (9), Tests 59 passed (59). A grep of packages/qa/dogfood/test finds no other pin asserting a code-less hook abort.
  • pnpm --filter @objectstack/dogfood typecheck exits 0. The tsconfig include is test/**/*, so it covers both files.

Acceptance notes

  • The card records that the merge-queue run skipped the dogfood shards while the main push ran them, a filter-parity blind spot. This PR does not fix that, as the card says.
  • skip-changeset: @objectstack/dogfood is "private": true, and the diff touches only its test/ files, so nothing is published.

Verification

The gates derived by node scripts/pm/dispatch-gates.mjs --commands were run locally on bd2646adfa, with each exit code captured before any pipe. check:dual-build-cjs-loads was NOT MEASURED: it reported PREREQUISITE NOT MET because it needs a full pnpm build of unrelated packages. CI runs it. Full results are in the os-dev-report on #27806.


Generated by Claude Code

…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>
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Oct 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

Nothing 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): node scripts/docs-audit/affected-docs.mjs --json c91a004f81eb8d06f03287c8d3acdaaabd358177 → packageMentionDocs.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:devx#2 · os-justin · session_01QSeKYmTYfaPbLQD4BJfomW

席位核对 — ACCEPT · p0 main-red stop-bleed · domain:devx#2 · head bd2646adfa · 2026-10-30T02:50Z

维护者速读

  • 改了什么:两个 dogfood 测试里有三处断言还在断言旧响应(不带 code),现在改成裁决后的 code: 'HOOK_ABORTED'。改动在 error-sentences-live 的两个写入入口,以及 object-hook-lifecycle-scratch 的 acceptance[6]。「句子原样返回」「没有写入」「不记 unhandled 日志」这三条断言都保留。
  • 为什么改:fix(rest): an undeclared hook abort answers the data door with HOOK_ABORTED #27667 按裁决 6431311681 A(error codes: an undeclared hook onError abort answers the data door with a code-less 400; give it a ledgered ADR-0112 code (#27508 code half) #27597)上线了「未声明错误码的 hook 拒绝统一回 HOOK_ABORTED」。这三处断言没有跟着改,所以从 21c4bdd8 起,main 上每次 push 都红在 Dogfood Regression Gate (1/3)。
  • 风险与回滚:只改私有测试包的两个测试文件(+10/−8),不动产品代码,没有跳过任何测试。回滚 = 还原本 PR。
  • 先看:error-sentences-live.dogfood.test.ts 第 74–79 行,以及 object-hook-lifecycle-scratch.dogfood.test.ts 第 131–135 行。
  • 两分钟验证:对这两个文件跑 vitest,应为 8/8 通过。
  • 需要你做的:无。席位落地。

席位意见:合入,止血。这是按裁决改断言,不是绕过测试。dev 在 main 上复现了 3 个红;改后 8/8 通过;把任一断言退回旧写法,红就会重新出现。同一分片里另外 9 个 hook 拒绝相关的测试文件(59 个用例)也都是绿的。真正的验证要看合并后第一次 main push 时 shard 1/3 转绿。

Shape: draft → main, Fixes #27806. 2 files, +10/−8. Labels: tests, size/s, skip-changeset (private package). Non-governed, so the seat lands it. Report 6513530580, claim 6512774440.

Premise measured: the dev reproduced the red at 0a4b0fb223: 3 failed and 5 passed out of 8. The failures are error-sentences-live:79 on both doors (the received body carries code: HOOK_ABORTED) and object-hook-lifecycle-scratch:134, where the deep-equal is missing code. hook-error-format.dogfood.test.ts:124 already pins the ruled spelling.

Seat's own read:

Gates:

  • On head bd2646adfa: 51 check-runs, 33 success, 18 skipped, 0 failure; mergeable_state: clean.
  • check-expected-skips --pr 27878: OK, all 18 skips are in main's roster (exit 0).
  • check-governed-merges --pr 27878: NOT governed, 18 changed lines.
  • Dev's union: 51 derived, 50 run with exit 0, and 1 NOT MEASURED (check:dual-build-cjs-loads, an unrelated dist prerequisite).
  • Teeth: each assertion reverted reds again (1 of 4 and 2 of 4).

Out of scope: the dev noted that the merge group skips the dogfood shards → dropped. That skip is by design (#22998, the two speeds), per triage's correction in 6512235460. It is not a blind spot.

Landing: non-governed. The seat readies the PR and arms auto-merge in this act. After merge, the seat verifies the merged diff and reads the first main push's Dogfood Regression Gate (1/3). Then it closes out #27806 (Fixes) and updates the #27813 anchor.


Generated by Claude Code

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 30, 2026 02:51
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 30, 2026 02:51
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit 816889e Oct 30, 2026
52 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-27806-hook-aborted-pins branch October 30, 2026 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s skip-changeset PR has no user-facing published change; bypasses the changeset gate tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

main red (Dogfood Regression Gate 1/3) since 21c4bdd8 (#27667): two dogfood pins still expect a code-less hook refusal after HOOK_ABORTED landed

1 participant