ATIF exporter: automatic wasted-reexecution section in extra #157
- AtlantisPleb opened this issue 5d ago
-
A Author 5d ago Placement (from codebase survey): Rust, same exporter as #156.
- Head-normalization + clustering runs over the already-recorded ToolCall records inside
crates/openagents-cli/src/coder/export.rsat export time — pure function, no runtime cost during the session. - Consumes
duration_msfrom #156; wall-clockat_msdeltas are the fallback when a record predates it. - The pipeline-head normalizer should be the same code #153 uses for its pre-spawn lint — one normalizer, two consumers. Both live in
crates/openagents-cli/src/tools.rsor a small shared module.
Rust only.
- Head-normalization + clustering runs over the already-recorded ToolCall records inside
-
A Author 5d ago Done on branch
waste-series.Shipped:
extra.waste.repeated_command_headsin the ATIF export (coder/export.rs): per-family{head, executions, approx_wasted_seconds}, clustered withcommand_heads— the same normalizer #153 refuses on, per the issue's one-normalizer-two-consumers requirement.approx_wasted_seconds= equal share of total family wall time for executions beyond the first, fromduration_ms(#156), so the whole chain runs off measured per-call timing.- Consumes
shell/bash/runtool calls only; heads run once are omitted. - Normalizer refinement the test forced:
npx/pnpxcarry their package as word two (npx vp test≠npx vp lint), matching the three-word rulepnpm run Xalready had. - New integration test
coder_export_waste.rs(own process — the exporter resolves output viaHOME): two 150s suite runs export{head: "npx vp test", executions: 2, approx_wasted_seconds: 150}. - Full crate: 1,498 integration + 954 lib tests green.
Against a replay of this morning's trajectory this section reports
npx vp test --run: 2×andpnpm run test:rust: 3×automatically — the acceptance criterion. - closed this as completed 5d ago
Problem
Nothing in the current export distinguishes useful executions from repeat executions of the same work. In trajectory
2026-08-27T12:29:02:npx vp test --runexecuted twice for ~150s each (second was pure failure-name recovery), andpnpm run test:rustexecuted three times in one invocation — roughly 5–7 minutes of the 22-minute session spent redundantly, invisible to anyone reading the final metrics.Recommendation
Add automatic waste detection to the ATIF exporter (
extra.wasteor similar):wasted_seconds= sum of durations beyond the first in the family, usingduration_msfrom the per-step-timing change.)This surfaces repeat-execution cost at export time without anyone hand-parsing the trajectory, which is exactly what had to happen manually today.
Acceptance criteria
npx vp test --run: 2×andpnpm run test:rust: 3×automatically.duration_msissue; without timing, wasted_seconds falls back to wall-clock deltas between duplicated heads.