Skip to content

feat(report): render the fix job summary from a saved envelope via report --from#1854

Merged
BartWaardenburg merged 1 commit into
mainfrom
feat/report-from-fix-summary
Jul 13, 2026
Merged

feat(report): render the fix job summary from a saved envelope via report --from#1854
BartWaardenburg merged 1 commit into
mainfrom
feat/report-from-fix-summary

Conversation

@BartWaardenburg

Copy link
Copy Markdown
Collaborator

Adds EnvelopeKind::Fix so fallow report --from <fix-results.json> --format github-summary renders the auto-fix job summary natively, closing the fix-kind gap that kept summary-fix.jq as the last jq renderer the action could not retire (advisor plan 027 follow-up).

No wire change. The fallow fix --format json envelope carries no top-level kind, and it stays that way: crates/output/src/fix.rs, the schema, and the TS contracts are untouched. report --from detects the fix envelope by field presence (both a fixes array and a numeric total_fixed, the stable FixJsonOutput root keys); the fix envelope is the only kind-less document fallow emits, so the signal is unambiguous, and genuinely unrecognized documents keep the existing "missing top-level kind" error.

The render path reuses the existing render_fix_summary (already a 1:1 port of summary-fix.jq), so report --from output is byte-identical to the direct fallow fix --format github-summary run, with zero shape-drift risk. github-annotations for the fix kind emits nothing, matching the bundled action (which no-ops annotations for fix).

Verified: 31 github-format tests green (incl. new render_summary_fix_mirrors_render_fix_summary, render_annotations_fix_is_empty, and the field-detection unit tests with a positive and a kind-stripped-negative case); neuter-checked; clippy -D warnings and fmt clean; real-world smoke confirms byte-identical parity on both the empty ("No fixable issues found") and non-empty (table + details) cases.

Recorded follow-up: render_fix_summary has a pre-existing "would apply 1 fixes" pluralization nit (unchanged here; renders identically both ways).

…ummary

Add EnvelopeKind::Fix so `fallow report --from <fix-results.json> --format
github-summary` renders the auto-fix job summary natively, mirroring the
bundled action/jq/summary-fix.jq renderer. The fix envelope carries no
top-level `kind` (crates/output/src/fix.rs stays kind-less: no wire change,
no schema variant, no docs/output-schema.json regen), so report --from
detects it by field presence (a `fixes` array plus a numeric `total_fixed`)
and routes it through the existing render_fix_summary port.

github-annotations for the fix kind renders nothing, matching the bundled
action which no-ops annotations for the fix command (annotate.sh returns
early on FALLOW_COMMAND=fix; there is no annotations-fix.jq).

Tests: field-detection unit tests (positive + rejects other kind-less docs),
render_summary(Fix) mirrors render_fix_summary and carries summary-fix.jq's
sections, render_annotations(Fix) is empty, plus Fix added to the report-from
round-trip parity and em-dash guard loops.
@BartWaardenburg BartWaardenburg merged commit 26d268c into main Jul 13, 2026
19 checks passed
@BartWaardenburg BartWaardenburg deleted the feat/report-from-fix-summary branch July 13, 2026 21:14
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.

1 participant