Repository navigation
Every command failure pickles across a worker - #3206
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013ejYrMLnLWah8wCDDcb57V
GitCommandError takes (repository, run), so a raised one unpickled in a ForkedProcessPool parent called __init__(message), died with TypeError and surfaced as BrokenProcessPool with the git message lost. CoordinationError already rebuilt itself from class, args and state; that __reduce__ now lives on the family owner, so every member pickles, and the test walks the family. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013ejYrMLnLWah8wCDDcb57V
trissim
marked this pull request as ready for review
October 25, 2026 02:52
trissim
enabled auto-merge
October 25, 2026 02:52
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
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.
GitCommandError(repo.py:41) is constructed from(repository, run), butBaseExceptionpickles an exception astype(*args). So when aForkedProcessPoolparent unpickles one raised in a worker, it calls__init__("Git in ...")and dies withTypeError: missing 1 required positional argument: 'run'. The pool then reportsBrokenProcessPooland the git message is lost. This turned up while working on #3200.CoordinationErroralready had the right__reduce__: it rebuilds throughcopyreg.__newobj__from the class, the args and the state, and keeps__cause__. It was declared only on that one branch of the family. This PR moves it to the family owner,CommandFailure, and deletes the copy, so all 28 members pickle, including GitCommandError, InstallRunning, InstallRolledBack, InterpreterWorkerDied, StoppedOwnerFailure, ObserverDied and UnprivateSidecarFile. None of them needs its own__reduce__.Proof
tests/test_command_failure_pickles.pyimports every module, walksCommandFailure's subclasses and round-trips each member. It checks the class, args, extra state and__cause__(28 cases), plus a realGitCommandErrorwith its git message and returncode. 29 passed.CoordinationErrorreduce also pass: test_unreadable_history_observation, test_deleted_thread_observation and test_sidebar_observation.🤖 Generated with Claude Code
https://claude.ai/code/session_013ejYrMLnLWah8wCDDcb57V