mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-07 04:12:04 +00:00
The surface guard grows a write leg. Membership is decided by the argument a module passes to the record resolver, not by the identifier, because a delegable read and a delegable write name the same symbol and mean opposite things. The call matcher resolves aliased and namespace-qualified calls back to the original name, and proves it can against synthetic modules. Two assertions carry the decision not to add a provenance column to eleven tables. Every module in the write list has to call auditLog, which is the only writer that stamps the acting account, and none of them may reach the audit table through the client instead. That decision rested on the trail existing; it now rests on a test. The prose on the read list said the write arms keep refusing under a switch. Eleven of them no longer do, so those sentences are rewritten rather than left to lie. The integration suite drives the shipped POST exports through the real handler, resolver, grant table and Prisma. Five legs per verb: the write lands under the owner and nowhere else, a read grant is refused with nothing written, a caller who was never granted is refused the same way, the request after a revocation is refused with no re-login, and a caller who never switched is indistinguishable from before. The grant is minted through the invitation flow rather than planted, and the audit assertion reads both ends of the row.