Conversation
One managed device's restore mechanism: rewrite the active image from the board-configured recovery source. Ok means the mechanism completed, not that the image is good - judging the restored image stays with the verifier on the re-walk, so a restore can never forge a verdict. Errors are actuation faults only and are treated fail-closed. restore takes the attempt count from Effect::RecoverComponent so an implementor holding several sources can pick a different one each try. A count kept by the device would drift, because it never sees which attempt succeeded. 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.
The
Recoverycapability trait: rewrite one managed device's active image fromits board-configured recovery source. This is the seam
Effect::RecoverComponentneeds, which currently falls through toErr(EffectError)in the platform driver.Okmeans the mechanism completed, not that the image is good. Judging therestored image stays with the verifier on the re-walk, so a restore can never
forge a verdict. Errors are actuation faults only and are treated fail-closed.
restoretakes theattemptcount straight from the effect, so an implementorholding several sources can pick a different one each try (slot A on 0, slot B
on 1, golden on 2). A count kept by the device would drift, because it never
sees which attempt succeeded.
Trait only: no driver executor, no
BoardCapabilitieschange, no board wiring.Those come in a follow-up once the open question below is settled.
Open question, asked in #382: what should the driver do when it runs out of
sources before the core runs out of attempts? This PR says exhausted is an
actuation error, which fail-closes and lets the board's source count silently
set the real retry cap. The alternative is clamping to the last source.
Draft until #382 is answered.
Related: #48.