Repository navigation
fix(proposer): reject replies from failed CLI processes - #235
Open
OUAO-FRANK wants to merge 1 commit into
Open
OUAO-FRANK wants to merge 1 commit into
OUAO-FRANK wants to merge 1 commit into
Conversation
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.
Problem
A proposer process that exits non-zero can still leave assistant text or
output/answer.md. OpenCode replies without a structured error event and Claude JSON results with nonempty text were accepted despite that exit status, skipping retries and creating a successful audit-cache entry from a failed session.Change
Reject non-zero exit codes before accepting either reply source. Preserve the parsed attempt cost so failed-call accounting and subsequent retry totals remain correct. Exit0 handling and the existing structured-error checks remain unchanged.
Fixes #234.
Validation
Linux, Python3.12.3, base6868817:
python3 -m unittest discover -s tests -v:73 tests pass.ruff check harness2 testsandruff format --check harness2/core/proposer.py tests/test_proposer_exit.py:pass.python3 -m compileall -q harness2 tests;git diff --check:pass.Tests launch local executable protocol stand-ins through real Proposer.call; no executor checkout or model API is used. They cover both channels, retained0.25 cost on failure, no successful cached reply, exit0 controls and a failed-then-successful retry totaling0.5. Initial Linux export checks failed because Windows Git converted the archive to CRLF; re-exporting the exact tracked blobs with core.autocrlf=false restored the original fixture hashes and Shell scripts, without source/fixture/CI changes.
Related: merged#13 rejects structured OpenCode session errors, while this fixes process-status failures without such events. Open#183 retains timeout spend and concerns a different path.
AI assistance: OpenAI Codex investigated, implemented and tested the change and drafted this description. No live provider behavior or human self-review is claimed.