Skip to content

feat: retry pending fault propagation to disconnected peers#679

Merged
jorgesg82 merged 2 commits into
developmentfrom
feat/fault-propagation-retry
Jul 15, 2026
Merged

feat: retry pending fault propagation to disconnected peers#679
jorgesg82 merged 2 commits into
developmentfrom
feat/fault-propagation-retry

Conversation

@jorgesg82

@jorgesg82 jorgesg82 commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #676. When propagate_fault() fails to send the FAULT order (e.g. TCP connection not yet established), the target is marked pending and retried automatically from check_transitions() while the board remains faulted.

Changes

FaultController.hpp

  • Added bool pending to FaultPropagationTarget struct
  • Added retry_pending_fault_propagation() private method declaration

FaultController.cpp

  • Added #include "HALAL/Services/Time/Scheduler.hpp"
  • Added fault_propagation_retry_period_us constant (100ms)
  • propagate_fault(): sets pending = true before sending, clears on success. Warning message updated to "will retry".
  • retry_pending_fault_propagation(): iterates targets, retries send_order() for pending ones, clears pending on success.
  • check_transitions(): calls retry_pending_fault_propagation() when faulted under STLIB_ETH, throttled to every 100ms via Scheduler::get_global_tick().

Behavior

Scenario What happens
Fault + all peers connected propagate_fault() sends to all, all pending = false, retry is a no-op
Fault + some peers disconnected propagate_fault() marks disconnected as pending. Retried every 100ms until TCP comes up and send succeeds
Fault + no peers connected All targets marked pending. Retried every 100ms until connections establish

Retry is throttled to 100ms to avoid hammering the TCP stack in the tight main loop. No new public API — retry is driven automatically from check_transitions() which the application already calls in its main loop.

@github-actions

Copy link
Copy Markdown
Contributor

ST-LIB Release Plan

  • Current version: 6.3.0
  • Pending changesets: 1
  • Highest requested bump: patch
  • Next version if merged now: 6.3.1

Pending changes

  • patch Retry pending FAULT order propagation to disconnected peers via check_transitions() (.changesets/fault-propagation-retry.md)

@jorgesg82 jorgesg82 requested a review from Copilot July 15, 2026 14:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@jorgesg82 jorgesg82 force-pushed the feat/fault-propagation-retry branch 3 times, most recently from d9d2f2b to 3068097 Compare July 15, 2026 14:43
@jorgesg82 jorgesg82 force-pushed the feat/fault-propagation-retry branch from 3068097 to e469a2d Compare July 15, 2026 14:45
@jorgesg82 jorgesg82 requested a review from Copilot July 15, 2026 14:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@jorgesg82 jorgesg82 merged commit 31a9fc0 into development Jul 15, 2026
24 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.

2 participants