Skip to content

fix(core): wire dump_tool_output into production tool-result path#6368

Merged
bug-ops merged 1 commit into
mainfrom
fix/6364-dump-tool-output-dead-code
Jul 17, 2026
Merged

fix(core): wire dump_tool_output into production tool-result path#6368
bug-ops merged 1 commit into
mainfrom
fix/6364-dump-tool-output-dead-code

Conversation

@bug-ops

@bug-ops bug-ops commented Jul 17, 2026

Copy link
Copy Markdown
Owner

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.
  • Add dump_raw_tool_output, called from process_one_tool_result (the real production tool-result path) right after result classification and before maybe_summarize_tool_output truncates 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-existing dump_tool_error) or when debug dumps are disabled.
  • Confirmation-required tool calls are covered by the same call site with no extra wiring: handle_confirmation_phase resolves confirmed results into the same batch that process_one_tool_result processes.
  • The legacy #[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

  • New regression test module dump_raw_tool_output_tests.rs drives process_one_tool_result end-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.
  • Spot-checked the new tests are genuine regression guards by temporarily reverting the fix to a no-op — 4/6 new tests failed as expected.
  • cargo +nightly fmt --check clean
  • cargo clippy --profile ci -p zeph-core --all-targets --features scheduler -- -D warnings clean
  • cargo nextest run -p zeph-core --features scheduler --lib --bins — full suite passes (2020/2020, 2 skipped)
  • cargo build -p zeph-core --features scheduler clean after rebase onto latest origin/main
  • No playbook / coverage-status.md update 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.

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.
@github-actions github-actions Bot added documentation Improvements or additions to documentation rust Rust code changes core zeph-core crate bug Something isn't working size/L Large PR (201-500 lines) labels Jul 17, 2026
@bug-ops
bug-ops enabled auto-merge (squash) July 17, 2026 03:16
@bug-ops
bug-ops merged commit 77f3db5 into main Jul 17, 2026
43 checks passed
@bug-ops
bug-ops deleted the fix/6364-dump-tool-output-dead-code branch July 17, 2026 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working core zeph-core crate documentation Improvements or additions to documentation rust Rust code changes size/L Large PR (201-500 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dump_tool_output (raw pre-summarization tool-output debug dump, #6315) is dead code — never called in production

1 participant