Skip to content

feat(reporting): add a GitHub Actions annotations report format - #794

Merged
rng1995 merged 42 commits into
NVIDIA:mainfrom
mvanhorn:feat/github-annotations
Nov 23, 2026
Merged

rng1995 merged 42 commits into
NVIDIA:mainfrom
mvanhorn:feat/github-annotations

Conversation

@mvanhorn

Copy link
Copy Markdown
Contributor

Summary

-r github prints GitHub Actions workflow commands on stdout so a job that
runs skillevaluator validate or tier1 itself can put findings on the pull
request diff and the run summary without uploading SARIF. The format writes
no file, needs no extra permission, and combines with other formats, for
example -r cli,github,sarif.

A CLI-only workflow currently has the terminal table, Markdown, or SARIF.
SARIF inline comments need a code scanning upload, which private
repositories without code scanning cannot use.

Before this change, a job that runs the CLI directly got no inline annotations, and -r github was rejected as an invalid choice ('github' is not one of 'cli', 'json', 'html', 'markdown', 'sarif', 'junit', exit 2).

Verification

  • I am familiar with the Contributing Guidelines
  • Added or updated focused tests
  • Updated documentation for user-visible changes
  • Ran make lint
  • Ran make test
  • Ran make build
  • Did not add credentials, private datasets, or proprietary benchmark content

Release Impact

  • No user-visible release note needed
  • Updated CHANGELOG.md

Commands run

Platform: Linux 6.12.113+ x86_64, Python 3.13.18 (uv), python3 3.12.3.

Baseline on untouched upstream/main affe1acc3d0a24877c5d508d96ac69663a7fd92a:

  • uv run make lint — All checks passed
  • uv run python -m pytest tests/reporting — 15 failed, 2943 passed, 86 skipped in 143.81s. Failures are Rich markup, 80-column terminal polish, and token-usage wrapping
  • uv run make build — Successfully built skillevaluator-1.0.1.tar.gz and skillevaluator-1.0.1-py3-none-any.whl
  • PYTHONUNBUFFERED=1 PYTEST_ADDOPTS='--deselect tests/test_harbor_secure_docker_environment.py::test_windows_transfer_repeated_cancellation_reaps_process_and_removes_partial_output' uv run make test — 57 failed, 39461 passed, 171 skipped, 20 deselected, 65 warnings in 1627.79s. Failures are this environment (no Docker client, Rich markup / 80-column wrapping, NeMo Gym process-group). The deselected Windows-transfer test hangs the serial run on untouched upstream/main, so it is excluded on both sides.

This branch:

  • uv run ruff format --check on the touched Python files — 11 files already formatted (plus tests/reporting/test_reporters.py after the non-UTF-8 wiring case)
  • uv run make lint — All checks passed
  • uv run python -m pytest tests/reporting/test_github_reporter.py tests/reporting/test_incomplete_scans.py tests/reporting/test_plugin_reports_runtime_composition.py tests/reporting/test_reporters.py tests/test_cli.py tests/golden/test_cli_surface.py — 389 passed in 3.43s
  • uv run python -m pytest tests/reporting tests/test_cli.py tests/golden — 15 failed, 3203 passed, 86 skipped in 136.88s. The 15 failures are the same names as the baseline reporting suite
  • uv run make build — Successfully built skillevaluator-1.0.1.tar.gz and skillevaluator-1.0.1-py3-none-any.whl
  • ./fern/node_modules/.bin/fern check — Found 0 errors and 1 warning (Fern CLI upgrade notice)
  • PYTHONUNBUFFERED=1 PYTEST_ADDOPTS='--deselect tests/test_harbor_secure_docker_environment.py::test_windows_transfer_repeated_cancellation_reaps_process_and_removes_partial_output' uv run make test — 58 failed, 39484 passed, 171 skipped, 20 deselected, 65 warnings in 1627.84s. Passed count is +23 versus baseline: 24 new GitHub-annotation tests, minus one existing test that failed here only (tests/test_nvidia_build_bridge.py::test_dynamic_bridge_ignores_prebound_old_port_and_checker_authenticates_health, Address already in use from running the two suites at the same time). That test passed in 2.39s when re-run alone. The other 57 failures are the same node IDs as the baseline. Ran make test is left unticked because the suite was only run with the hanging test deselected.

Not verified: no live GitHub Actions run was tested, so the annotations have not been seen on a real pull request diff or run summary. Also not verified: Python 3.12 and 3.14; Windows.

Demo

demo

Full recording (MP4): https://raw.githubusercontent.com/mvanhorn/pr-demo-assets/main/osc-bulk-1118/github-annotations/out.mp4

A GitHub job that runs the CLI itself had no way to print workflow commands for inline annotations. -r github writes ::error, ::warning, and ::notice lines on stdout, combined with other formats, without a report file.

CRITICAL/HIGH map to error, MEDIUM/LOW to warning, INFO to notice. Gate failures stay errors. Incomplete scanners are warnings. Findings are capped at GitHub's 10 errors and 10 warnings per step, with the omitted count on a closing notice. Message and property text is escaped so a finding cannot start a new workflow command.

Signed-off-by: Matt Van Horn <mvanhorn@users.noreply.github.com>
Comment thread src/skillevaluator/tier1/commands.py Resolved
A catalog validated each skill as its own run, so -r github printed a
capped stream and a summary per skill with one worker, and nothing at all
with --workers above 1, because each worker's CliRunner captured stdout.

Catalog runs now collect each skill's annotations instead of printing
them. Workers return theirs to the parent with their result. The parent
prints one stream, capped at 10 errors and 10 warnings, and one summary
for the whole catalog after every skill finishes.

Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Comment thread src/skillevaluator/cli.py Resolved
The catalog adds metadata.id conflicts to its failures after every skill
has rendered, so -r github summarized two skills that share a blocking
metadata.id as "2 passed, 0 failed" while catalog-summary.json recorded
0 passed and 2 failed, and no annotation named the duplicate.

The closing notice now counts each skill from the catalog's final
failures. A skill failed by a catalog-level check counts as failed; one
that failed only because its own scan did not complete stays incomplete.
Duplicate metadata.id findings and discovery problems are annotated on
the affected skill's SKILL.md in the same capped stream: errors when the
policy blocks, warnings when it is advisory.

Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Comment thread src/skillevaluator/cli.py Resolved
A catalog discovery failure for a linked skill directory pointed its
GitHub annotation at a manifest beneath the link. Git tracks the link
itself, so that path is not in the diff. Discovery failures now use the
directory path relative to the catalog root, without probing it, so the
annotation lands on the tracked link. Findings on ordinary skill
directories keep their manifest location.

Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding GitHub Actions annotations. I reviewed the reporter, CLI/catalog integration, escaping, caps and report composition; the focused reporter/CLI/golden suites passed (398 tests). Two CLI replays exposed remaining issues: advisory failures contradict the successful run status in the single-skill summary, and a linked-directory discovery error can still annotate its in-repository target. The new summary finding is inline, and the link case is a reply in the existing thread.

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mvanhorn for this contribution! I reviewed 10fc0ba003. I reproduced the problem on main, confirmed this change fixes it, checked that the new tests fail on main, and ran the new and related tests on this head (all pass). I left 3 inline comments (1 P2, 2 P3), in addition to the advisory-count and in-repository link items already raised on this head; please address them before this is merged. The DCO check also fails because the head commit 10fc0ba003 has no Signed-off-by: trailer (git commit --amend -s and a force-push fixes it). The Tests (Python 3.14) failure is a timing assertion in tests/test_harbor_secure_docker_environment.py, which this PR does not touch.

Resolve the CHANGELOG.md conflict in the Unreleased section: keep
upstream's new Changed entries and move the GitHub Actions annotation
entry into the existing Added section.

Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
… discovery errors

A discovery failure for a linked skill directory whose target sits
inside the same checkout was annotated on the resolved target. The
discovery annotation now resolves only the link's parent directory, so
it names the tracked link wherever the target points. Manifest-based
catalog findings keep their existing path handling.

Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
@mvanhorn

Copy link
Copy Markdown
Contributor Author

Two updates on this branch:

  • 82feeab merges main and resolves the CHANGELOG.md conflict. The annotation entry now sits in the existing Added section of Unreleased.
  • 6648497 fixes the in-repository link case from the linked-directory thread, which was already resolved so I'm replying here. A discovery failure for skills/linked -> source now reports file=skills/linked instead of file=source. The annotation resolves only the link's parent directory and keeps the link name.

@rng1995

rng1995 commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

@mvanhorn - Please resolve the comments once you have fixed it.

When a scanner records its stop reason with add_error() and then calls
mark_scan_incomplete(), the GitHub reporter printed that reason twice:
once as an ::error from independent_errors() and once as the
::warning for incomplete/<tool>. Skip independent errors that are the
incomplete reason for a listed scanner, so each incomplete scanner
yields only its warning, and assert no ::error in the CLI test.

Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
…sible

GitHub shows at most 10 notices per step. INFO findings now stop at nine
notices so the closing summary is always the tenth, and dropped notices
are counted in the summary's omitted total. The summary text, module
docstring and docs now name the notice limit too.

Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
…tHub warning

A scanner that records several errors before it is marked incomplete, such
as Bandit with more than one entry in its errors list, printed the first as
its incomplete warning and the rest as ::error while the summary counted the
skill as incomplete. On a group with an incomplete scan, every independent
error that is not a gate failure is now a warning titled incomplete/<tool>.
Gate failures stay errors.

Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
@mvanhorn

Copy link
Copy Markdown
Contributor Author

@rng1995 Status on the review threads: the in-repo link, notice cap, and incomplete-scanner threads are fixed, and each has a reply with its commit. Since you opened those threads, I've left them for you to resolve once you've checked them. Not fixed yet: advisory failure counting (P2) and the "see the other reports" wording (P3).

mvanhorn and others added 2 commits November 19, 2026 01:28
The summary notice counted every raw failed result, so a failed advisory
group such as Tier 2 dedup under --no-block-on-dedup reported the skill
as failed while the JSON overall_status and the exit code said passed.
The counts now come from resolve_run_status's headline, which ignores
nonblocking groups and keeps a required incomplete scan as incomplete.

Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
@rng1995
rng1995 enabled auto-merge (squash) November 19, 2026 09:56
@mvanhorn

Copy link
Copy Markdown
Contributor Author

@rng1995 Update: advisory failure counting (P2) is fixed in 9ebded7, with a reply on that thread. The GitHub summary counts now follow the required validation gate, the same value as overall_status. The "see the other reports" wording (P3) is unchanged at the current head.

The Actions runner trims the whole property list of a workflow command
before splitting it. A discovery annotation has no line number, so its
file property came last, and a tracked path ending in a space (such as a
linked skill directory) lost that space and no longer matched the Git
index. The always-present title now comes last.

The linked-directory test now also covers a link name with a trailing
space and parses the command the way the runner does, comparing the file
value with the path git ls-files reports.

Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
auto-merge was automatically disabled November 19, 2026 13:12

Head branch was pushed to by a user without write access

Copilot AI balanced review requested due to automatic review settings November 22, 2026 10:30
A rubric folder with no skills had no member list, so the GitHub summary
counted its discovery failure as one checked skill. Record an empty
member list for that folder result and report zero checked skills; the
discovery error and exit 1 are unchanged.

Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human assessment is needed because an unpublished filename-handling issue can emit terminal-reset sequences, while stripping those controls risks pointing annotations at the wrong file.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 22, 2026 10:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human assessment is needed because an unpublished finding indicates JSON save failures after incomplete scans can be omitted from GitHub annotations and counted as incomplete rather than failed.

No open issues 🎉

Review effort: Balanced

Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Copilot AI balanced review requested due to automatic review settings November 23, 2026 04:01

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the updated annotation and documentation behavior. Both worker modes preserve the concrete report-write error, incomplete-only scans remain warnings, and all review threads are resolved. The follow-up is signed off. DCO still flags the earlier unsigned commits 891a5f0 and c4a7c22, and NVSkills signing evidence is still pending.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the GitHub Actions annotation reporting change.

No open issues 🎉

Review effort: Balanced

Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Copilot AI balanced review requested due to automatic review settings November 23, 2026 04:11

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Bandit annotation test now exercises the validator with simulated scanner output. The Windows CI merge tree reproduced the original failure locally and passed with the updated fixture. Review threads remain resolved. DCO sign-offs for the earlier two commits and NVSkills signing evidence remain outstanding.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The core behavior has not been exercised in a live GitHub Actions run, leaving runner parsing, PR-diff placement, and summary visibility for single-skill and parallel-catalog stdout streams awaiting human validation.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 23, 2026 07:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the GitHub Actions annotation reporting change.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 23, 2026 13:37
@rng1995
rng1995 merged commit 7aaf295 into NVIDIA:main Nov 23, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the GitHub Actions annotation reporting change.

No open issues 🎉

Review effort: Balanced

@mvanhorn

Copy link
Copy Markdown
Contributor Author

Appreciate the merge, @rng1995. Good to see the -r github format putting findings on the PR diff for teams that can't upload SARIF.

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.

4 participants