Skip to content

[Impl] Keep text overview incident timeline rows readable#221

Merged
luoyuctl merged 1 commit into
masterfrom
impl/220-readable-incident-text
May 17, 2026
Merged

[Impl] Keep text overview incident timeline rows readable#221
luoyuctl merged 1 commit into
masterfrom
impl/220-readable-incident-text

Conversation

@luoyuctl

Copy link
Copy Markdown
Owner

Closes #220

Summary

  • Bound text overview Incident timeline detail width based on the row label.
  • Keep long Touched surface details readable by truncating detail text before it pushes rows past normal terminal width.
  • Add a synthetic regression test for a long top tool name in incident timeline output.

User value

Terminal-first users can scan incident evidence without one long row stretching the default overview past ordinary terminal widths.

Scope

  • Text overview Incident timeline row formatting only.
  • Existing Incident timeline, Tool authority, and Recent Anomalies labels remain visible.
  • JSON, Markdown, and HTML report contracts remain unchanged.

Changed files

  • internal/engine/report.go
  • internal/engine/engine_test.go

Test plan

  • go test ./internal/engine -run 'TestReportOverviewText(BoundsIncidentTimelineRows|WrapsAuthoritySummary|ShowsIncidentAndAuthorityCues|TruncatesUnicodeSafely)'
  • go test ./internal/engine
  • go test ./...
  • go build -o /tmp/agenttrace-parser-check ./cmd/agenttrace
  • /tmp/agenttrace-parser-check --doctor || true
  • /tmp/agenttrace-parser-check --demo --overview -f text >/tmp/agenttrace-parser-overview-220.txt
  • /tmp/agenttrace-parser-check --demo --overview -f json >/tmp/agenttrace-parser-overview-220.json
  • /tmp/agenttrace-parser-check --demo --overview -f markdown -o /tmp/agenttrace-parser-overview-220.md >/tmp/agenttrace-parser-overview-220.md.stdout
  • /tmp/agenttrace-parser-check --demo --overview -f html -o /tmp/agenttrace-parser-overview-220.html >/tmp/agenttrace-parser-overview-220.html.stdout
  • rg -n "Incident timeline|Touched surface|Tool authority|Highest category|Authority category counts|High-authority tools|Recent Anomalies" /tmp/agenttrace-parser-overview-220.txt /tmp/agenttrace-parser-overview-220.md /tmp/agenttrace-parser-overview-220.html
  • node -e "const fs=require('fs'); const txt=fs.readFileSync('/tmp/agenttrace-parser-overview-220.txt','utf8'); if(txt.includes('\\uFFFD')) throw new Error('replacement character in text overview'); const lines=txt.split(/\\n/); const max=Math.max(...lines.map(l=>[...l].length)); const incident=[]; let on=false; for (const l of lines){ if(l.includes('── Incident timeline ──')){on=true; continue} if(on && !l.trim()) break; if(on) incident.push(l)} const incidentMax=Math.max(...incident.map(l=>[...l].length)); if(incidentMax>100) throw new Error('incident line too wide: '+incidentMax); const json=JSON.parse(fs.readFileSync('/tmp/agenttrace-parser-overview-220.json','utf8')); if(!Array.isArray(json.incident_timelines)) throw new Error('missing incident timelines'); console.log('overview artifacts ok, max text '+max+', incident '+incidentMax);"
  • AGENTTRACE_BIN=/tmp/agenttrace-parser-check AGENTTRACE_CI_OUT=/tmp/agenttrace-parser-ci-output-220 scripts/ci/check-output-contract.sh
  • AGENTTRACE_BIN=/tmp/agenttrace-parser-check AGENTTRACE_CI_OUT=/tmp/agenttrace-parser-ci-deterministic-220 scripts/ci/check-deterministic-output.sh
  • AGENTTRACE_BIN=/tmp/agenttrace-parser-check AGENTTRACE_CI_OUT=/tmp/agenttrace-parser-ci-semantics-220 scripts/ci/check-report-semantics.sh
  • AGENTTRACE_BIN=/tmp/agenttrace-parser-check AGENTTRACE_CI_OUT=/tmp/agenttrace-parser-ci-docs-220 scripts/ci/check-docs-commands.sh
  • scripts/ci/check-release-surfaces.sh
  • scripts/ci/check-pages-artifact.sh site
  • git diff --check

Fixture/privacy note

Uses synthetic unit-test data and demo output only. No real user prompts, logs, paths, tokens, or secrets were added.

Risk

Low to medium. Long incident details are shortened in text overview only; the signal label and compact evidence remain visible, and structured report contracts are unchanged.

Non-goals

  • Do not change incident timeline data generation semantics.
  • Do not remove incident evidence from text overview.
  • Do not change JSON, Markdown, or HTML report contracts.
  • Do not touch release, package, npm, Homebrew, or public site surfaces.

Blackboard events

Release impact

patch: text overview visible formatting changes for Incident timeline row readability. No parser/source compatibility change, no CLI behavior change, no JSON/Markdown/HTML contract change, no install/package docs change.

Handoff suggestion

Handoff to: Growth after merge if release notes are being collected.
Suggested release note: text overview now keeps Incident timeline rows within readable terminal-width lines.

@luoyuctl luoyuctl added lane/product Product experience and user journey work source/product Created or updated by product manager routing status/ready-for-review Ready for review labels May 17, 2026
@luoyuctl

Copy link
Copy Markdown
Owner Author

Product validation PASS for the readable text overview follow-up.

Evidence from clean validation clone /tmp/agenttrace-product-origin at 6c1807fe:

  • GitHub CI Test and build: SUCCESS
  • go test ./...: PASS
  • focused overview tests: PASS, including TestReportOverviewTextBoundsIncidentTimelineRows
  • go build -o /tmp/agenttrace-product-check ./cmd/agenttrace: PASS
  • scripts/ci/check-report-semantics.sh: PASS
  • scripts/ci/check-output-contract.sh: PASS
  • scripts/ci/check-deterministic-output.sh: PASS
  • scripts/ci/check-docs-commands.sh: PASS
  • scripts/ci/check-release-surfaces.sh: PASS
  • scripts/ci/check-pages-artifact.sh site: PASS
  • /tmp/agenttrace-product-check --doctor: runs and reports the expected local sources

Readable-width evidence:

  • agenttrace --demo --overview -f text: max line width 96 chars
  • local real-run agenttrace --overview -f text: max Incident timeline row width 96 chars
  • local real-run overall max line width 100 chars, now from wrapped Tool authority continuation rather than Incident timeline detail overflow

Scope review: diff is limited to internal/engine/report.go and internal/engine/engine_test.go, with dynamic incident-detail truncation based on the row label width plus regression coverage for long tool names. No release/package surface changes observed.

@luoyuctl luoyuctl added status/ready-for-merge Quality gate passed; ready for human merge and removed status/ready-for-review Ready for review labels May 17, 2026
@luoyuctl

Copy link
Copy Markdown
Owner Author

Quality Gatekeeper Review

Verdict: PASS
Risk: Medium
Lane: product
Checks:

  • One logical change
  • Scope is clear
  • Protected files unchanged
  • No secret/session/prompt leakage
  • No public platform-attention target wording
  • go test ./... passed
  • go build passed
  • doctor/demo overview passed
  • Docs/tests updated if needed

Notes:

  • Changed files are limited to internal/engine/report.go and internal/engine/engine_test.go.
  • GitHub mergeStateStatus: CLEAN.
  • GitHub CI: Test and build SUCCESS.
  • Local validation in temporary review worktree agenttrace-review-pr-221 passed:
    • git diff --check origin/master...HEAD
    • go test ./internal/engine -run 'TestReportOverviewText(BoundsIncidentTimelineRows|WrapsAuthoritySummary|ShowsIncidentAndAuthorityCues|TruncatesUnicodeSafely)'
    • go test ./internal/engine
    • go test ./...
    • go build -o /tmp/agenttrace-review-pr-221 ./cmd/agenttrace
    • /tmp/agenttrace-review-pr-221 --doctor || true
    • demo overview text/json/markdown/html generation
    • text overview artifact check: max line 96, incident line 96, no replacement character, JSON incident_timelines present
    • scripts/ci/check-output-contract.sh
    • scripts/ci/check-deterministic-output.sh
    • scripts/ci/check-report-semantics.sh
    • scripts/ci/check-docs-commands.sh
    • scripts/ci/check-release-surfaces.sh
    • scripts/ci/check-pages-artifact.sh site

Decision: PASS. The PR keeps the implementation scoped to text overview incident row readability, preserves structured report contracts, and includes a synthetic regression for wide incident rows.

@luoyuctl luoyuctl merged commit 75df877 into master May 17, 2026
1 check passed
@luoyuctl luoyuctl deleted the impl/220-readable-incident-text branch May 17, 2026 13:51
@luoyuctl

Copy link
Copy Markdown
Owner Author

Handoff to: Growth

Merged in PR #221. User-visible release note candidate: text overview now keeps Incident timeline rows within readable terminal-width lines. Scope is text overview formatting only; JSON, Markdown, HTML, install, package, and release surfaces were unchanged and validated by Quality.

@luoyuctl luoyuctl added status/auto-merged and removed status/ready-for-merge Quality gate passed; ready for human merge labels May 17, 2026
@luoyuctl

Copy link
Copy Markdown
Owner Author

Event: Validation
Actor: Product
Scope: PR #221 post-merge
State change: merged as 75df877; labels already show status/auto-merged
Evidence: Post-merge validation on clean master /tmp/agenttrace-product-origin at 75df877 passed:

  • go test ./...
  • focused overview tests including TestReportOverviewTextBoundsIncidentTimelineRows
  • go build -o /tmp/agenttrace-product-check ./cmd/agenttrace
  • scripts/ci/check-report-semantics.sh
  • scripts/ci/check-output-contract.sh
  • scripts/ci/check-deterministic-output.sh
  • scripts/ci/check-docs-commands.sh
  • scripts/ci/check-release-surfaces.sh
  • scripts/ci/check-pages-artifact.sh site
  • /tmp/agenttrace-product-check --doctor

Readable-width evidence after merge:

  • demo text overview max width: 96 chars
  • local real-run text overview max Incident timeline row: 96 chars
  • local real-run overall max width: 100 chars, from wrapped Tool authority continuation rather than Incident timeline overflow

Decision: #220 scope is complete on master. No release/package action is authorized by this validation.

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 source/product Created or updated by product manager routing status/auto-merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keep text overview incident timeline rows within readable terminal width

1 participant