From 2dfda31b260799d953397e815d18548a7ba3a40d Mon Sep 17 00:00:00 2001 From: Jobdori Date: Sat, 4 Apr 2026 16:35:33 +0900 Subject: [PATCH] feat(tools): wire SummaryCompressor into lane.finished event detail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The SummaryCompressor (runtime::summary_compression) was exported but called nowhere. Lane events emitted a Finished variant with detail: None even when the agent produced a result string. Wire compress_summary_text() into the Finished event detail field so that: - result prose is compressed to ≤1200 chars / 24 lines before storage - duplicate lines and whitespace noise are removed - the event detail is machine-readable, not raw prose blob - None is still emitted when result is empty/None (no regression) This is the P1.4 wiring item from ROADMAP: 'Wire SummaryCompressor into the lane event pipeline — exported but called nowhere; LaneEvent stream never fed through compressor.' cargo test --workspace: 643 pass (1 pre-existing flaky), fmt clean. --- rust/crates/tools/src/lib.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rust/crates/tools/src/lib.rs b/rust/crates/tools/src/lib.rs index 4b9d98b..aaeb346 100644 --- a/rust/crates/tools/src/lib.rs +++ b/rust/crates/tools/src/lib.rs @@ -16,6 +16,7 @@ use runtime::{ mcp_tool_bridge::McpToolRegistry, permission_enforcer::{EnforcementResult, PermissionEnforcer}, read_file, + summary_compression::compress_summary_text, task_registry::TaskRegistry, team_cron_registry::{CronRegistry, TeamRegistry}, worker_boot::{WorkerReadySnapshot, WorkerRegistry}, @@ -3162,12 +3163,15 @@ fn persist_agent_terminal_state( }); } else { next_manifest.current_blocker = None; + let compressed_detail = result + .filter(|value| !value.trim().is_empty()) + .map(|value| compress_summary_text(value.trim())); next_manifest.lane_events.push(LaneEvent { event: LaneEventName::Finished, status: status.to_string(), emitted_at: iso8601_now(), failure_class: None, - detail: None, + detail: compressed_detail, }); } write_agent_manifest(&next_manifest)