Repository navigation
check_writes: a name is read where it is stored, every class and owner it may be, and exec only where a binding always runs (#655) - #686
Conversation
…r it may be, and exec only where a binding always runs (#655) Issue 655 and the four routes Muse's read of the merged pull request for issue 640 added, each refused: - a name stored under an if or declared global is read back to the module that stores it, through any import of it; - every class and every owner a name may be is read, a PATCHERS file's second owner too; - vars(m) or m.__dict__ held by a name before it is handed on, and an unbound fill, dict.update(other.TABLE, ...); - a nonlocal value is read in the nested function that gives it; - exec, eval and compile are the module's own only by an unconditional top-level import or definition, not deleted; - a loader, sys, modules, __builtins__ or __import__ by a literal key, getattr or get, and __builtins__ as an attribute; - a command after a case pattern's ), after eval, watch or stdbuf, and after timeout's options with their values; - two files of one module are refused, and a reading is cached under its node, never its id. Record 0174 (number to be confirmed at enqueue) amends 0171's row "Still not held". Each rule has a boundary case in test_the_routes_issue_655_names_are_refused and a mutant it kills; 19 mutants follow the lines they mutate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
… a command only after a case pattern Muse, Argon and the Claude reviews of 73f812a found more of the same kind, each now refused with its boundary case and mutant: sys or modules by pop, setdefault or __getitem__; a name stored plainly beside an if; a global through a local name for its module, or one the importing module's own function assigns (every hop of an import is read); vars held by a global or an imported name, in its own scope; exec, eval or compile by a literal key, getattr or accessor (len.__self__), used before or inside its own binding, or after an except deletes it; an unbound fill by any name for a container's type (D = dict, MutableMapping, __ior__, __iadd__), its receiver read too; setsid, coproc, ionice, taskset, chrt, unbuffer, caffeinate, doas and flock; a top-level tuple's parts. A ) leads a command only after in or ;;, so prose with a ) before git passes; one problem is told once; and the old sys key clause, which BY_NAME now holds, goes with its mutant moved. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ord 0174 names this round's routes and refusals A run of all 224 check_writes mutants found four that no test killed: exec's top-level filter duplicated _before, so it goes, and _before refuses an import from builtins; a local D = dict and a name that may be a type or a container now have their cases; and the exec mutants follow the lines they mutate. Record 0174 names the second round's routes, the refusals it makes on purpose (a function's own import of re.compile, a mapping read by a module's name, prose that puts a word that runs the next before git), and what is still not held. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ve its use, and a name bound two ways is refused where it is set Muse's and the Claude reviews of 49936ad: a case pattern's alternatives, opening ( and the ;; ;& ;;& leads; taskset and chrt take a first word; an unbound accessor's key, dict.get(d, 'sys'), is read; exec, eval or compile is the module's own only for a use below its binding, a function's body too, since the function may run first; a name a class or def binds and an if stores is bound two ways, and refused where it is set on; vars held by another module's name reached as its attribute, by any name for that module, or handed on by a walrus. Record 0174 names them, and what is still not held. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s read beside any binding, and the container read keeps its scope Argon's second read: an import of a name beside a store of it in the same module is followed to where it is stored; what each hop stores is read whatever the name resolves to first; _container reads a nested value in its own scope, keys what it has seen by scope, and reads a binding's module plainly. A name a def binds and an if stores is bound two ways only where no plain assignment already makes it so, so each rule keeps a mutant of its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ssignments, and the record takes 0177 CI's shards found two mutants that no test killed once every hop's stored values were read: the constant's plain assignments were read twice. The hop now reads only what a plain assignment does not already give, so the plain read keeps its own mutant, and the duplicate plain-read mutant goes. The record takes 0177, the Factory Builder's number; CI's gap check reads it once 0176 is on main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s no key, and 0177 names what is still not held Muse's, Argon's and the Claude reviews of 409932e, each with its boundary case and mutant: case leads with no space; exec deleted by globals().__delitem__; getattr as an attribute; a key in an f-string of constants; vars behind a second name through an attribute, a walrus or getattr(holder, 'd'), and through a holder's re-export; an imported container filled by an augmented assignment; a container's type a module stores read in its own scope, one a default gives under a shadowing name, and one imported from another module of the repo's; a module-level alias as an attribute's base; a def an if stores. A bound accessor's key is its first argument and an unbound one's its second, so a get's default passes again. Record 0177 names each, and the routes still not held: a dict subclass, a key built from parts or starred, a container's type a global gives, other unpackings and a def under an if. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
…head merged so the numbers run whole Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>



Closes #655 ("check_writes: routes still open after issue 640, an aliased stored name, a second class traced, exec by a binding that never runs"). That covers the issue's routes and the four that Muse's read of the merged #650 added. Every route is refused by
tools/check_writes.py, so none is left named as "not held".if, atryor a walrus, imported under another name (from a import P as Q)_origin)globalin another module's functionglobalassignments are readvars(other)orother.__dict__held by a name, then handed to a call_namespaces), whether a function's or the module'sifor atry, in a function, or deletedgetattr(m, 'importlib'),m.__dict__['importlib']sys,modules,__builtins__and__import__, by a literal key,getattrorget__builtins__as a module's attribute;sysormodulesgiven togettimeout -s KILL 60 git push,eval,watch,stdbuf, acasepattern's)dict.update(portinst.TABLE, ...),list.append(...)_READkeyed onid(fn); two files of one module nameHolds.
tests/test_tools.py::test_the_routes_issue_655_names_are_refusedgives each route a boundary case. It also checks that an unconditional top-level import of exec still passes, and so does a module filling its own container.named_test_does_not_killguard on.Record.
docs/decisions/0177-…(number given by the Factory Builder) amends 0171's "Still not held" row. CI's gap check fails until 0176 (#689) is on main. Main is merged in and verified before enqueue.Review rounds. Two full rounds of Argon, Muse, Claude and the Claude security review, then CI's twelve mutant shards, found more routes of the same kinds. Each one is now refused with a boundary case and a mutant, or named in 0177 as not held:
pop,setdefaultand__getitem__, bound or unbound.getattror accessor (len.__self__). Used before its binding, inside it, or in a function called first; or afterexcept ... as exec.D = dict,MutableMapping,__ior__,__iadd__), with the receiver read too.setsid,coproc,ionice,unbuffer,caffeinate,doas; andtimeout,flock,tasksetandchrtwith their first word.|, a leading(, and the;;,;∧;&leads. A)leads a command only afterin,;;,;∨;&, so prose with a)before git passes.ifstores.0177 states the deliberate refusals:
from re import compile.'modules'.Verification.
make checkspasses, and so does the Writes test class (10 tests). Amake verifyon an export of the head is running.Protected edits: none outside
tools/anddocs/decisions/. No RUNNERS, CALLERS or PATCHERS entry changes. Labelledfactory:hands-off.🤖 Generated with Claude Code