Skip to content

Document fail-fast error handling philosophy in FanOut#7

Closed
Copilot wants to merge 3 commits intofeature/implement_fan_outfrom
copilot/sub-pr-6
Closed

Document fail-fast error handling philosophy in FanOut#7
Copilot wants to merge 3 commits intofeature/implement_fan_outfrom
copilot/sub-pr-6

Conversation

Copy link
Copy Markdown

Copilot AI commented Jan 2, 2026

Addresses review feedback requesting no panic recovery in FanOut's Run() method. The implementation already follows fail-fast principles; this PR makes the design decision explicit.

Changes

  • Package documentation: Added "Error Handling" section documenting fail-fast philosophy
  • Run() documentation: Clarified panic behavior for multiple calls and absence of recovery
  • Build artifacts: Added coverage.txt to .gitignore

Behavior

// Run() panics on programmer error (multiple calls)
fo.Run(ctx, input)
fo.Run(ctx, input) // panics: "fanout: Run() called multiple times"

// No recovery in dispatcher - any panic propagates and crashes
// This prevents silent corruption and ensures correct behavior

The dispatcher goroutine intentionally lacks panic recovery to ensure failures are visible and immediate rather than masked.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits January 2, 2026 16:23
Co-authored-by: SangTran-127 <76774572+SangTran-127@users.noreply.github.com>
Co-authored-by: SangTran-127 <76774572+SangTran-127@users.noreply.github.com>
Copilot AI changed the title [WIP] Update FanOut implementation for error handling improvements Document fail-fast error handling philosophy in FanOut Jan 2, 2026
Copilot AI requested a review from SangTran-127 January 2, 2026 16:25
@SangTran-127 SangTran-127 deleted the copilot/sub-pr-6 branch January 16, 2026 05:39
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