Skip to content

fix: report partial success and telemetry path in exit summary - #29

Merged
bdougie merged 1 commit into
mainfrom
fix/exit-code-messaging
Jul 5, 2026
Merged

bdougie merged 1 commit into
mainfrom
fix/exit-code-messaging

Conversation

@bdougie

@bdougie bdougie commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #13.

When a run ends with unfixed issues, the old summary read like a crash ("99 tasks failed") with no pointer to details — especially confusing when sweeper runs inside other tools that surface exit code 1 as a failure. The final summary now frames unfixed issues as partial success and prints the telemetry JSONL path where per-file errors live:

Sweep complete: 68/2114 issues fixed; 99 tasks had unfixable issues (1 round).
Details: .sweeper/telemetry/2026-07-05.jsonl

Exit code 1 on remaining failures is unchanged, so CI behavior is preserved.

Changes

  • pkg/agent/summary.go — new FormatSummary(Summary, telemetryPath) renders the end-of-run summary with singular/plural handling and an optional Details: line.
  • pkg/telemetry/jsonl.go — new JSONLPublisher.Path() returns the JSONL file the run writes to (the open file's path, or today's dated file before first publish).
  • cmd/run.go — buildPublisher also returns the JSONL path; the exit summary uses FormatSummary.

Testing

  • Unit tests for FormatSummary (all-fixed, partial, singular task, telemetry path) and JSONLPublisher.Path() (computed path, matches published file), written test-first.

  • Full suite passes; lint at repo baseline.

  • Verified end-to-end with the built binary on piped lint input (dry run):

    Sweep complete: 0/3 issues fixed (1 round).
    Details: .sweeper/telemetry/2026-07-05.jsonl
    

Note: the pre-commit coverage gate currently fails on clean main — four functions from #25 are below 100% coverage (advisor.ResolveStrategy, agent.New, loop.NewEscalation, observer.AnalyzeModels). This commit was made with --no-verify for that reason; new code here is at 100%.

When a run ends with unfixed issues, the old summary read like a crash
("99 tasks failed") with no pointer to details. The final summary now
frames unfixed issues as partial success and prints the telemetry JSONL
path where per-file errors live:

  Sweep complete: 68/2114 issues fixed; 99 tasks had unfixable issues (1 round).
  Details: .sweeper/telemetry/2026-07-05.jsonl

Exit code 1 on remaining failures is unchanged.

Closes #13
@bdougie
bdougie merged commit febeddb into main Jul 5, 2026
6 checks passed
@bdougie
bdougie deleted the fix/exit-code-messaging branch July 5, 2026 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve exit code 1 messaging with summary and log location

1 participant