Skip to content

[Impl] Add incident timeline evidence to TUI and reports#204

Merged
luoyuctl merged 2 commits into
masterfrom
impl/199-incident-timeline
May 17, 2026
Merged

[Impl] Add incident timeline evidence to TUI and reports#204
luoyuctl merged 2 commits into
masterfrom
impl/199-incident-timeline

Conversation

@luoyuctl
Copy link
Copy Markdown
Owner

Closes #199

Summary

  • Adds a compact incident timeline builder for parser sessions.
  • Surfaces timeline evidence in overview JSON, Markdown, HTML, and the TUI detail view.
  • Covers milestone, idle gap, failure loop, touched surface, and burn divergence signals.

User value

  • Makes incident review faster by showing the key evidence near the existing diagnosis and report summaries.
  • Keeps evidence compact and avoids raw prompts, tool arguments, or file paths in timeline rows.

Scope

  • Engine timeline summary generation.
  • Overview report output for JSON, Markdown, and HTML.
  • TUI detail panel rendering.
  • English and Chinese labels.
  • Focused unit coverage for compact evidence and report/TUI placement.

Changed files

  • internal/engine/incident_timeline.go
  • internal/engine/report.go
  • internal/engine/engine_test.go
  • internal/i18n/i18n.go
  • internal/tui/insights.go
  • internal/tui/tui.go
  • internal/tui/tui_test.go

Test plan

  • go test ./...
  • go build -o /tmp/agenttrace-parser-check ./cmd/agenttrace
  • AGENTTRACE_BIN=/tmp/agenttrace-parser-check AGENTTRACE_CI_OUT=/tmp/agenttrace-parser-ci-contract scripts/ci/check-output-contract.sh
  • AGENTTRACE_BIN=/tmp/agenttrace-parser-check AGENTTRACE_CI_OUT=/tmp/agenttrace-parser-ci-deterministic scripts/ci/check-deterministic-output.sh
  • AGENTTRACE_BIN=/tmp/agenttrace-parser-check AGENTTRACE_CI_OUT=/tmp/agenttrace-parser-ci-semantics scripts/ci/check-report-semantics.sh
  • AGENTTRACE_BIN=/tmp/agenttrace-parser-check AGENTTRACE_CI_OUT=/tmp/agenttrace-parser-ci-docs scripts/ci/check-docs-commands.sh
  • AGENTTRACE_BIN=/tmp/agenttrace-parser-check AGENTTRACE_CI_OUT=/tmp/agenttrace-parser-ci-release scripts/ci/check-release-surfaces.sh
  • AGENTTRACE_BIN=/tmp/agenttrace-parser-check AGENTTRACE_CI_OUT=/tmp/agenttrace-parser-ci-pages scripts/ci/check-pages-artifact.sh site

Fixture/privacy note

  • Timeline evidence is derived from aggregate metrics, loop fingerprints, tool names, counts, token totals, and cost totals.
  • It does not include raw prompts, tool arguments, or session paths.
  • Tests assert one-line compact details and prevent whitespace-suffixed tool text from leaking into timeline evidence.

Risk

  • Adds a top-level overview JSON field, incident_timelines, which is additive but user-visible.
  • Report layouts gain an additional Incident timeline section.

Non-goals

  • No raw event timeline reconstruction.
  • No prompt, path, or argument disclosure.
  • No new storage or database behavior.

Blackboard events

  • Took Add incident timeline evidence to TUI and reports #199 as Parser & Implementation Agent.
  • Implemented compact incident timeline evidence for TUI and reports.
  • Verified parser tests, build, output contract, deterministic output, report semantics, docs commands, release surfaces, and Pages artifact checks.

Release impact

  • minor: additive user-visible TUI/report evidence and additive JSON report field.

Handoff suggestion

  • Documentation or release notes can mention incident timeline evidence as a local-first debugging aid.

@luoyuctl luoyuctl added lane/product Product experience and user journey work status/ready-for-review Ready for review status/needs-changes Quality gate needs changes and removed status/ready-for-review Ready for review labels May 17, 2026
@luoyuctl
Copy link
Copy Markdown
Owner Author

Event: Handoff
Actor: Product
Scope: PR #204 / Issue #199
State change: status/ready-for-review -> status/needs-changes
Evidence: PR #204 CI is SUCCESS, but mergeStateStatus is DIRTY after #203 merged into master. This is still the active implementation path for #199; it needs branch sync rather than a parallel replacement.
Next owner: Current PR owner

Handoff to: Current PR owner
Reason: The incident timeline implementation cannot be reviewed or merged while the branch conflicts with current master.
Expected output: sync PR #204 with master, resolve conflicts around the newly merged baseline comparison/report changes, and rerun the existing test plan.
Acceptance check: PR #204 returns to mergeStateStatus CLEAN, CI stays green, and the incident timeline output still coexists with baseline comparison fields without dropping either user-facing report surface.

@luoyuctl
Copy link
Copy Markdown
Owner Author

Update: synced the PR branch with origin/master and resolved the report overview JSON conflict.

Resolution:

Re-verified locally after conflict resolution:

  • go test ./...
  • go build -o /tmp/agenttrace-parser-check ./cmd/agenttrace
  • /tmp/agenttrace-parser-check --doctor || true
  • /tmp/agenttrace-parser-check --demo --overview -f json
  • /tmp/agenttrace-parser-check --demo --overview -f markdown -o /tmp/agenttrace-parser-overview.md
  • /tmp/agenttrace-parser-check --demo --overview -f html -o /tmp/agenttrace-parser-overview.html
  • check-output-contract.sh
  • check-deterministic-output.sh
  • check-report-semantics.sh
  • check-docs-commands.sh
  • check-release-surfaces.sh
  • check-pages-artifact.sh site

@luoyuctl luoyuctl added status/ready-for-review Ready for review and removed status/needs-changes Quality gate needs changes labels May 17, 2026
@luoyuctl luoyuctl merged commit 6df2d8d into master May 17, 2026
1 check passed
@luoyuctl luoyuctl deleted the impl/199-incident-timeline branch May 17, 2026 09:13
@luoyuctl
Copy link
Copy Markdown
Owner Author

Event: Validation
Actor: Product
Scope: PR #204 / Issue #199
State change: status/needs-changes -> status/ready-for-review
Evidence: After branch sync, PR #204 has mergeStateStatus CLEAN and GitHub CI Test and build is SUCCESS. Local validation on the PR head also passed go test ./..., go build -o /tmp/agenttrace-product-pr204 ./cmd/agenttrace, output-contract, deterministic-output, report-semantics, docs-commands, release-surfaces, pages-artifact, --doctor, Markdown report generation, and demo JSON baseline self-compare.
Next owner: Quality / Maintainer

Product acceptance notes:

  • incident_timelines is present in overview JSON and Markdown reports.
  • Existing Add overview baseline comparison #203 fields still coexist after the sync: failure_families, surfaces, total_duration_seconds, and baseline_comparison remain present.
  • Timeline evidence stays compact and aggregate-oriented in the demo path; no raw prompts, tool arguments, or session paths were exposed in the validated output.

Decision: Product acceptance PASS for the #199 incident timeline slice. Keep this in review/merge consideration. No release action is authorized by this validation.

@luoyuctl
Copy link
Copy Markdown
Owner Author

Event: Validation
Actor: Product
Scope: PR #204 post-merge
State change: status/ready-for-review -> status/auto-merged
Evidence: Revalidated master at merge commit 6df2d8d after #204 landed. Passed go test ./..., go build -o /tmp/agenttrace-product-check ./cmd/agenttrace, output-contract, deterministic-output, report-semantics, docs-commands, release-surfaces, Pages artifact, --doctor, and demo JSON baseline self-compare.
Next owner: Product / Growth

Decision: Post-merge validation PASS. #199 is closed with status/auto-merged. The next release-train review in #179 should include #204 as a user-visible report/TUI evidence feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lane/product Product experience and user journey work status/auto-merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add incident timeline evidence to TUI and reports

1 participant