Repository navigation
Description
What
The SOP-002 decoy suites for Python (tests/decoys/test_decoy_python.py, arriving on main with #9466) found real engine leaks. Each is filed as its own issue and locked in the suite as @pytest.mark.xfail(strict=True): fixing a leak makes its test pass unexpectedly, which fails the suite until the marker is removed. That is the signal the leak is closed. Part of the epic #8863 (keyword-family validity).
Leaks
- Python/JavaScript scientific: the library name has no left boundary (import my_numpy, ./my-numpy) and the match spans the whole line #9453 Python/JavaScript scientific: the library name has no left boundary (import my_numpy, ./my-numpy) and the match spans the whole line
- Python encapsulation: the self._x = branch has no left boundary, myself._x = 1 counts as a private declaration #9454 Python encapsulation: the self._x = branch has no left boundary, myself._x = 1 counts as a private declaration
- Python/TypeScript/JavaScript exfiltration_camouflage: 'log' has no left boundary, fetch("/api/blog") and requests.post(".../changelog") count #9455 Python/TypeScript/JavaScript exfiltration_camouflage: 'log' has no left boundary, fetch("/api/blog") and requests.post(".../changelog") count
- Python exfiltration_camouflage: the urllib.request( arm is dead, urllib.request.urlopen(...) never fires #9456 Python exfiltration_camouflage: the urllib.request( arm is dead, urllib.request.urlopen(...) never fires
- Python memory_scraping: "/proc/" + str(pid) fires for any /proc/<pid>/ file (cmdline, status), not only mem #9460 Python memory_scraping: "/proc/" + str(pid) fires for any /proc// file (cmdline, status), not only mem
Note
#9453 and #9455 also affect JavaScript and TypeScript: fix the Python arms here; the JS/TS arms are in the JavaScript and TypeScript issue. Whichever PR lands second closes them. #9456 is a dead ARM (urllib.request(), the cell still fires through its other branches.
How
Follow .claude/skills/family-validity-fix/SKILL.md, docs/agents/family-validity-checklist.md and docs/agents/decoy-spec-protocol.md (SOP-002). Rules live in gitgalaxy/standards/language_standards/languages/python.py. First check that the suite is on main (ls tests/decoys/test_decoy_python.py); if it is not yet, the PR it arrives in (#9466) has not merged: wait. Per leak: reproduce with the snippet in the leak issue, name the cause class, read the contract, make the smallest fix, then remove that test's xfail marker, flip the cell's gate in tests/family_validity_baseline.json from leak to pass (decoys..), regenerate the charts (python tests/tools/family_validity_chart.py --write), run the suite both directions, time CPU before and after (seconds, on keyword-rosetta and language-crucible), and bless the goldens once for the PR. If keyword-rosetta counts move, label rosetta:rebless-owed. One PR for this language only, with one Closes #N line per leak it fixes. A real fix needs no rule contract change; where the contract is draft or silent, file the question on #8862 instead of guessing.
The suite is a measurement: do not weaken a test to make a fix pass, and do not skip a leak because the fix is awkward.
🤖 Generated with Claude Code
Activity