mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-01 07:33:45 -06:00
feat: write a finding again on new evidence
A finding line is written again when the records behind it change, so an open finding cites the oracle runs rather than a frame comparison. A contradicted validation shows the checks the runs prove, content and size, beside the profile's list.
This commit is contained in:
1 parent
9327d3f97f
commit
e370970363
3 files changed
+16
-3
No files matched your search
+2
-1
@@ -1413,7 +1413,8 @@ class Campaign:
|
||||
key = self.finding_key(emulator, content, entry, verdict)
|
||||
previous = self.latest_findings().get(key)
|
||||
if previous and previous["status"] == status and previous["rule"] == verdict.rule \
|
||||
and previous["run_shows"] == verdict.value and previous["profile_says"] == says:
|
||||
and previous["run_shows"] == verdict.value and previous["profile_says"] == says \
|
||||
and previous["evidence"] == list(verdict.evidence):
|
||||
return
|
||||
line = mr.seal_line({
|
||||
"schema_version": 1, "found_at": now_iso(), "key": key, "emulator": emulator,
|
||||
|
||||
@@ -214,12 +214,14 @@ def rule_validation(zeros: Run | None, half: Run | None, none: Run, present: Run
|
||||
if size is False and "size" in declared:
|
||||
problems.append(f"the first half of {name} is run, the profile declares a size check")
|
||||
statement = f"the core {' and '.join(shown)} of {name}"
|
||||
# What the runs show, for a finding beside what the profile says.
|
||||
checks = {"content": content, "size": size}
|
||||
if problems:
|
||||
return Verdict("validation_contradicted", "validation", said,
|
||||
return Verdict("validation_contradicted", "validation", checks,
|
||||
f"{statement}: {'; '.join(problems)}", evidence)
|
||||
if missing_size:
|
||||
if not editable:
|
||||
return Verdict("validation_contradicted", "validation", said,
|
||||
return Verdict("validation_contradicted", "validation", checks,
|
||||
f"{statement}: the per-build validation has no size check", evidence)
|
||||
value = [*(entry.get("validation") or []), "size"]
|
||||
return Verdict("validation_size_added", "validation", value,
|
||||
|
||||
Reference in new issue
Block a user