tools: check_refuted now says when it judged a peer-owned file from a stale copy
It scans all of docs/, which includes files sylpheed-port authors, and my copies of those come from main -- six of seven are days behind their branch head and one I do not have at all. So a verdict here about one of their files is a verdict about my stale copy. The direction that matters is the false positive, and it 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, with their live file one git show away in a ref already fetched here. Reported, not excluded. Skipping their files silently would hide the exposure, and being behind a peer's topic branch is the normal state -- making it an error would be scenery within a day, which is sylpheed-port's call on their own peer-head tool and the right one. Zero hits land in those files today, so this is latent rather than active. Selftest and the real run both still exit 0. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wuu56cE8vJGTBtn1ppsk8v
This commit is contained in:
@@ -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 "<absent>", 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/<file>")
|
||||
|
||||
if hits:
|
||||
sys.exit(1)
|
||||
|
||||
Reference in New Issue
Block a user