Skip to content

Write a JUnit XML report from ci review - #55

Closed
dcsys-dev wants to merge 1 commit into
prooflinedev:mainfrom
dcsys-dev:feat/junit-report
Closed

dcsys-dev wants to merge 1 commit into
prooflinedev:mainfrom
dcsys-dev:feat/junit-report

Conversation

@dcsys-dev

Copy link
Copy Markdown

proofline ci review --junit FILE writes the retained pull-request review as JUnit XML, next to --sarif FILE, for CI systems that render a test report (Jenkins, GitLab CI and others).

  • Suite: one per environment assessment (named environment: <name>), one for the code lane, and a review suite only when the review did not complete.
  • Failure: an open finding (type SERIOUS or WARNING, with finding ID, domain, cited file:line and claim) or a BLOCKED check.
  • Error: an incomplete lane, the same condition that exits 2.
  • Pass: a resolved, dismissed or accepted-risk finding, with state: in its <system-out>.

Exit code unchanged: --fail-on still decides it, and the file never does.

Expiry note: the report reads no clock, so a dismissal or risk acceptance that has expired still passes in the file. The server's open_items count, which --fail-on uses, does honor expiry.

Details:

  • src/junit.rs is a closed projection like src/sarif.rs and reuses its subject check and code_location. A wrong or non-pull-request review is refused before any file is written, also while --timeout polls.
  • Every attribute and text node is escaped; characters XML 1.0 forbids are dropped and no CDATA is written.
  • Finding gains the optional validation field the API already returns. The claim's first line is the failure message, as the API gives no title.
  • A <testcase> carries no <properties>, as in the Jenkins junit-10.xsd; review facts are suite properties.

Validation: fmt, clippy -D warnings, cargo test --all-features and cargo deny check pass on 1.98.1.
tests/junit.rs runs the binary against a fake console in 10 tests and reads each report with a strict structural reader.

`proofline ci review --junit FILE` writes the retained pull-request
review as JUnit XML, the one report format Jenkins, GitLab CI,
Buildkite, CircleCI and Azure Pipelines all render as a test report.

Each assessment lane is a test suite. An open finding or a blocked check
is a failure, an incomplete lane is an error, and a dismissed, accepted
or resolved finding passes with its state in the case output. Like
SARIF it is a closed projection: no raw API document, no evidence
values, no clock. The file does not change the exit code.

mohsen1 commented Nov 17, 2026

Copy link
Copy Markdown
Member

Codex

Closing as out of scope for the CLI.

@mohsen1 mohsen1 closed this Nov 17, 2026
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.

2 participants