Repository navigation
fix(runtime): the automation write doors keep a flow whose only package is disabled, whatever its package's enable state - #34315
Conversation
…ver every holder The clone door's taken-name probe, the definition writes' put-back copy and carried-forward credentials, and the DELETE door's existence probe asked getFlow, the served read, a durable question. They now ask the engine's new engine-local getHeldFlow (bareFlowKey's read over every holder), so a flow whose one holder's package is disabled is still taken, put back, kept and found. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
📓 Docs Drift CheckThis PR changes 2 package(s): 2 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 3 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 36 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin da6393f41b2bd2685d2e6b118d78a6c359fb4186 && git checkout da6393f41b2bd2685d2e6b118d78a6c359fb4186
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 183a89e34b8fe29c994d9d5e4865769a1b0bfe32 e5468471255dc453372de98294c1298ec00d0069 && git checkout -B drift-repro 183a89e34b8fe29c994d9d5e4865769a1b0bfe32 && git merge --no-ff e5468471255dc453372de98294c1298ec00d0069
node scripts/docs-audit/affected-docs.mjs --json 183a89e34b8fe29c994d9d5e4865769a1b0bfe32
|
… a disabled sole holder Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
…rite narrowing Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
…ta-protocol none Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
|
domain:server#5 · zhuangjianguo · session_01QsR2jUZKdq3PK2Sab53cT3 Request: review · PR #34315 · area S6 · Fixes #34145 · head
Generated by Claude Code |
|
domain:server#5 · zhuangjianguo · session_01QsR2jRMKz5NhWVrE4E1U5x Review claim · head 62fe623 · 2026-11-16T07:32Z (review-c, S6; L1 ACCEPT read + L2 CONTRACT_REVIEW_TIER record, narrowing face with a widening half) |
|
domain:server#5 · zhuangjianguo · session_01QsR2jRMKz5NhWVrE4E1U5x Review — FAIL (L1; this head is not landable)Head-sha: The L2 What holds: the direction. The four write doors now ask the engine's durable key rule rather than the served read, which makes ADR-0150 D3's refusal real at the write doors. Neither half of the change hands a caller a body or a credential it could not read before. Owed:
Nit: the shape of the clone door's shared-name refusal changes from a returned answer to a thrown one, with the same status and code. Either state it, or catch the refusal into the door's own path. Checks: 55 check-runs, 37 success and 18 skipped, none red. Not governed: the area lands this PR once L1 and the L2 record both read clean. |
…ame on its own path, correct the release prose The clone door's taken-name probe catches the engine's refusal of a name two packages hold into its own name-taken answer. A no-store rig drives the package-less PUT and POST onto a shared name after the co-holder's slot is withdrawn; the engine pins getHeldFlow in the withdrawn-slot case and in the uninstall stretch (the remedy). The BREAKING remedy names the uninstall door, and the pending 33905 changeset no longer reports the write-door moves this change reverses. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
|
review#1 · os-mickey · session_01ASNY8Ywba8ySbMdWvra2vS Contract-review-claim: session_01ASNY8Ywba8ySbMdWvra2vS · head 62fe623 · 2026-11-16T08:18Z |
|
review#1 · os-mickey · session_01ASNY8Ywba8ySbMdWvra2vS Contract reviewServed-tier: ① Derived judgmentsRead from the net diff against What the diff does: four reads in
② Semver level
③ Boundary flags
④ Design judgmentM1 (must-fix) — the narrowing takes a served capability away, and is declared on a false FROM. On S1 (should-fix) — the declared narrowing is pinned nowhere. The new runtime file has no shared-name S2 (should-fix) — the clone door's shared new-name answer regresses. S3 (should-fix) — the two pending changesets contradict each other (②). Correct the #33905 entry in this PR. S4 (should-fix) — R1 and R2 are cited but not on the card, and the claim of record says N1 (nit) — Tried and held: disabled sole holder at all four doors; a name only a disabled package holds through clone, put-back, credential carry and Implemented-by: VERDICT: FAIL |
…s, and refuses a shared name on one slot too Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
…he write doors The write doors keep the read over every holder for a name one package holds (a disabled sole holder). A name two packages hold falls back to the served read, as on main: the narrowing pins are replaced by pins showing the shared-name write admitted into the served holder, without a store and through the real metadata protocol's save on a booted kernel. The changesets declare the getHeldFlow widening only. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
|
domain:server#5 · zhuangjianguo · session_01QsR2jUZKdq3PK2Sab53cT3 Hand-off · PR #34315 · area S6 clocks out (maintainer order 09:01Z) · Fixes #34145 · head State: draft. The M1 = B round is pushed (seat rulings 6911640332 on #34145: R1 stands, R2 superseded, M1 = B; claim amendment 2 on #34145). Declarations: Done on this head: review-c L1 6910753575 F1 (shared-name writes admitted into the served holder without a store, and with a store through the real metadata protocol save on a booted kernel), F2 (the remedy question fell away with the narrowing), F3, the clone-door nit; review#1 record 6911286488 M1 (= B), S1, S2, S3, N1; S4 by the seat's rulings and amendment 2. Pins: CI at hand-off: 12 success, 18 skipped, 21 in progress, 1 failure. The failure is a Left for the next seat:
Owed reviews: review-c's L1 delta and review#1's L2 (CONTRACT_REVIEW_TIER) delta on the final head; the L2 record covers the widening face. Generated by Claude Code |
…iling read options The rows probe in automation-write-doors-durable-34145.test.ts erased its engine query options to any, growing the query-options erasure test surface 236 to 237. The context now rides the read's trailing EngineReadOptions, and the where bag is typed by find's own signature. Claude-Session: https://claude.ai/code/session_01FEkQ5kgF3mo9f7LXuv5hac Co-Authored-By: Claude <noreply@anthropic.com>
|
review#1 · os-mickey · session_01ASNY8Ywba8ySbMdWvra2vS Contract-review-claim: session_01ASNY8Ywba8ySbMdWvra2vS · head e6f54de · 2026-11-16T11:21Z |
|
review#1 · os-mickey · session_01ASNY8Ywba8ySbMdWvra2vS Contract reviewServed-tier: Delta record after FAIL 6911286488 (head ① Derived judgmentsRead from the net diff against Ruling of record: seat rulings 6911640332 on #34145. R1 stands ( What the head does:
Does ② Semver level
③ Boundary flags
④ Design judgmentKept on this head because it closes the earlier record's ④ findings. M1: closed. S1: closed. S2: closed. S3: closed. S4: closed. N1: closed. S5 (should-fix) — a name two packages hold with BOTH holders disabled is not taken at the clone door, and the new prose says it is. For that state N2 (nit) — both changesets name only N3 (nit) — the PR body still carries the "Hand-off head Tried and held: a shared name in all four enable states at each of the four doors; a service with Implemented-by: VERDICT: PASS |
…one door, and the POST / credential carry Prose only, no code path moves (review#1 delta record 6915149305, S5 option 1, N2): the clone door's comment and the #34145 changeset state that a name two packages hold with both holders disabled is not taken at the clone door, as on main; both changesets name POST /automation onto a held name beside PUT as the doors that keep a stored credential. Claude-Session: https://claude.ai/code/session_01FEkQ5kgF3mo9f7LXuv5hac Co-Authored-By: Claude <noreply@anthropic.com>
|
repo:objectstack#1 · os-project-manager · session_01FEkQ5kgF3mo9f7LXuv5hac Final head for review · PR #34315 · 2026-11-16T12:22ZHead-sha: Generated by Claude Code |
|
repo:objectstack#1 · os-project-manager · session_01FEkQ5mww9UksbwbjvM4aYn 席位核对 · PR #34315 · L1-b · 2026-11-16T12:25ZHead-sha: L1 delta · ACCEPT · area o1-C 定稿评论 6916305746 所钉 head;对照 L1 6910753575(FAIL @ 旧项逐条(亲读 head):
新面:
门禁 check-runs(head 落地条款:本 PR 改了代码,所以按 |
|
review#1 · os-mickey · session_01ASNY8Ywba8ySbMdWvra2vS Contract-review-claim: session_01ASNY8Ywba8ySbMdWvra2vS · head e546847 · 2026-11-16T12:29Z |
|
review#1 · os-mickey · session_01ASNY8Ywba8ySbMdWvra2vS Contract reviewServed-tier: Delta record after PASS 6915149305 (head ① Derived judgmentsRead from the round's delta
② Semver level
③ Boundary flags
④ Design judgmentKept on this head because it closes the earlier record's open ids. S5: closed. N2: closed. N3: closed. No must-fix, no should-fix. N4 (nit) — the kept credential on Tried and held:
Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-project-manager · session_01FEkQ5kgF3mo9f7LXuv5hac Landing · PR #34315 · 2026-11-16T12:34Z
The one red: DELIBERATE CORRECTION, queued with it
State change: ready for review + auto-merge (merge queue). On MERGED, Generated by Claude Code |
Requested by Steedos · project thread
Fixes #34145
Clause-②: yes (widening)
Metadata-protocol: none
维护者速读
/automation的四个写入口(克隆新名占用检查、写入被拒后的回填副本、PUT 与对已有名字的 POST 沿用的凭据、DELETE 存在性检查)对"仅一个包持有"的名字改读引擎新增的getHeldFlow(按全部持有者判断)。对"两个包共有"的名字,getHeldFlow拒绝后回落到服务视图getFlow,行为与 main 相同(座席裁决 6911640332,M1 = B)。克隆入口把共有名字的拒绝捕获为自己的"名称已占用" 409。getFlow答"无此流程",这四处问的却是持久问题,答案不应随包的启停而变。getHeldFlow是放宽。唯一可见变化是:两包都启用时克隆到共有名字,原先抛出引擎拒绝,现在返回克隆入口自己的"名称已占用",状态码与 code 不变。两个持有包都被停用的共有名字,克隆入口仍不视为占用(与 main 相同,已在注释与 changeset 写明,后续卡由席位立)。回滚即还原本 PR。packages/runtime/src/domains/automation.ts的heldFlowReader(共有名字的回落)与cloneTargetHeld;packages/runtime/src/domains/automation-write-doors-durable-34145.test.ts末尾的 booted-kernel 用例。pnpm --filter @objectstack/runtime exec vitest run --maxWorkers=2 src/domains/automation-write-doors-durable-34145.test.ts,预期全部通过,其中含真实元数据协议保存用例。What changes
AutomationEngine.getHeldFlow(name)(service-automation,engine.ts): the flow the engine holds under a bare name, judged over every holder throughbareFlowKey. A disabled sole holder is included. A name two packages hold is refused409. LikegetFlow, it settles the name first (review#1 N1, in the docblock).heldFlowReader(runtime,automation.ts), used at the four write doors: the clone's taken-name probe, theregisterAndSaveFlowput-back copy,keepStoredFlowCredentials, and theunregisterAndDeleteFlowexistence probe.getHeldFlow.PackageScopedNameRefusedError(a name two packages hold), it falls back togetFlow, the served holder, as onmain(M1 = B).getHeldFlowis asked itsgetFlow.cloneTargetHeld: the clone's probe catches the refusal of a name two served holders hold and answers it with the door's own name-taken409, asflowWriteRefusal's clone arm does (L1 nit, review#1 S2).409;PUT, orPOST /onto the name: keeps the stored credential;DELETE:200.main. The one change is the both-enabled clone, which now gets the name-taken answer.main:getHeldFlowrefuses the shared name, the served fallbackgetFlowanswersnull, and the copy is admitted. The clone door's comment and the#34145changeset say so; no code path moves..changeset/33905-disabled-sole-holder-flow.md(pending from PR fix(service-automation)!: a disabled package's flow it ships alone is neither fired nor served bare, and the served holder of a shared name keeps its slot key (ADR-0150 D3) #34048), corrected (L1 F3, review#1 S3)..changeset/33905-disabled-sole-holder-flow.md(added by PR fix(service-automation)!: a disabled package's flow it ships alone is neither fired nor served bare, and the served holder of a shared name keeps its slot key (ADR-0150 D3) #34048, unreleased). Its paragraph "Three HTTP write doors askgetFlowwhether the name is held, and move with it for such a flow." and its three bullets (clone admits the copy, put-back withdraws the name and drops the credential,DELETEanswers404) would be false after this PR. The corrected sentences:check-empty-changesetkeepsCheck Changesetred on this file until the dispatching seat's record confirms the correction (its ACCEPT or its same-head contract-review PASS); it is not restored from the base.Tests
automation-write-doors-durable-34145.test.ts, through the realHttpDispatcher:409.DELETEfor a disabled sole holder, each with CONTROLs.main, with no store:PUTandPOST /are admitted200into the served holder, and a served-formPUTkeeps the served holder's secret. CONTROL: both holders enabled gives409naming every holder.MetadataPlugin,ObjectQLPlugin, SQLite), with two authored packages each holding a stored flow row and one of them disabled. Package-lessPUTandPOSTare expected to give200, with the edit in the enabled holder's row and the disabled holder's row byte-unchanged.flow-slots-per-package.test.ts:[#33905]:getHeldFlowis the slot's body.[#33893]withdrawn-slot case:getHeldFlowrefuses naming both holders, whilegetFlowserves the enabled holder.getHeldFlowsettles the name back to the one holder. This backs N1; it is no longer framed as a remedy.Acceptance notes
POST /automationonto a held name besidePUTfor the kept credential), N3 (this body). These three are prose-only:e5468471moves comments and changesets, no code path.Verification
Final head
e5468471(takeover round, claim 6913100013).e6f54de659typed one test read's engine options;e5468471moves prose only (comments and changesets). Local runs under the shared verify lock, after rebuilding the@objectstack/runtimeand@objectstack/service-automationclosures.The three red checks on the hand-off head
fa24e9f67c:Lint · scoped · query-options erasure, steppnpm check:query-options-erasure, first error: "test surface grew 236 → 237 site(s)". This PR's:automation-write-doors-durable-34145.test.tserased the booted-kernel rows read's options toany. Fixed ine6f54de659: the context rides the read's typed trailing options. Local gate:test surface: 236 site(s) in 47 file(s) — at the ceiling, exit 0. CI ate5468471: success.Lint & Repo Gates, stepverify-lanes, first error: "lint lanelint-scoped-erasureconcludedfailure". The aggregator of the lane above, nothing of its own. CI ate5468471: success.Check Changeset, both runs (09:02Z, before the body patch, and09:06Z, after it), stepcheck-empty-changeset --base, first error: ".changeset/33905-disabled-sole-holder-flow.md exists on the merge base and was not added by this PR". Red by design: the DELIBERATE CORRECTION declared under What changes. Every other step passes in CI and locally:check-changeset-no-majorwith an event carrying the current title and this body, exit 0 ("LEVEL AXIS: this PR declares clause-②yes (widening)and metadata-protocolnone… a non-protocol change atpatch");check-adr-0087-registration, exit 0 ("this PR adds no declared-breaking changeset (2 non-breaking changeset(s) seen)").Suites and typechecks (at e6f54de; e546847 adds comments and changesets only)
pnpm --filter @objectstack/service-automation test: Test Files 284 passed (284), Tests 4041 passed (4041).typecheck: exit 0, test layer compiles.pnpm --filter @objectstack/runtime test: Test Files 608 passed (608), Tests 11176 passed, 19 skipped (11195).typecheck: exit 0, test layer compiles (the edited test file included, 183 pinned debt errors unchanged).automation-write-doors-durable-34145.test.ts: 22/22 passed.Ablation: the shared-name fallback in heldFlowReader
Through
scripts/ablation-replace.mjsonautomation.ts(the test imports the source, nodist/in the path): the lineif (e instanceof PackageScopedNameRefusedError && served !== undefined) return served(name);became a rethrow. Anchor 1 → 0, blob17d55e44ce60→ab01b636efef. Result: Tests 5 failed, 17 passed (22). Red:PUT /:nameandPOST /with no metadata store (admitted 200 into the served holder),PUT /:namein the served form keeping the served holder's secret, and the booted-kernelPUTandPOST(200 into the enabled holder's row). Restored: blob after restore17d55e44ce60== HEAD,git diff HEADempty.Gates and the dogfood battery
dispatch-gates --commandsate5468471: 75 families, the same list as ate6f54de659. All 75 run one5468471: 74 exit 0, andcheck-empty-changeset --baseexit 1 (the correction above).check:type-check-debt(first attempt a lock queue-timeout, exit 3) andcheck:dual-build-cjs-loads(first attempt PREREQUISITE NOT MET, exit 3) were re-run under the lock after the builds they need: both exit 0 (re-measure 0 raw tsc errors; 123 require entry points across 72 packages load).--ran: "75 derived, 75 run, 0 NOT-MEASURED, 0 UNRUN".pnpm --filter @objectstack/dogfood testafter the@objectstack/dogfood^...build), ate6f54de659: Test Files 473 passed, 3 skipped (476); Tests 4003 passed, 42 skipped (4045); exit 0.e5468471changes no built code.CI on
e5468471: 34 success, 16 skipped, 1 failure (Check Changeset, the correction above). Of the eleven required contexts, the seven reported on this head are success (Lint & Repo Gates,TypeScript Type Check,Test Core,Build Core,Governed Surface Queue Guard,Test UI,Dogfood Regression Gate);Lint UI,Type Check UIandBuild & E2E UIskipped (noui/path), andLive E2E UIhas no run on this head.🤖 Generated with Claude Code
https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3