A plan settles an asked build from the build records (hq issue 214) #244

Closed
mesh-admin wants to merge 0 commits from fix/issue-214-a-plan-settles-from-the-build-records into main
Contributor

hq issue 214. A plan learned a tier's outcome only from planBuilt, called when a controller takes in a build result off the bus. A merge to the controller's own repository replaces the controller in tier 0: the build that produced the new controller is recorded (builds shows it), but the plan state the new controller loads still says asked, and nothing ever moves it — the plan waits for ever and blocks every later plan (2026-10-03: stopped by hand after 27 minutes).

Fix: advanceOnce, before waiting on an asked tier, reads each still-asked module's latest build records; a build recorded after the ask is that ask's outcome — built (with its commit and time) or failed (failing the plan as hearing it would). Runs on every advance and on the 30-second ticker, so a plan resumes within one tick after the controller replaced itself. Pure helper settleFromRecords, logged per settled module.

Test: the controller's build recorded after the ask settles it built from that commit; a module with only an older record stays asked; a recorded failure fails the plan. Full suite passes. Live proof needs the next merge to mesh-controller: its plan should go past tier 0 on its own.

hq issue 214. A plan learned a tier's outcome only from `planBuilt`, called when a controller takes in a build result off the bus. A merge to the controller's own repository replaces the controller in tier 0: the build that produced the new controller is recorded (`builds` shows it), but the plan state the new controller loads still says `asked`, and nothing ever moves it — the plan waits for ever and blocks every later plan (2026-10-03: stopped by hand after 27 minutes). Fix: `advanceOnce`, before waiting on an asked tier, reads each still-asked module's latest build records; a build recorded after the ask is that ask's outcome — `built` (with its commit and time) or `failed` (failing the plan as hearing it would). Runs on every advance and on the 30-second ticker, so a plan resumes within one tick after the controller replaced itself. Pure helper `settleFromRecords`, logged per settled module. Test: the controller's build recorded after the ask settles it built from that commit; a module with only an older record stays asked; a recorded failure fails the plan. Full suite passes. Live proof needs the next merge to mesh-controller: its plan should go past tier 0 on its own.
mesh-admin added 1 commit 2026-10-03 20:20:43 +00:00
A merge to the controller's own repository replaces the controller in its first tier; the build
that produced the new one was recorded, the plan never heard it, and it waited for ever with every
later plan behind it. The record is the fact: a build recorded after the ask is the tier's outcome,
whoever was listening when it came.
mesh-admin closed this pull request 2026-10-03 21:16:14 +00:00

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: novox/mesh-controller#244