fix(execution): treat empty initial turns as successful terminal responses (light-tested) - #2659
Open
1688mengdie wants to merge 1 commit into
Open
Conversation
…onses A turn whose first round carries only system-injection user messages (no real user content) is finalized locally without a model request; the success whitelist only accepts max_rounds and repeated_tool_failures, so this terminal reason classifies as failure even though the turn ended exactly as designed. Add empty_initial_turn to the whitelist so locally synthesized terminal turns settle as success like the other no-model-request reasons. Note: at this baseline no production path emits empty_initial_turn yet; this is a defensive alignment so the terminal reason settles correctly once an empty-input first-round guard is introduced. Test: cargo check --locked -p bitfun-core --jobs 4 (exit 0) AI: This change was assisted by AI and lightly tested.
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.
Closes #2658
Summary
A turn whose first round carries only system-injection user messages (no real user content) is finalized locally without a model request; the success whitelist only accepts max_rounds/repeated_tool_failures, so this terminal reason classifies as failure. Add empty_initial_turn to the whitelist so locally synthesized terminal turns settle as success like the other no-model-request reasons.
Note: no production path emits empty_initial_turn at this baseline (grep zero hits across the tree at 32f2427); this is a defensive alignment so the reason settles correctly once an empty-input first-round guard is introduced upstream.
Changes
Testing
Environment
All platforms; baseline 32f2427.
AI-assisted change, reviewed and verified as described above (light-tested locally).