Skip to content

portability: the guard was red for ten weeks because nothing ran it - #103

Merged
PipFoweraker merged 1 commit into
mainfrom
fix/portability-guard-wired
Nov 22, 2026
Merged

PipFoweraker merged 1 commit into
mainfrom
fix/portability-guard-wired

Conversation

@PipFoweraker

Copy link
Copy Markdown
Owner

Card PDOOM-DATA-1 from the 2026-11-05 estate protocol pass (coordination reports/PASS_2026-11-05_pdoom-data.md). Pip said yes on 2026-11-07.

What was wrong

scripts/validation/check_source_portability.py was added on 2026-08-26, but nothing ran it. It wasn't in check_all.py or in data-integrity.yml. Running git grep check_source_portability outside the file itself returns nothing. Since 2026-08-29 it has exited 1 on serve_corpus_review.py:796, which is webbrowser.open(url). That's a false positive: the attribute check treats any .open as a file open.

Change

  • Guard: NOT_FILE_OPENERS skips .open when the receiver is the bare name webbrowser or os, and each entry records why. Path(...).open(), io.open() and self.os.open() are still flagged.
  • Test: tests/test_source_portability.py has 9 cases that must fire and 7 that must not. Run against the old guard, exactly the 2 new exclusions fail.
  • Wiring: both scripts now run from check_all.py and from CI.

Verified

  • Locally (Windows seat, Python 3.13): check_all.py passes every gating check, including the two new ones.
  • check_workflow_disarm.py passes; no workflow trigger was changed.
  • CI on this PR is the Linux check.

🤖 Generated with Claude Code

check_source_portability.py was added 2026-08-26 and wired into neither
check_all.py nor data-integrity.yml. On 2026-08-29 it went red on a false
positive -- webbrowser.open(url) at serve_corpus_review.py:796 read as a file
open -- and nobody saw, because a check nothing runs cannot fail anyone.

- Narrow the attribute arm: skip .open on a bare `webbrowser` or `os`
  receiver (NOT_FILE_OPENERS, each with its reason). Path(...).open() and
  io.open() are still caught.
- tests/test_source_portability.py: 9 must-fire, 7 must-not-fire. Against the
  old guard it fails exactly the two new exclusions.
- Run both from check_all.py and from CI.

Found by the 2026-11-05 estate protocol pass, card PDOOM-DATA-1. Ruled yes by
Pip 2026-11-07.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@PipFoweraker

Copy link
Copy Markdown
Owner Author

Merged by pdoom-data-ca (Bort) on Pip's instruction "go now." (2026-11-22 13:50 AEDT, AK106, in order #104 -> #103 -> #105), and then "A" (2026-11-22 14:01 AUSEDT), which chose to continue while the docs workflow is red on main for an unrelated reason: the Ubuntu 26.04 runner has no Python 3.9. Squash merge, with no --admin and no protection bypass. This comment was posted before the merge (WP1, §5k).

@PipFoweraker
PipFoweraker merged commit 16afb50 into main Nov 22, 2026
4 checks passed
@PipFoweraker
PipFoweraker deleted the fix/portability-guard-wired branch November 22, 2026 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant