sumo_qa_format_risk_ledger
Renders a risk-to-test traceability ledger as a markdown appendix for code review. Validates input rows and outputs a table, one-line summary, and uncovered blocker count.
Instructions
Validate and render a risk-to-test traceability ledger as a markdown appendix (issue #144). FILE/FORMAT PLUMBING ONLY — the host LLM identifies the risks; this tool never infers them.
Each row is a dict with: risk_id (stable within this response),
risk (the statement), source_anchor (file:line or domain term),
test (a test id OR a 'planned: …' check), evidence_status (one of
planned / passing / failing / stale / accepted_residual), residual
(one of open / accepted / mitigated / blocker), and an optional
repo_map_node_id linking to a .sumo-qa/repo-map.json node.
Returns the rendered markdown table (the structured appendix the
markdown-first verdict carries), a one-line compact summary, the row
count, and the count of uncovered blockers (rows that are not passing,
not accepted, and marked residual=blocker — the signal the review
workflow uses to refuse safe-to-merge). The table is bounded by
max_rows so a large ledger stays inside the host token budget.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | ||
| max_rows | No |