Repository navigation
Python: io counts Path I/O and os/sys I/O members only (Closes #8860) - #8941
Conversation
…ot os.path or sys.exit (Closes #8860) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
No description provided. |
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
CI shepherd: the head of this PR (85f7cb8) is not the one a maintainer labelled |
Pull request was converted to draft
|
No description provided. |
|
No description provided. |
|
No description provided. |
|
No description provided. |
|
This PR conflicts with main, so no checks ran. Merge origin/main into it and regenerate generated files with their tools (never hand-merge them), then push. |
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
CI shepherd: the head of this PR (2ad47bc) is not the one a maintainer labelled |
|
PR #8941 @ 01a9647: 1 failed check(s) == graph-accuracy-audit (failure) -- real |
|
No description provided. |
|
PR #8941 @ f291a06: 1 failed check(s) == graph-accuracy-audit (failure) -- real |
|
Waiting on an owner decision (asked privately, 2026-11-22). Nothing is needed from contributors; work resumes once it is answered. |
|
No description provided. |
|
No description provided. |
|
This PR conflicts with main, so no checks ran. Merge origin/main into it and regenerate generated files with their tools (never hand-merge them), then push. |
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
CI shepherd: the head of this PR (4825127) is not the one a maintainer labelled |
|
No description provided. |
1 similar comment
|
No description provided. |
|
PR #8941 @ 4825127: 2 failed check(s) == full-suite part ${{ matrix.group }}/${{ needs.shard-plan.outputs.splits }} (cancelled) -- infra == store the suite's durations (cancelled) -- infra |
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
CI shepherd: the head of this PR (121f202) is not the one a maintainer labelled |
1 similar comment
|
CI shepherd: the head of this PR (121f202) is not the one a maintainer labelled |
|
No description provided. |
1 similar comment
|
No description provided. |
|
PR #8941 @ 121f202: 2 failed check(s) == full-suite part ${{ matrix.group }}/${{ needs.shard-plan.outputs.splits }} (cancelled) -- infra == store the suite's durations (cancelled) -- infra |
…441Z # Conflicts: # tests/golden_master_audit/12_scan_output_snapshots/gpu_json.json # tests/golden_master_audit/12_scan_output_snapshots/graph_sqlite.json # tests/golden_master_audit/12_scan_output_snapshots/llm_brief.json # tests/golden_master_zero_dep_audit/12_scan_output_snapshots/gpu_json.json # tests/golden_master_zero_dep_audit/12_scan_output_snapshots/graph_sqlite.json # tests/golden_master_zero_dep_audit/12_scan_output_snapshots/llm_brief.json
…ith main Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
CI shepherd: the head of this PR (eff161e) is not the one a maintainer labelled |
|
CI shepherd: the head of this PR (64edebb) is not the one a maintainer labelled |
|
No description provided. |
|
No description provided. |
1 similar comment
|
No description provided. |
Closes #8860
What changed
The Python
iorule (arch_io) now counts boundary crossings only:os.is limited towalk|listdir|scandir|remove|unlink|rename|replace|makedirs|mkdir|rmdir|removedirs|open|read|write, soos.path.*string work no longer counts.sys.is limited tostdin|stdout|stderr, sosys.exitno longer counts (it stays underhigh_risk_execution).os.environ,sys.argvandsys.pathstay withglobals(rosetta[python]: cross-language consistency — 5 red / 3 amber metrics, 5 ledgered shapes #2593).pathlib:.read_text( .write_text( .read_bytes( .write_bytes( .glob( .rglob( .iterdir(.Class / Sibling gaps
Class: Python
iokeyword-family validity, covering both false negatives (Path-object I/O) and false positives (non-I/Oos./sys.members). Every member the issue names is handled in this PR, with one parametrized test per member (positive and negative, including word-boundary negatives and a ReDoS check).Sibling gaps, not fixed here, and no burned-estate program needs any of them:
shutil.copy|move|rmtree,urllib.request, bare.read(/.write(): not in the issue's measured counts, and a bare.read(would cost precision.os.path.exists|isfile|isdirtouch the filesystem. The issue treatsos.pathas non-I/O, so they are left out.iorules with the same over-count shape: not checked here.Golden / rosetta
Golden masters re-blessed via
golden-lock.sh crucible_check.py --update --yes. Drift is per-functioniocounts in.pyfiles (including.pyfiles inside the cpp corpus).scope_check.py --expect pythonlists the cpp rows because they are Python files in that corpus. keyword-rosetta counts may move:rosetta:rebless-owedis likely owed (label to be added by the tick, not by me).Timing
ioregex CPU, best of 3 over ~600 KB of Python source: before 0.0081 s, after 0.0214 s (2.6x on this one rule, small in absolute terms). Full keyword-rosetta and language-crucible CPU runs were not done; this is the micro-timing only.Gates
pytest tests/extraction/languages -k python: 824 passed.ruff formatwith the pinned 0.17.4 on both changed files.pr_gates(--fast and --ratchets),audit_checkand the full-corpus timing were not run in this session.🤖 Generated with Claude Code