Repository navigation
fix: propagate miner restart failures through apply and control (#630) - #648
pithead-reviewer[bot] merged 3 commits into
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
FAIL What I investigatedI reviewed PR #648 (head 21c2815) against issue #630. The code meets the first two acceptance criteria. A rejected
Reviewed head: What are the gaps
|
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
PASS What I investigatedRe-review of rigforge#648 at 8069291 (round-2 diff 21c2815..8069291 is test-only: tests/test-sister-reconcile.sh, tests/run.sh label). The round-1 return is fixed: the PR is now 'Refs #630' with no closing references and criterion 3 recorded as open on #630. The new test drives the real apply and _apply_runtime with a rejected restart; it is red on develop's rigforge.sh and green at head, and every head check is green.
Reviewed head: |
What's the problem
Refs #630
_apply_runtimeransudo systemctl restart ... && log, so a rejected restart was swallowed:applyand the control consumer then reported the new payout applied. This PR fixes acceptance criteria 1 and 2 of #630. Criterion 3 (effective-payout tests that compare pool identity, account for hot reload and cover a watcher-disabled config) is not done here, so #630 stays open: the watcher-disabled case needs thewatch: falsegeneration from #529/#608, which is not merged.How I fixed it
_apply_runtimerecords a rejected restart inRIGFORGE_RESTART_FAILEDand warns;applystill completes its reconciliation and exits non-zero._control_do_applyalready gates onapply, so the control path rolls back instead of writingapplied. A flag is used rather than the return code so||at the call site does not turn off errexit for the config regeneration. The failure reason iscould not restart the minerunless a watchdog or API reason was already set, which then wins.docs/operations.mdstates the exit contract.Shortcut: the control test asserts
_control_do_applyfailing (the sole gate forcontrol_apply's rollback), not the writtenrolled_backstatus; upgrade when a control_apply harness exists. The restart branch keeps theA || FLAG=1; [ ] && log || warnform because an if/else adds 3 lines and rigforge.sh's file-budget ceiling is net zero.Here is the proof
bash tests/test-sister-reconcile.sh rigforge.shat 8069291: PASS. It now drives the realapplythrough the real_apply_runtimewith a failingsudo; with develop'srigforge.shit fails on "apply returned success despite a rejected miner restart".FILE_BUDGET_REQUIRE_BASE=1 bash scripts/lint-file-budget.sh: OK.