refactor(pb): fix actor overdue alarm handling#4770
Conversation
PR Review: Overdue Alarm Check Refactor in Pegboard Actor2SummaryThis PR refactors the overdue alarm check in CorrectnessBehavior preserved in happy path. When an alarm is overdue at Alarm guard is correctly scoped.
Subtle change worth confirming: In the old code, the overdue-alarm branch inside match state.transition {
Transition::Sleeping | Transition::Reallocating { .. } => {
ctx.activity(SetSleepingInput {}).await?;
}
_ => {}
}When the overdue-alarm path results in a failed allocation (setting Code Quality
PerformanceNo concerns. The SecurityNo concerns. This is a pure internal lifecycle state machine refactor with no trust boundary impact. Test CoverageNo tests were added or updated. The changed path (actor stops while in sleep-intent with an overdue alarm) requires:
An integration test covering this scenario would prevent future regressions, especially since the old code's duplication was the kind of thing that could silently diverge. VerdictApprove with minor note. The refactor is correct and clearly improves the code. One thing to confirm: the new code now calls |
6851547 to
3cfcb16
Compare
df97819 to
3ff43a4
Compare
3cfcb16 to
31253f7
Compare
3ff43a4 to
0a19554
Compare
0a19554 to
ac23ccc
Compare
31253f7 to
1b63227
Compare

Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context.
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Checklist: