orchestrator: Compose boot-walk supervision from the board's BootWatch capability - #443
Merged
Merged
Conversation
chrysh
force-pushed
the
boot-watch-composition
branch
5 times, most recently
from
August 26, 2026 10:48
38dbbfe to
ea3ec22
Compare
chrysh
marked this pull request as ready for review
August 26, 2026 10:51
…h capability ReleaseReset arms the component's walk, AssertReset stops it, and the new PlatformDriver::poll_boot_walks maps terminal verdicts to events: Complete becomes ComponentReady (Active) or Booted (Passive), Failed becomes Timeout regardless of cause — retry budgeting is the SM's. A finished walk stops being watched, so each verdict is delivered once; while everything waits, the poll carries the earliest walk deadline as the run loop's next wake-up. BootWatch gains arm(): a retry re-release starts a fresh walk, and since reset actuation has no clock, the attempt starts at the next poll's now_millis. The Board supplies one walk and one ComponentKind per component, from the same table as the SM's chain. The driver README still described take_event and NotImplemented, both gone; rewritten to the current execute/fail-closed shape. Signed-off-by: Christina Quast <christina.quast@9elements.com>
chrysh
force-pushed
the
boot-watch-composition
branch
from
August 26, 2026 10:54
ea3ec22 to
bc24329
Compare
leongross
approved these changes
Aug 27, 2026
Member
|
I would feel better if we could get rid of the index matchings, but as @chrysh already discussed, we will leave it like this until @FerralCoder finishes the config design. |
Replace the ComponentId::new(idx as u8) call in poll_boot_walks with a From<u8> conversion, per review. The const fn new stays for const contexts (test constants). Also assert N <= 256 at compile time in PlatformDriver::new: component ids are u8, so a larger board would wrap them silently. Signed-off-by: Christina Quast <christina.quast@9elements.com>
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.
What
Composes the
BootWatchcapability into the platform driver, closing the gap noted at theReleaseResetexecutor: released devices are now supervised, and their boot outcomes come back asComponentReady/Booted/Timeoutevents.How
ReleaseResetarms the component's walk;AssertResetstops it, so a device put back in reset (recovery, isolation) can't produce a staleTimeout.PlatformDriver::poll_boot_walks(now_millis)polls every watched walk and maps the first terminal verdict to its event:CompletebecomesComponentReady(Active) orBooted(Passive),FailedbecomesTimeoutregardless of cause — retry budgeting stays in the SM. A finished walk stops being watched, so each verdict is delivered once. While everything waits, the poll carries the earliest walk deadline as the run loop's next wake-up.BootWatchgainsarm(): a retry re-release starts a fresh walk, and since reset actuation has no clock, the attempt starts at the nextpoll'snow_millis.Boardgainsboot_watchesandkinds(one per component, from the same table as the SM's chain).take_eventandNotImplemented, both gone; rewritten to the current execute/fail-closed shape.Tests
Seven new driver tests: verdict-to-event mapping by kind, exactly-once delivery, earliest-deadline aggregation, watch gating on release/assert, fresh-walk re-arming, and two end-to-end runs through the SM (passive Booted settles in Ready; boot timeout fails closed while the recovery seam is uncomposed).
Known gap
The walk can report
FailureCause::DeviceFatal, but the SM's event vocabulary only hasTimeout, so fatal causes still spend retry budget. Short-circuiting those needs a new SM event — follow-up, not this PR.