diff --git a/bin/gstack-pregate b/bin/gstack-pregate index 18faaa02d..c63d17e49 100755 --- a/bin/gstack-pregate +++ b/bin/gstack-pregate @@ -232,6 +232,7 @@ function cmdClear(root: string, rest: string[]): number { } const file = clearObligation(read.file, lane, decision.receipt, `gstack-pregate clear ${new Date().toISOString()}`, decision.substitution); writePregateFile(root, out, file); + if (/ runs=\S+ profiles=/.test(decision.receipt)) process.stdout.write(`REUSE: accepted ${lane} ${decision.receipt}\n`); if (decision.substitution) process.stdout.write(`PREGATE_RECEIPT_SUBSTITUTED: ${describeSubstitution(decision.substitution)}\n`); process.stdout.write(`PREGATE_CLEARED: ${lane} receipt=${decision.receipt} verdict=${file.verdict}${decision.attested ? ` (attested, not validated: ${lane} has no machine-checkable receipt)` : ''}\n`); return EXIT.ok; diff --git a/docs/pregate.md b/docs/pregate.md index 12cd31a88..3bf588201 100644 --- a/docs/pregate.md +++ b/docs/pregate.md @@ -626,11 +626,15 @@ once: exactly the rule [above](#remote-gate-stamp-only) (a policy whose `stamp_sensitive_gates` names `tests` refuses that substitution). -Any API or git error refuses. Each refusal prints `REUSE: refused — …` with the -run and its reason (`fork_run`, `event_mismatch`, `run_not_success`, -`job_missing`, `artifact_mismatch`, `artifact_reused`, `tree_mismatch`, -`newer_run_vetoes`, `run_stale`, `os_mismatch`, `api_error`, …), as -`PREGATE_RECEIPT_INVALID`. Accepted, the receipt reads +Any API or git error refuses. Each refusal prints `REUSE: refused +reason= — …` as `PREGATE_RECEIPT_INVALID`, and a run that fails +verification is named with its own reason (`fork_run`, `event_mismatch`, +`run_not_success`, `job_missing`, `artifact_mismatch`, `artifact_reused`, +`tree_mismatch`, `newer_run_vetoes`, `run_stale`, `os_mismatch`, `api_error`, +…); the clear-level codes are `no_verified_run`, `tree_mismatch` (runs on +different trees), `inventory_failed`, `inventory_empty`, `inventory_uncovered` +and `no_tests`. Accepted, `clear` prints `REUSE: accepted `, and +the receipt reads `remote-gate tree= tests= runs=/,… profiles=

,… heads= verified=