diff --git a/tools/re-capture/check_refuted.py b/tools/re-capture/check_refuted.py index 8b1bf09f..42c3dc8f 100755 --- a/tools/re-capture/check_refuted.py +++ b/tools/re-capture/check_refuted.py @@ -198,5 +198,42 @@ elif suppressed: # someone else's work; mine had been live since the tool was written. # Unmarked assertions FAIL. Suppressed mentions do not -- they are unverified, # not wrong, and failing on them would make the clean state unreachable. +# ── PEER-OWNED FILES ARE SCANNED FROM A COPY I DO NOT OWN ──────────────────── +# This scans all of docs/, which includes files sylpheed-port authors. My copies +# of those come from `main` and are days behind their branch head, so a verdict +# here about one of their files is a verdict about a stale copy. +# +# The direction that matters is the FALSE POSITIVE: flagging a claim they have +# already corrected. That is not hypothetical -- on 2026-08-31 I did it by hand, +# telling them a BLOCKED.md row was wrong when it had been struck for days, and +# their live file was one `git show` away in a ref already fetched here. +# +# ⚠️ REPORTED, NOT EXCLUDED. Skipping their files silently would hide the +# exposure; being behind a peer's topic branch is the normal state and making it +# an error would be scenery within a day (sylpheed-port's call on their own +# peer-head tool, and it is right). +PEER_REF = os.environ.get("PEER_REF", "origin/auto/port-p6-audio") +PEER_OWNED = ("BLOCKED.md", "DECISIONS.md", "PORT-MISSION.md", + "AUDIO-VERIFICATION.md", "MODDING.md", "FORMAT.md", "RUNNING.md") +if "--selftest" not in sys.argv: + import subprocess as _sp + stale = [] + for _f in PEER_OWNED: + rel = f"docs/port/{_f}" + def _d(ref): + r = _sp.run(["git", "log", "-1", "--format=%ad", "--date=short"] + + ([ref] if ref else []) + ["--", rel], + capture_output=True, text=True) + return r.stdout.strip() + mine, theirs = _d(None), _d(PEER_REF) + if theirs and mine != theirs: + stale.append((_f, mine or "", theirs)) + if stale: + print(f"\n⚠️ {len(stale)} peer-owned file(s) scanned from a STALE local copy " + f"— a verdict on these is a verdict on my copy, not theirs:") + for _f, mine, theirs in stale: + print(f" {_f:24} mine {mine} {PEER_REF} {theirs}") + print(f" read the live one: git show {PEER_REF}:docs/port/") + if hits: sys.exit(1)