You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
check_writes: further ways a write could be reached past the check, written to hide it (raised by #587) #596
Raised by the reads of the pull request for #587. It adds tools/check_writes.py, by which only the callers it lists reach a GitHub write, read from the code's syntax. Its reads found routes round the check in four rounds, and 4e5b288 was the last round of fixes. On the Factory Builder's ruling, the check is "a net for code written plainly; code written to hide a write is the review's to see". The routes below are written to hide a write, and none is used on main. The review Role reads every change, so they are filed here rather than held in that pull request.
A namespace package: with no adapters/__init__.py, a dotted import adapters.effects is read as no module of the repo
import adapters.effects then adapters.effects.approve(...)
A class's attribute set by setattr, or from a function, then called through the class
setattr(Port, 'w', effects.approve) in one module, then Port.w(t) in another
gh or git run as a subprocess from Python, which is no request of adapters/github.py's and holds no verb as a whole string
subprocess.run(['gh', 'pr', 'merge', '1'])
Any later route a read finds that only code written to hide a write would take
Fixed in the pull request, for the record
These rarer routes were found by the reads and closed in 4e5b288, the last round:
__import__ imported from builtins under another name;
an adapter's __dict__ imported;
a nested function's parameter shadowing the outer function's call;
super() in an override of the same name.
Done when
Each way is refused by the check, with a boundary case in tests/test_tools.py and a mutant, or named as not held in the record with its reason. Main still passes.
From Astra's last read of #597, at 2ff8308. By the Factory Builder's ruling, every route through classes, scopes or registries belongs here, however plainly it is written:
Way
Example in adapters/
super() through a sibling base in a subclass's method resolution order
class Client(Forward, Writer), where Forward.act calls super().act(t) and Writer.act writes
A subclass's callback attribute reached by a base's cls.write
class Client(Base): write = staticmethod(drop), where Base.act calls cls.write(t)
A request copied, then changed (already listed)
outgoing = req.copy(), then outgoing.update([...])
A decorator's registry given as a parameter's default
Activity
don-petry commentedon Nov 7, 2026
Two more ways, from Astra's read of #597 at e7ab41d, which only code written to hide a write would take:
adapters/globaldef configure(doc):/global DOC/DOC = doc, then a POST ofDOCr = request("POST", "/graphql", body={...}), thenr["body"]["query"] = "mutation …"🤖 Generated with Claude Code
don-petry commentedon Nov 7, 2026
One more, from Astra's read of #597 at 6e8fae5, which only code written to hide a write would take:
adapters/req = request("GET", path), thenout = req.copy()andout.update([("method", "DELETE")])🤖 Generated with Claude Code
don-petry commentedon Nov 7, 2026
From Astra's read of #597 at 899121b, one more way:
adapters/def register(fn):/target = STEPS/target.append(fn), then@registeron a writer🤖 Generated with Claude Code
don-petry commentedon Nov 7, 2026
From Astra's last read of #597, at 2ff8308. By the Factory Builder's ruling, every route through classes, scopes or registries belongs here, however plainly it is written:
adapters/super()through a sibling base in a subclass's method resolution orderclass Client(Forward, Writer), whereForward.actcallssuper().act(t)andWriter.actwritescls.writeclass Client(Base): write = staticmethod(drop), whereBase.actcallscls.write(t)outgoing = req.copy(), thenoutgoing.update([...])def register(fn, registry=STEPS): registry[fn.__name__] = fn🤖 Generated with Claude Code
#596's record names an .exe and another case among the commands not held
#596's record is numbered 0167