Skip to content

fix(execution): treat empty initial turns as successful terminal responses (light-tested) - #2659

Open
1688mengdie wants to merge 1 commit into
GCWing:mainfrom
BitFun-SIG:fix/execution-engine-empty-initial-turn-whitelist
Open

fix(execution): treat empty initial turns as successful terminal responses (light-tested)#2659
1688mengdie wants to merge 1 commit into
GCWing:mainfrom
BitFun-SIG:fix/execution-engine-empty-initial-turn-whitelist

Conversation

@1688mengdie

Copy link
Copy Markdown

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

  • src/crates/assembly/core/src/agentic/execution/execution_engine.rs: the success whitelist (:4983) gains "empty_initial_turn" next to "max_rounds" | "repeated_tool_failures" (single line).
  • Commit: 5e3c861 — fix(execution): treat empty initial turns as successful terminal responses

Testing

  • cargo check --locked -p bitfun-core --jobs 4 → exit 0
  • cargo test --locked -p bitfun-core --lib --features agent-runtime --jobs 4 execution_engine → 48 passed, 0 failed (the agentic tree is behind the agent-runtime feature gate since the crate has default = [])

Environment

All platforms; baseline 32f2427.


AI-assisted change, reviewed and verified as described above (light-tested locally).

…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: empty initial turns finalize as failures instead of successful terminal responses

1 participant