fix(verdict): a rebuild that regresses is never an improvement
CI / Tests, lint (pull_request) Successful in 18s

A candidate on an older base-os than the pin, with Debian's point release
going back, or with a critical or high CVE the pin does not have and that
has a fix (the CVE gate's rule) is now "regressed": the pin stays, whatever
else it closes, and the report names each regression first.

The verdict action takes the components a nightly says moved (changes);
each is an improvement on its own, but only through the verdict, so a new
PostgreSQL minor on an older base-os is judged instead of waved through
(NetOrk/netork#2523). verdict.json carries base_os, changes and regressions.
A base-os version that cannot be read is no verdict.

Closes #3
This commit is contained in:
Christian Manivong committed 2026-11-15 22:43:55 +01:00
1 parent 77b31ed835
commit 015c6e18cb
6 files changed
+397 -28

No files matched your search

+12
View File
@@ -50,6 +50,18 @@ def test_a_verdict_that_could_not_be_reached_fails_the_step():
assert "cat report.md" in step["run"].splitlines()
def test_a_changed_component_reaches_the_verdict_instead_of_skipping_it():
"""netork#2523: a nightly that called a new package an improvement on its own never
asked the matcher, so a candidate on an older base-os went out. The change lines go
through the verdict now, which still judges the regression (image-tools#3)."""
spec = yaml.safe_load((ROOT / "actions/verdict/action.yml").read_text())
[step] = spec["runs"]["steps"]
assert spec["inputs"]["changes"]["default"] == ""
assert step["env"]["CHANGES"] == "${{ inputs.changes }}"
assert '--changes "$CHANGES"' in step["run"]
def test_the_cve_gate_fails_the_step_when_it_blocks_or_cannot_judge():
"""The gate's exit code is the step's: 1 for a new fixable CVE, 2 for no verdict
(an empty NETORK_LICENSE_KEY included). The report reaches the log either way."""