Repository navigation
fix(refiner): emitter validation rejections are feedback, not a fatal model failure - #86
Merged
Merged
Conversation
… model failure A transcription turn turned any emitter exception into a coding-turn error, which the Implementer reports as ModelCallFailed and which stops the owning Run. On 2026-10-09 a 598 s Qwen3.8-27B emission that the emitter's own validation rejected (goal_view_mutable) ended a mango build that way. - EpisodeModuleEmitter.emit takes optional repair_feedback (added to the prompt only when given) and attaches the model's raw source to an EpisodeEmissionError raised by validation (rejected_source). - emit_modules gives each rejected module one repair attempt with the rejection and the rejected source. A module still rejected is reported in EmittedSources.rejections; its rejected source, when there is one, is written so candidate admission reports the same deficit and the next unit repairs the existing file with the coding agent. - The transcription turn succeeds and names each rejection in its text and native result. Model-call failures still raise and stop the turn. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
wilke
force-pushed
the
fix/emitter-rejection-feedback
branch
from
October 9, 2026 22:13
de7c205 to
6bd2d01
Compare
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
The mango build
build_request_30506a4d…ran on Qwen3.8-27B on 2026-10-09. The Implementer's transcription ofasm_next_broker_probestreamed for 598 s and the model call succeeded. The emitter's own validation then rejected the module:TranscribedTurnSession.run_turnturns any exception into a coding-turn error. That surfaces asModelCallFailed: implementer coding call failed; its owning Run must stop., and the build endedinterruptedwith no receipt. Two other paths already treat anEpisodeEmissionErroras a deficit, not a crash: the Builder (service.py) and candidate admission (candidate_source.py).Fix
EpisodeModuleEmitter.emit:repair_feedback, added to the prompt asrejected_previous_emissiononly when given, so the ordinary Builder prompt is unchanged;EpisodeEmissionErrornow carries the model'srejected_source.emit_modules:EMISSION_ATTEMPTS = 2);EmittedSources.rejections, and its rejected source (when there is one) is written to the workspace;final_textandnative_result["rejections"].ModelCallFailed, transport errors) still stop the turn as before.Tests
tests/iterative_episode_refiner/test_emitter_transcription.py: 6 new tests covering:ModelCallFailedstill propagating;rejected_sourceand adding the feedback to the prompt only when given.tests/episode_builder/*,*emit*), this branch has the same 4 failures asorigin/main, so none are new:test_api_failure_stops_builder[emission];test_repeatable_call_materialization;test_emitter_failure_is_a_turn_error_and_writes_nothing, whose tmp dir is not empty before the turn runs.Touches the same
with model_transport_scope(...)block intranscription.pyas #85 (role_scope("emitter")). Whichever merges second needs a trivial rebase.🤖 Generated with Claude Code