Skip to content

Add --summary to proofline ci review for GitHub Actions job summaries - #135

Open
arielonoriaga wants to merge 2 commits into
prooflinedev:mainfrom
arielonoriaga:feat/ci-review-summary
Open

arielonoriaga wants to merge 2 commits into
prooflinedev:mainfrom
arielonoriaga:feat/ci-review-summary

Conversation

@arielonoriaga

@arielonoriaga arielonoriaga commented Dec 1, 2026 •

Copy link
Copy Markdown

Summary

Adds an opt-in --summary [FILE] flag to proofline ci review so CI jobs can publish a readable GitHub-Flavored Markdown review summary alongside --annotations and --sarif:

  • --summary (no path): appends the rendered Markdown to GITHUB_STEP_SUMMARY without clobbering earlier steps in the same job (separated cleanly by \n\n in a single buffered write, accounting for existing bytes against GitHub Actions' 1 MiB step summary cap, and refusing cleanly if remaining space cannot fit the summary header).
  • --summary <FILE>: writes the rendered Markdown directly to an explicit file path (without requiring or touching GITHUB_STEP_SUMMARY).
  • Fail-fast validation: missing GITHUB_STEP_SUMMARY or blank explicit paths (--summary "", --summary " ") fail immediately before OIDC token exchange, org resolution, credential loading, or polling.
  • Honest outcome & gap reporting: preserves Proofline's "unknown is never safe" invariant — incomplete, failed, stopped, or timed-out reviews never render as clean; every review/code/environment gap names its recorded reason codes (including a fallback gap marker if reason_codes contains only blank strings); inconsistent open_items, unknown severities, and unmeasured --fail-on (absent open_items) are reported honestly without inventing labels.
  • Untrusted text & GitHub GFM safety: strips terminal/control and Unicode bidirectional controls via text::one_line and neutralizes raw HTML, Markdown links/images/emphasis/backticks, GFM table pipes (| / \|), GFM extended autolinks (https://, www.), and GitHub @mentions / mailto: / $ math blocks (including inside <code>...</code> table cells, verified against GitHub's live /markdown GFM API).
  • Verified provenance & size budget: cites only verified head locations (via sarif::location), excludes RESOLVED findings, includes finding IDs for proofline fix context, avoids dangling empty Assessments or Findings table headers under tight budgets, and never splits UTF-8 code points, HTML entities, tags, or backtick spans on truncation.
  • Zero new dependencies (Cargo.toml / Cargo.lock unchanged) and zero new module dependency cycles (src/summary.rs decoupled from CLI exit types).

Verification (on 83a28ce)

  • cargo fmt --check — passed
  • cargo clippy --locked --all-targets -- -D warnings — passed (0 warnings)
  • cargo test --locked --no-fail-fast — passed (167 passed, 0 failed, 1 pre-existing ignored across lib [75], http [42], local_patch [15], mcp [5], sarif [6], scan [10], update [1], and remaining suites)
  • Re-ran summary::tests (7 unit tests) and ci_review_summary* (2 integration tests) 5× consecutively — 5/5 passed
  • cargo deny check — advisories ok, bans ok, licenses ok, sources ok
  • Live GitHub /markdown (mode: "gfm") API check — confirmed neutralized output for links, images, autolinks, @mentions, mailto:, $ math, \|, and adjacent backtick payloads inside and outside <code> cells

This branch has not been deployed

No deployments
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