fix(dispatcher): preserve child identity through setup failures - #2363
Conversation
There was a problem hiding this comment.
Changes requested: The child setup finalizer is disabled before durable promotion, leaving an acknowledged coordinator child able to run without a durable identity.
Warning
Changes requested · head ff5b315 · 1 finding: 1 major
| Severity | Finding | Where |
|---|---|---|
| major | F1 Keep the setup finalizer active until durable promotion succeeds | src/core/dispatcher.ts:2776 |
Full review
F1 — runLoopStarted becomes true before claimRun promotes the reservation. If promotion fails, open() abandons the durable row and returns untracked, while the setup finalizer is already disabled and the model proceeds. A process crash can then erase the acknowledged child identity; replay may create another child and consume another budget. Keep the finalizer active through promotion, and fail the same-id child with a typed reason unless promotion succeeds.
|
Exact-head CI receipt for Please carry this deterministic failure into the existing |
Co-Authored-By: coreplane-switchboard[bot] <318072483+coreplane-switchboard[bot]@users.noreply.github.com>
ff5b315 to
f57dcb3
Compare
|
Same-unit repair is pushed at
Re-review requested at this exact head, especially the reservation-to-loop handoff and fence behavior. The prior review at |
There was a problem hiding this comment.
LGTM: F1 is resolved at the exact head, with the setup finalizer retained through durable promotion and pre-loop setup and with the refusal inventory repaired.
Note
Approved · head f57dcb3 · no findings
Full review
F1 is resolved, and the refusal inventory fix is present at the exact reviewed head. No findings remain.
Coordinator children now reserve a durable run identity before an ID is acknowledged, and setup failures finish that same child record with a typed reason.
Why: Issue #2236 recurred when an advertised coding or review child vanished before its model turn while a separate setup-failure record survived. The repair follows released #2359 and precedes the separate recovery extension.
Where to look
Feedback wanted: Verify the pre-ack and post-ack boundary, promotion failure behavior, exact-ID parent reads and replay with no second child or budget.
Risk: This changes coordinator-child creation and early failure recording. An incorrect promotion path could again orphan a child or admit duplicate work; inspect the failure-order tests and live release separately.
Verified: At head f57dcb3, all GitHub checks passed and exact-head re-review resolved F1. Post-merge release and live behavior remain separate gates.
Decisions (3)
Validation (4 criteria)
For agents
Original #2236 unit/ref: plan-deliver-the-focused-p0-p-071515:U1 / plan/deliver-the-focused-p0-p-071515/u1. Do not adopt or mutate unrelated draft #1625, retry the terminal migration unit, or implement the separate extension here. Preserve the person merge gate after current-head CI and review.
🤖 Generated with Claude Code