Skip to content

orchestrator: Fold post-write readback into the Updatable contract - #444

Merged
rusty1968 merged 1 commit into
OpenPRoT:mainfrom
9elements:updatable-readback
Sep 3, 2026
Merged

orchestrator: Fold post-write readback into the Updatable contract#444
rusty1968 merged 1 commit into
OpenPRoT:mainfrom
9elements:updatable-readback

Conversation

@chrysh

@chrysh chrysh commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Ready now means the staged payload is verified to the archetype's discipline: a direct-flash adapter reads written pages back before reporting Ready, a PLDM device verifies inside its own transfer (PLDM Type 5 has no command to read a slot back; its Verify step runs before apply). This drops the planned ReadBack capability: a post-Ready check would leak archetype knowledge to the caller.

MockFlashDevice demonstrates the discipline: write steps hold written still, readback advances it, so written counts verified bytes; a mismatch is a staging error.

References 9elements#8.

@chrysh
chrysh force-pushed the updatable-readback branch from 49a609e to ba07869 Compare August 27, 2026 20:27
@chrysh
chrysh marked this pull request as ready for review August 27, 2026 20:29
Comment thread services/orchestrator/capabilities/src/updatable.rs Outdated
Comment thread services/orchestrator/capabilities/src/updatable.rs Outdated
Comment thread services/orchestrator/capabilities/src/updatable.rs
@rusty1968

Copy link
Copy Markdown
Collaborator

@CourtneyDrant can you review as well?

@chrysh
chrysh force-pushed the updatable-readback branch from ba07869 to 5681af3 Compare September 3, 2026 11:24
Ready now means the staged payload is verified to the archetype's
discipline: a direct-flash adapter reads written pages back before
reporting Ready, a PLDM device runs its own verify step after the
transfer. This drops the planned ReadBack capability; a separate
post-Ready check would leak archetype knowledge to the caller and PLDM
devices cannot serve it at all. The commit bullet now points at the
BootConfirmed gated flow instead of a TrialBoot capability.

UpdateError gains ReadbackMismatch. Folding it into Device would hide
the one device fault a caller can act on differently: the write path
reported success and the storage still disagrees, so a slot that keeps
mismatching is worth retiring rather than retrying.

MockFlashDevice demonstrates the discipline: writes hold written still,
readback advances it, and a mismatch fails the step. MockPldmDevice
takes a verify step of its own once the transfer completes, so a
finished transfer is not yet Ready.

Assisted-by: Claude (Fable 5)
Signed-off-by: Christina Quast <christina.quast@9elements.com>
@chrysh
chrysh force-pushed the updatable-readback branch from 5681af3 to 86288f5 Compare September 3, 2026 15:56
@rusty1968
rusty1968 merged commit fd1c4a8 into OpenPRoT:main Sep 3, 2026
5 checks passed
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.

4 participants