Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/scripts/npm_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@
require(len(actual.get("findings", [])) == row["findings"], "retained finding count mismatch")
require(isinstance(row.get("follow_up_finding"), str) and row["follow_up_finding"].startswith("probe:") and row["follow_up_finding"] in {finding.get("id") for finding in actual.get("findings", [])}, "follow-up finding absent from retained output")
require(files[route + "-explain.txt"].strip(), "empty retained explanation")
require(row["follow_up_finding"].encode("utf-8") in files[route + "-explain.txt"], "follow-up finding absent from retained explanation")

Check warning on line 360 in .github/scripts/npm_package.py

View workflow job for this annotation

GitHub Actions / Ripr Rust Small on GitHub Hosted

ripr note static_unknown

Inspect the producer-owned review finding. Suggested test%3A Inspect the producer-owned review finding.
require(proof.get("negative_controls") == list(CONSUMER_CONTROLS), "missing consumer negative controls")
return proof

Expand Down
12 changes: 11 additions & 1 deletion .github/scripts/test_npm_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,9 +535,19 @@ def proof(self):
files = {"consumer.json": PACKAGE.canonical(proof), "lsp-stderr.txt": b""}
for row in rows + [proof["reinstall_journey"]]:
files[row["route"] + "-check.json"] = PACKAGE.canonical({"summary": {"probes": 1, "findings": 1}, "findings": [{"id": "probe:fixture"}]})
files[row["route"] + "-explain.txt"] = b"Useful explanation of the selected finding"
files[row["route"] + "-explain.txt"] = b"Useful explanation of probe:fixture"
return proof, files

def test_retained_explanations_require_the_selected_follow_up_finding(self):
_, files = self.proof()
for route in (*PACKAGE.ROUTES, "fresh-reinstall"):
for explanation in (b"Useful explanation without a finding identity",
b"ERROR: unrelated finding probe:wrong was not found"):
changed = dict(files, **{route + "-explain.txt": explanation})
with self.subTest(route=route, explanation=explanation):
with self.assertRaisesRegex(ValueError, "follow-up finding absent from retained explanation"):
PACKAGE.validate_consumer_proof(changed, "20.20.1", "10.8.2", "c" * 64, "e" * 64)

def test_consumer_receipts_require_executed_distinct_routes_and_retained_journeys(self):
proof, files = self.proof()
PACKAGE.validate_consumer_proof(files, "20.20.1", "10.8.2", "c" * 64, "e" * 64)
Expand Down
5 changes: 4 additions & 1 deletion docs/specs/RIPR-SPEC-0180-npm-native-bootstrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ suffixes cannot be normalized into an otherwise expected artifact or wheel membe
This refusal applies on both Unix and Windows readers before member bytes are read.

Native execution and qualification retain explicit denominators. Each selected
client must independently install the actual tarball project-locally, globally,
route, including fresh reinstall, retains an explanation naming its selected
follow-up finding from the retained check output. Unrelated nonempty explanation
bytes cannot satisfy that journey.
Each selected client must independently install the actual tarball project-locally, globally,
through npm exec and the actual public npx executable, then produce nonempty
findings and a follow-up action. A missing or broken npx wrapper fails
qualification. Reinstallation requires observed package/bin-link absence before
Expand Down
Loading