fix(core): wire dump_tool_output into production tool-result path#6368
Merged
Conversation
DebugDumper::dump_tool_output (raw pre-summarization tool-output debug dump, #6315) had no reachable production call site — the only callers were #[cfg(test)]-gated legacy functions superseded by process_one_tool_result. Add dump_raw_tool_output, called after tool result classification but before maybe_summarize_tool_output truncates or summarizes the output, so a blob that would otherwise be summarized away is still captured for debugging.
bug-ops
enabled auto-merge (squash)
July 17, 2026 03:16
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
DebugDumper::dump_tool_output(raw pre-summarization tool-output debug dump, added in debug_dump: dump_tool_output writes raw tool-output text unredacted #6315) had no reachable production call site — every caller was#[cfg(test)]-gated, so the dedicated forensic artifact was never produced in a real session despite[debug] enabled = true.dump_raw_tool_output, called fromprocess_one_tool_result(the real production tool-result path) right after result classification and beforemaybe_summarize_tool_outputtruncates or summarizes the output — so a blob that would otherwise be summarized away before reaching message history is still captured, PII-scrubbed if enabled, no-op on error (errors go through the pre-existingdump_tool_error) or when debug dumps are disabled.handle_confirmation_phaseresolves confirmed results into the same batch thatprocess_one_tool_resultprocesses.#[cfg(test)]-only functions (handle_tool_result,process_successful_tool_output,handle_confirmation_required) are retained as test scaffolding and documented as such — their green coverage is what let this defect go unnoticed.Closes #6364
Test plan
dump_raw_tool_output_tests.rsdrivesprocess_one_tool_resultend-to-end (the real production path, not the legacy#[cfg(test)]harness), covering: success writes a dump file, raw content captured before truncation, PII-filter-enabled/disabled scrubbing, no-op on error, no-op when debug dumps disabled.cargo +nightly fmt --checkcleancargo clippy --profile ci -p zeph-core --all-targets --features scheduler -- -D warningscleancargo nextest run -p zeph-core --features scheduler --lib --bins— full suite passes (2020/2020, 2 skipped)cargo build -p zeph-core --features schedulerclean after rebase onto latestorigin/maincoverage-status.mdupdate required — this reconnects an existing feature's (debug_dump: dump_tool_output writes raw tool-output text unredacted #6315) production call site rather than adding new user-facing functionality; debug_dump: dump_tool_output writes raw tool-output text unredacted #6315's existing coverage-status row already tracks this feature.