docs(spec): D3 账本 resumeAuthority 一条不再要求手工排查 supportsPause 不一致 (#6844) - #6875
Merged
os-project-manager merged 1 commit intoAug 9, 2026
Merged
Conversation
`MIGRATIONS_BY_MAJOR[17].semantic` 中 `action-descriptor-resume-authority-default-flip` 的 `acceptanceCriteria` 结尾断言该不一致「不被任何通道告警,请手工排查」。PR #6746 (#6667) 之后不成立:`AutomationEngine.refuseUndeclaredSuspension` 在 `executeNode` 中 每个 `result.suspend === true` 必经的接缝上拒绝它,且为 guard-class,`fault` 边路由不了。 该字符串由 `gen:upgrade-guide` 逐字投影进 `docs/protocol-upgrade-guide.md` 的 "Done when" 行,故一并提交重新生成的产物。刻意不过度更正:守卫不判「未注册描述符」 的执行器,这一残留写进了新文案。受理面逐字节未变。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018ffcE95NaMJcL9XJ9VDYgk
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 112 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
os-project-manager
marked this pull request as ready for review
August 9, 2026 02:30
os-project-manager
deleted the
claude/issue-6844-d3-ledger-supportspause-stale
branch
August 9, 2026 02:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6844
前提实测(三条,均在 fresh
main@f22da7026上验证)packages/spec/src/migrations/registry.ts:2756-2759(文本搜索定位;分诊评论记的 2746-2748 是93fcd02时的行号,main 已前移)。跨字符串拼接行,单行 grep 打不中。refuseUndeclaredSuspension确实接线在暂停必经路径上 —— 读的是调用点,不只是声明:packages/services/service-automation/src/engine.ts:3186engine.ts:4981,位于executeNode内if (result.success && result.suspend === true)分支engine.ts内executor.execute()只有 4925/4930 两处(同一 try 的超时/非超时分支),ADR-0018 别名执行器(engine.ts:1543)是return target.execute(...)委托、结果照样回到 4930;resume()与 region 体均经executeNode重入。refuseNode(guard-refusal.ts:57)返回errorClass: 'guard';engine.ts:5009处result.errorClass === 'guard' ? undefined : flow.edges.find(... 'fault')——fault边确实路由不了。三条全部成立,故按建议方向改写。
一处前提修正(诚实报告)
issue 说该字符串被投影进两个发布通道。实测只有一个:
packages/spec/spec-changes.json根本不含acceptanceCriteria字段(grep -c为 0),其对 semantic 迁移的投影只有migrationId/rationale/replacement/surface/toMajor。所以gen:spec-changes重跑后spec-changes.json逐字节未变 —— 这一「无 diff」本身就是证据,不是漏跑。缺陷本身(已发布指令现在是错的)成立,承载它的通道是docs/protocol-upgrade-guide.md。改动
acceptanceCriteria结尾⚠️ `supportsPause` is a declaration nothing enforces (#5703), so an executor whose `execute()` returns `suspend: true` while leaving `supportsPause` false is warned about by NEITHER channel — check those by hand against the same rule.⚠️ `supportsPause` is no longer the declaration nothing enforced (#5703, closed by #6667): an executor whose `execute()` returns `suspend: true` while leaving `supportsPause` false is still warned about by neither warning channel, but `AutomationEngine.refuseUndeclaredSuspension` now refuses that suspension at the one seam every suspension passes through — a guard-class failure no `fault` edge routes — so it needs no hand-check. The residue that does: an executor registering NO descriptor declares nothing for either warning or the refusal to read, so its pauses are still created and refused only later, on the resume route (#5561).刻意不过度更正。两条告警通道(启动告警
warnIfResumeAuthorityUndeclared(engine.ts:1476以supportsPause !== true提前返回)、check-resume-authority-declared.mjs(脚本注释第 64 行自陈「an executor that suspends while leavingsupportsPausefalse is invisible」))仍然都不覆盖这一类,所以「不被任何告警通道覆盖」这半句保留,变的是它现在会在运行时被拒绝。同时守卫明确不判「完全未注册描述符」的执行器(engine.ts:3178-3184 "What it does NOT judge → Silence",由supports-pause-runtime-enforcement.test.ts:284-303钉住:暂停照常创建,只在 resume 时 403),这一真实残留写进了新文案 —— 「什么都不用查了」会是方向相反的同一种过度断言。生成产物
pnpm --filter @objectstack/spec gen:spec-changes && gen:upgrade-guide(未手改任何生成文件):docs/protocol-upgrade-guide.md:第 395 行(issue 记的 396 是旧行号)"Done when" 行整行替换,全文件仅此 1 行变化。packages/spec/spec-changes.json:重跑后无变化,原因见上。反向验证(方向先判后跑)
改前基线:没有红方向。 全仓扫过字面短语(
NEITHER channel/declaration nothing enforces/check those by/hand against the same rule)与正则拼法(toMatch(/…/),migrations.test.ts里本就是这个惯用法)—— 该串在registry.ts与两个生成物之外无任何 pin,migrations.test.ts中也无一处提及resumeAuthority/supportsPause/5561。所以改前不存在会变红的既有断言;红方向是我新增 pin 之后才有的。新增 pin 后(仿
migrations.test.ts:129-155的 #5781 区块惯用法,按 idiom 匹配而非逐字):registry.ts还原成origin/main(旧文案)refuseUndeclaredSuspension/NO descriptor等未匹配);anti-vacuity 那条正确保持绿,因为条目仍在且仍讲resumeAuthority,那正是它该守的东西id改成…-VANISHED,使.find()返回undefinedundefined上会真空为绿)校验
pnpm --filter @objectstack/spec test:Test Files 347 passed (347)/Tests 8922 passed (8922)pnpm --filter @objectstack/spec typecheck:tsc --noEmit+check:scripts-typecheck+check:test-typecheck全过check:spec-changes/check:upgrade-guide/check:generated/check:docs/check:api-surface均 PASSnode scripts/check-nul-bytes.mjs:OK(6403 文件);另对三个改动文件自查grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]'无命中per-file
test-typecheck-debt.json账本(#5286 棘轮):改前后均为 58 files / 266 errors,文件本身未改动;src/migrations/migrations.test.ts改前不在账本、改后仍不在(即零错误 —— 按账本_comment,未列出的文件不得有任何错误),新增 57 行未使其进账。车道
domain:spec-surface,受理面逐字节未变:改动仅落在一个字符串字面量内(见registry.tsdiff),未触碰任何 conversion 的steps、key 集合或 Zod 类型;authorable-surface/与json-schema.manifest/基线均无变化(check:generatedPASS 佐证)。未触碰content/docs/releases/。Changeset:
.changeset/d3-resume-authority-supportspause-enforced.md(@objectstack/spec: patch—— 该串随包 dist 发布并投影进升级指南,属用户可见)。🤖 Generated with Claude Code
https://claude.ai/code/session_018ffcE95NaMJcL9XJ9VDYgk
Generated by Claude Code