mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-16 03:49:26 +00:00
feat(pre-push-safety-net): render the experimental evaluation explanation (M1b 10.10)
The M1b exit run established the comparison but could not show a developer-readable consequence or repair direction, because both belong to an evaluated capability declaration and the installed registry is deliberately empty. The experimental evaluation output now renders, for each change-attributed finding, its family, exact location, witness, change attribution, provenance, engine method and operation, together with a consequence and repair direction produced from a supplied declaration through the same grounded-template path the admitted case uses. No prose is invented: when no declaration matches, or a template is not grounded in the operation and context, or the declaration does not cover the operation symbol, the explanation is absent and the reason is stated. Declarations reach this rendering only. The runner never passes them to admission, so nothing in that file can enable a capability or emit an alert however it is written, and a control asserts that even a declaration claiming PASS admits nothing. The flag requires explicit base/head replay and the recorded-veto flag. The evaluation instrument generates its own unreviewed declaration bound to the run's analysis semantics, asserting that it is neither enabled nor PASS, so the demonstration cannot drift into a qualified claim. 1,377 tests passed, nine skipped. Rollout stays NO-GO. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01EmM1j46qgKMh3zqD1QMwEo
This commit is contained in:
co-authored by
Claude Opus 5
parent
57d6ddcbba
commit
cec1c4a428
@@ -132,6 +132,12 @@ def main(argv: list[str] | None = None) -> int:
|
||||
replay_parser.add_argument("--max-regions", type=int, default=500)
|
||||
replay_parser.add_argument("--mode", choices=("advisory", "blocking"), default="advisory")
|
||||
replay_parser.add_argument("--incomplete-coverage", choices=("allow", "block"), default="allow")
|
||||
replay_parser.add_argument(
|
||||
"--experimental-declarations",
|
||||
type=Path,
|
||||
help="explicit --base/--head replay only: unreviewed capability declarations used to render the experimental "
|
||||
"evaluation explanation; never consulted by admission and cannot enable any capability",
|
||||
)
|
||||
replay_parser.add_argument(
|
||||
"--experimental-record-vetoes",
|
||||
action="store_true",
|
||||
@@ -243,9 +249,18 @@ def main(argv: list[str] | None = None) -> int:
|
||||
parser.error("--prior-hook requires Git stdin mode")
|
||||
if args.experimental_record_vetoes and not args.base:
|
||||
parser.error("--experimental-record-vetoes requires explicit --base/--head replay; it is never a hook capability")
|
||||
if args.experimental_declarations and not args.experimental_record_vetoes:
|
||||
parser.error("--experimental-declarations requires --experimental-record-vetoes")
|
||||
prior_data = None
|
||||
if args.base:
|
||||
delivery = replay(args.path, base=args.base, head=args.head, record_vetoes=args.experimental_record_vetoes, **options)
|
||||
delivery = replay(
|
||||
args.path,
|
||||
base=args.base,
|
||||
head=args.head,
|
||||
record_vetoes=args.experimental_record_vetoes,
|
||||
declarations=args.experimental_declarations,
|
||||
**options,
|
||||
)
|
||||
else:
|
||||
# multiprocessing closes sys.stdin in its child; duplicate the Git pipe first.
|
||||
with os.fdopen(os.dup(0), "rb") as stream:
|
||||
|
||||
Reference in New Issue
Block a user