orchestrator: Add the Updatable update capability trait - #431
Draft
chrysh wants to merge 1 commit into
Draft
Conversation
Member
|
@chrysh I can't inspect your claude session links, please fix the permissions |
Contributor
Author
Sorry, there wasn't meant to be a session link. The commit is still in draft state, because I didn't have the time to clean it up yet. |
chrysh
marked this pull request as ready for review
August 19, 2026 19:37
rusty1968
reviewed
Aug 19, 2026
| /// PLDM device requests its own chunks, including retransmits); | ||
| /// `payload` must serve any in-range read. | ||
| /// | ||
| /// Generic for static dispatch; `?Sized` admits `&dyn PayloadSource`. |
Collaborator
There was a problem hiding this comment.
I'd prefer to keep the API statically dispatched and avoid introducing trait-object support unless we have a concrete use case.
rusty1968
reviewed
Aug 20, 2026
| /// `Error` type effectively already did. | ||
| /// | ||
| /// [`Ready`]: StageProgress::Ready | ||
| fn poll_stage( |
Collaborator
There was a problem hiding this comment.
What prevents an implementation from blocking indefinitely inside poll_stage()? The trait docs require a "bounded step", but no bound or progress guarantee is specified.
poll_stage advances the transfer one bounded step per call, keeping a single-threaded runtime live and cancellation immediate. activate marks the staged image as boot candidate, tentatively; committing is TrialBoot's job. PayloadSource is the chunked read seam, serving both direct-flash adapters and PLDM devices that pull their own chunks. Assisted-by: Claude:claude-fable-5 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.
Adds the
Updatablecapability trait to the orchestrator's capability crate, covering the staging and activation half of the update flow.poll_stageadvances the transfer one bounded step per call, so a single-threaded runtime stays live and cancellation takes effect between steps.activatemarks the staged image as the boot candidate only tentatively; committing the image is TrialBoot's job.PayloadSourceis the chunked read seam, serving both direct-flash adapters and PLDM devices that pull their own chunks.Trait-level tests included in
updatable.rs.Part of 9elements#8. Related: #377 — the trial-boot/commit/rollback capabilities;
activatehere stays tentative because committing is that seam's job.