Skip to content

orchestrator: Add the Updatable update capability trait - #431

Draft
chrysh wants to merge 1 commit into
OpenPRoT:mainfrom
9elements:add-updatable
Draft

orchestrator: Add the Updatable update capability trait#431
chrysh wants to merge 1 commit into
OpenPRoT:mainfrom
9elements:add-updatable

Conversation

@chrysh

@chrysh chrysh commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Adds the Updatable capability trait to the orchestrator's capability crate, covering the staging and activation half of the update flow.

  • poll_stage advances the transfer one bounded step per call, so a single-threaded runtime stays live and cancellation takes effect between steps.
  • activate marks the staged image as the boot candidate only tentatively; committing the image is TrialBoot's job.
  • PayloadSource is 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; activate here stays tentative because committing is that seam's job.

@leongross

leongross commented Aug 19, 2026

Copy link
Copy Markdown
Member

@chrysh I can't inspect your claude session links, please fix the permissions

@leongross leongross linked an issue Aug 19, 2026 that may be closed by this pull request
@chrysh

chrysh commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

@chrysh I can't inspect your claude session links, please fix the permissions

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
chrysh marked this pull request as ready for review August 19, 2026 19:37
/// PLDM device requests its own chunks, including retransmits);
/// `payload` must serve any in-range read.
///
/// Generic for static dispatch; `?Sized` admits `&dyn PayloadSource`.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to keep the API statically dispatched and avoid introducing trait-object support unless we have a concrete use case.

/// `Error` type effectively already did.
///
/// [`Ready`]: StageProgress::Ready
fn poll_stage(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@chrysh
chrysh marked this pull request as draft August 20, 2026 11:11
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

eRoT self-update

3 participants