From 926965dd3e02723ef0e53bbc22472a95bc93fd95 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Wed, 28 Oct 2026 09:17:50 +0100 Subject: [PATCH] docs: describe campaign.py review The review subcommand and its options in tools.md, and the rule table rows that now read signature and on_mismatch: warn. --- scripts/campaign.py | 3 ++- wiki/tools.md | 15 +++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/scripts/campaign.py b/scripts/campaign.py index 2861a5192..8c1f0202e 100644 --- a/scripts/campaign.py +++ b/scripts/campaign.py @@ -1927,7 +1927,8 @@ def main(argv: Sequence[str] | None = None) -> int: findings_p.add_argument("--json", action="store_true", help="the findings as JSON") review_p = sub.add_parser("review", help="close an open finding after reading the code") review_p.add_argument("key", help="emulator/system/file/field, as `findings` prints it") - review_p.add_argument("--status", required=True, choices=REVIEWED) + review_p.add_argument("--status", required=True, choices=REVIEWED, + help="applied: the profile now says what the code does, rejected: it already did") review_p.add_argument("--reason", required=True, help="what the code does, with its file:line at the profile's pin") review_p.add_argument("--set", action="append", default=[], metavar="FIELD=YAML", diff --git a/wiki/tools.md b/wiki/tools.md index 1f3d16164..d54ab1975 100644 --- a/wiki/tools.md +++ b/wiki/tools.md @@ -1012,6 +1012,8 @@ python scripts/campaign.py references --only beetle_psx --system sony-playstatio python scripts/campaign.py references --only beetle_saturn --content-file other.yml # another content list python scripts/campaign.py status # done, failed, pending, and why python scripts/campaign.py findings # what waits for review +python scripts/campaign.py review beetle_psx/sony-playstation/scph5501.bin/validation \ + --status applied --set on_mismatch=warn --reason "logs the SHA1 and loads (libretro.c:853-860)" python scripts/campaign.py gate # the checks behind a commit python scripts/campaign.py install-timer # opt-in: writes the autorun units, enables nothing ``` @@ -1028,8 +1030,8 @@ python scripts/campaign.py install-timer # opt-in: writes the autorun units, |----------|-------|---------| | `none` boots, and the file changes the run: alone or as a wrong file, another verdict or other stages than with no BIOS | `hle_fallback` | `true`. A file the game never uses settles nothing: a core can open every file of the folder to hash it | | `none` fails (`bios_error`, `crash`, `hang`) and the file alone boots | `required`, `hle_fallback` | `true`, `false` | -| Zeros of the file's size refused while the file boots | `validation` | a content check is proven. Agreeing adds evidence, a profile with no md5, sha1, sha256, crc32 or adler32 is an open finding | -| Zeros used while the file boots | `validation` | no content check. A profile that declares one is an open finding | +| Zeros of the file's size refused while the file boots | `validation` | a content check is proven. Agreeing adds evidence, a profile with no md5, sha1, sha256, crc32, adler32 or signature is an open finding | +| Zeros used while the file boots | `validation` | no content check. A profile that declares one is an open finding, unless it declares the check with `on_mismatch: warn` | | Its first half refused while zeros are used | `validation` | `size`, added when missing | | Its first half used | `validation` | no size check. A profile that declares one is an open finding | | The core opened the file staged at another place it looked for | `path` | that path | @@ -1097,6 +1099,15 @@ install-timer`, which writes the autorun units and enables nothing unless in the automation worktree, gates it with `campaign.py gate` and commits with its own rules, pushing only with `--push`. +`review` closes an open finding once someone has read the core's code at the +profile's pin. `--status applied` writes each `--set FIELD=YAML` into the +entry the finding names, through the same profile editor, with the finding's +record ids added to `evidence:` under its field. With no `--set` it records a +profile already changed by hand. `--status rejected` keeps the profile as it +is. `--reason` is required and goes on the finding's line, with the file:line +it rests on. `--index` picks the entry when several share the file's name. A +rejected finding stays closed while later runs show the same thing. + Schemas: `campaign-finding.schema.json` and `campaign-run.schema.json`. ### region_check.py