Conversation
Add Event::RecoveryUnavailable so a platform driver out of recovery sources routes through FailurePolicy (Isolable/Cascading gate-and-skip, Required locks) instead of EffectFailed's unconditional lockdown. Shares the exhaust_recovery arm with the retry-cap path so the two can never disagree. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Wire RecoveryUnavailable into the random_event() property-test fuzzer and document its transitions in orchestrator-machine.md, alongside the existing retry-cap exhaustion path it shares exhaust_recovery with. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
rusty1968
marked this pull request as ready for review
September 18, 2026 17:26
This was referenced Sep 18, 2026
Contributor
|
The code is right, but in case we want to add another one for regression testing: All six new tests deliver /// A stale `RecoveryUnavailable` arriving after the machine left
/// `Recovering` (e.g. the walk already completed) is silently discarded:
/// no effects, no state change.
#[test]
fn recovery_unavailable_outside_recovering_is_discarded() {
let (effects, state) = drive(
passive_required(&[C0, C1]),
&[
BOOT,
Event::VerificationPassed(C0),
Event::VerificationPassed(C1),
// Machine is now Ready.
Event::RecoveryUnavailable(C0), // stale: not in Recovering
],
);
assert_eq!(state, State::Ready);
assert!(!effects.contains(&Effect::AssertReset(C0)));
assert!(!effects.contains(&Effect::ReportIsolated(C0)));
assert!(!effects.contains(&Effect::ReportRecoveryFailed(C0)));
assert!(!effects.contains(&Effect::LatchLockdown));
} |
chrysh
added a commit
to 9elements/openprot
that referenced
this pull request
Sep 21, 2026
Source exhaustion is a verdict, not a fault: it travels on the Ok side as RestoreOutcome::SourceExhausted so the platform driver can report Event::RecoveryUnavailable and the component is gated per policy, instead of the whole platform locking. Matches the verdict-vs-error contract in OpenPRoT#473. Assisted-by: Claude:claude-opus-4-6 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.
Summary
The platform always knows when it's out of recovery slots; until now it had no way to tell the orchestrator except by returning an actuation error, which locked the whole platform regardless of policy.
Supersedes #445 — that branch forked before main picked up b18b78c/5060c36, which independently fixed the walk-hang and stale-verdict issues raised in that PR's review; this branch is rebased on top of those fixes rather than reintroducing them.
Test plan