fix(core): wire TurnSummary.tool_calls to hook env export and notification body#6339
Merged
Merged
Conversation
bug-ops
enabled auto-merge (squash)
July 16, 2026 20:29
…ation body tool_calls was computed every turn but had no downstream consumer, unlike its sibling llm_requests. Export it as ZEPH_TURN_TOOL_CALLS to turn_complete hooks and include it in the notification body when non-zero. should_fire gating is left untouched (llm_requests remains the sole zero-activity gate). Closes #6335
bug-ops
force-pushed
the
feat/issue-6335/turn-tool-calls-unused
branch
from
July 16, 2026 20:37
b43edad to
ee5fc9b
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.
Summary
TurnSummary.tool_callswas computed every turn but had no downstream consumer, unlike its siblingllm_requests.ZEPH_TURN_TOOL_CALLStoturn_completehooks, mirroring the existingZEPH_TURN_LLM_REQUESTSexport.should_firegating is intentionally left untouched —llm_requestsremains the sole zero-activity gate, since a turn can legitimately havetool_calls == 0withllm_requests > 0.ZEPH_TURN_TOOL_CALLSto the three places that already documentZEPH_TURN_LLM_REQUESTSas aturn_completehook env var:crates/zeph-config/src/hooks.rs,config/default.toml,crates/zeph-config/src/migrate/session.rs.Closes #6335
Test plan
cargo +nightly fmt --checkcargo clippy --profile ci -p zeph-core --all-targets --features scheduler -- -D warningscargo clippy --profile ci -p zeph-config --all-targets -- -D warningscargo nextest run --config-file .github/nextest.toml -p zeph-core --features scheduler --lib --bins(1999/1999 passed)cargo nextest run --config-file .github/nextest.toml -p zeph-config --lib --bins(849/849 passed)cargo test --doc -p zeph-core(45/45 passed)ZEPH_TURN_TOOL_CALLShook env export