Summary
findings get is the payoff command of the detector feature, and its human output falls short three ways:
- The RCA body renders as one raw, unwrapped blob. The CLI prints
rca.result verbatim (src/commands/findings/get.ts:102-112): no width wrapping, markdown (## Findings, **Root cause:**, backticks) printed literally, and — on real data — the first several hundred characters are analysis narration with sentences fused together (e.g. …this trace.git_repo is null. Let me examine the error spans.The failing_tool span…). The fused text is partly an upstream data problem, but the CLI displays it as-is and adds nothing.
- The human view drops the detector's actual classification.
--json carries results[0].data = {"category": "Tool call error"} and results[0].identified = true, but the human output shows only Category: Failure — the detector template label (categoryLabel(result.template) at src/commands/findings/get.ts:95), not what the detector concluded. Human and JSON views disagree on what "Category" means.
- The command is a workflow dead end.
traces get ends with View in TraceRoot: <url>; findings get ends at the RCA blob — no UI link, no next-step hint (traceroot traces get <trace-id> / traces export), in exactly the command where "what next" matters most.
How to replicate
traceroot findings get <finding-id> on a finding with a completed RCA.
- The
RCA: section opens with narration, prints markdown markers literally, and emits paragraph lines hundreds of columns wide.
- The detector block shows only the template label; compare
--json | jq '.results[0]' → {"data": {...}, "identified": true, ...}, none of which appears in the human output.
- The output ends after the RCA — no URL, no suggested follow-up command.
Root cause (confirmed)
All in renderFinding (src/commands/findings/get.ts:72-115):
- Lines 105-109 split
finding.rca.result on \n and push each line as-is — no wrapping or markdown handling.
- Line 95 prints the hardcoded template→label map;
result.data and result.identified (DetectorResultItem, src/api/generated/schema.ts:264-277) are never rendered (a comment at lines 84-86 says they deliberately stay JSON-only).
renderFinding returns after the RCA block. FindingDetail carries trace_id but no trace_url, so a UI link needs either the backend to provide one or a printed traceroot traces get <trace-id> hint as the bridge.
Impact
- The most valuable artifact the product produces — the root-cause analysis — is the least readable thing the CLI prints.
Category: Failure looks like the detector's verdict but is the template name; the real classification is invisible outside --json.
- The cross-linking loop that
traces get starts (its finding block points to findings get) never closes — there is no path onward.
Acceptance criteria
- The RCA body is wrapped to terminal width (non-TTY/
--json unaffected) with minimal markdown treatment: headings/bold styled or stripped, never printed as literal ##/**.
- The human output surfaces each result's
identified flag and data payload (e.g. Category: Tool call error (template: failure)).
- The output ends with a trace UI link (backend-provided) and next-step hints (
traceroot traces get <trace-id>, traceroot traces export <trace-id>).
--json output is unchanged.
- Rendering tests cover: long unwrapped paragraphs, markdown headings, a result with a
data payload, and the link/hint footer.
Summary
findings getis the payoff command of the detector feature, and its human output falls short three ways:rca.resultverbatim (src/commands/findings/get.ts:102-112): no width wrapping, markdown (## Findings,**Root cause:**, backticks) printed literally, and — on real data — the first several hundred characters are analysis narration with sentences fused together (e.g.…this trace.git_repo is null. Let me examine the error spans.The failing_tool span…). The fused text is partly an upstream data problem, but the CLI displays it as-is and adds nothing.--jsoncarriesresults[0].data = {"category": "Tool call error"}andresults[0].identified = true, but the human output shows onlyCategory: Failure— the detector template label (categoryLabel(result.template)atsrc/commands/findings/get.ts:95), not what the detector concluded. Human and JSON views disagree on what "Category" means.traces getends withView in TraceRoot: <url>;findings getends at the RCA blob — no UI link, no next-step hint (traceroot traces get <trace-id>/traces export), in exactly the command where "what next" matters most.How to replicate
traceroot findings get <finding-id>on a finding with a completed RCA.RCA:section opens with narration, prints markdown markers literally, and emits paragraph lines hundreds of columns wide.--json | jq '.results[0]'→{"data": {...}, "identified": true, ...}, none of which appears in the human output.Root cause (confirmed)
All in
renderFinding(src/commands/findings/get.ts:72-115):finding.rca.resulton\nand push each line as-is — no wrapping or markdown handling.result.dataandresult.identified(DetectorResultItem,src/api/generated/schema.ts:264-277) are never rendered (a comment at lines 84-86 says they deliberately stay JSON-only).renderFindingreturns after the RCA block.FindingDetailcarriestrace_idbut notrace_url, so a UI link needs either the backend to provide one or a printedtraceroot traces get <trace-id>hint as the bridge.Impact
Category: Failurelooks like the detector's verdict but is the template name; the real classification is invisible outside--json.traces getstarts (its finding block points tofindings get) never closes — there is no path onward.Acceptance criteria
--jsonunaffected) with minimal markdown treatment: headings/bold styled or stripped, never printed as literal##/**.identifiedflag anddatapayload (e.g.Category: Tool call error (template: failure)).traceroot traces get <trace-id>,traceroot traces export <trace-id>).--jsonoutput is unchanged.datapayload, and the link/hint footer.