Repository navigation
Report an action that throws after Stop() from RethrowExceptions [patch] - #76
Merged
Merged
Conversation
RethrowExceptions only read PollingTask, which learns of an action's exception on the tick after the action faults. After Stop() there is no later tick, so the final run's failure stayed on ActionTask unobserved. RethrowExceptions now also checks a faulted ActionTask. Fixes #56 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MDVSpB69ZHnwPkg4LgXgcx
…t in the test Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MDVSpB69ZHnwPkg4LgXgcx
|
3 tasks
This was referenced Oct 5, 2026
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.



Fixes #56
Problem
RethrowExceptions()only readPollingTask.Exception. An action's exception gets to the polling task only on the tick after the action faults. IfStop()was called while an action was still running, the loop exited normally and there was no later tick. The action's exception then stayed onActionTask, and nothing ever read it. So the usual shutdown sequence,Stop()thenRethrowExceptions(), silently lost the final run's failure.Change
RethrowExceptions()checks a faultedActionTask(underLock) when the polling task hasn't faulted. It rethrows throughExceptionDispatchInfoas before, so the action's stack trace is kept.Restart()still discards an unobserved action exception, the same way it already treats a faulted polling loop. The new remarks onRethrowExceptionssay this, and the existingRestartDoesNotRethrowTheStaleActionExceptiontest still covers it.Tests
RethrowExceptionsReportsAnActionThatThrowsAfterStop. The action blocks on a gate. The test callsStop(), waits for the polling loop to exit normally, then releases the action so it throws. It waits forActionTaskto finish and asserts thatRethrowExceptions()throws the action's exception. It uses no fixed sleeps.🤖 Generated with Claude Code
https://claude.ai/code/session_01MDVSpB69ZHnwPkg4LgXgcx
Generated by Claude Code