port: check-citations gave a FALSE RED on a freshly pushed peer file

A citation added minutes after the other agent pushed the file it names resolved
NOWHERE, because this scans local refs and the local ref was stale. The citation
was right and the check was wrong. It now says so in the failure text and tells
the reader to fetch before editing.

A check that cries wolf is worse than no check -- and this one had just been
teaching me to distrust a correct citation.

🔴 Separately, my own slip: I ran this as '<check>; git commit' instead of
'<check> && git commit', so the commit landed while the check was red. The guard
was in the command and I had disabled it by punctuation.
This commit is contained in:
Sylpheed port agent
2026-09-02 21:12:05 +00:00
parent c69944b879
commit 2d2caccd75

View File

@@ -97,6 +97,13 @@ def main() -> int:
for m, src in sorted(nowhere.items()):
print(" %-52s <- %s" % (m, os.path.basename(src)))
print("\n🔴 a reader following those gets nothing. Fix the path or drop the citation.")
# 🔴 FALSE RED, HIT 2026-09-02: a peer-branch file cited minutes after it
# was pushed resolves NOWHERE here, because this scans local refs and the
# local ref was stale. The citation was correct and the check was wrong.
# A check that cries wolf is worse than no check, so it now says so.
print(" ⚠️ If a path was pushed by the other agent recently, this may be")
print(" a STALE LOCAL REF rather than a bad citation. Run")
print(" `git fetch origin` and re-run before editing anything.")
return 1
print(" 🔴 resolve nowhere : 0")
return 0