Simulator: every actor's write access is read from the permission each world serves (#299)
Merged
DO
23d ago+123+123+012345678901234567890123456789-17-17-01234567890123456789
Closes #299.
Decision 0048 says every actor's write access is read from the collaborator permission. The simulator held that for the issue author alone. Now both worlds hold it for every actor, so a colleague whose permission is only read labels, reviews and opens threads as a non-writer.
What changes
sim/world.pyPERMISSIONSnow includes the machine user, andPERMISSIONSandWRITE_ACCESSlive here as the worlds' own copy of the port's rule, never the port's.told()builds each person's and the machine user'scan_writefrom the permission served for their login. A login with nothing served reads asnone. An App's write access, a Lens's included, is left as the world made it.
- Both worlds apply
told()to every fact they give the Kernel and in their ownis_person. The pull request world's own reading of a standing approval also asks whether the approver can write, as the Kernel does. - Seeds: each seed's facts are as they were. The Claude review hashed
facts()and the trace for seeds 1ā40 of both worlds; they were identical before and after. sim/AGENTS.mdnow names one known difference: the fake gives an Appcan_write: true, where the port gives a Botfalse. It is harmless, since the Kernel reads an App's write access only for its type.- Decision 0048 gains a Boundaries row. No new record: no rule changes.
Tests and mutants
test_every_actors_write_access_is_read_from_the_permission, one in each world's tests. Each changes a label actor's permission and sees its events read as a non-writer's. In the PR world the test also covers a review's actor, a thread's opener and resolver, the machine user, a login with nothing served, and an App and a Lens left as made.- Ten new mutants, plus the existing "triage" mutant moved to
sim/world.py. Each was checked to apply once, parse and be killed.
Gates
- Claude review with a security pass: approved, with three minor findings, fixed in 72dce50.
- Muse: approved, with one minor finding, also fixed.
- AGY: not run (quota). Argon's quota resets in about 28 hours, so its review is owed.
Verify
make verify passes on a fresh export (1215 tests).
š¤ Generated with Claude Code