Repository navigation
Description
Context
Review of #1650’s draft #1741 at 1430de2bd65fb2541b30c7f86828c8916301b0e1 found a second path around a configured protect entry. With protect: [me/identity.md], the resolved worker mount refuses a direct write. The same interactive turn can call the existing curated update tool; its authoritative application route changes that document successfully.
The owned-fixture reproduction drives real runSession, makeBridge and createBrainApplication, both first-party Claude/Pi application policies, a live authorized principal and actual bubblewrap direct-write refusal. The assertion POLICY_CURATED_PROTECT_REFUSAL fails because the application returns ok: true; the fixture document actually changes. The earlier attempt failed for unrelated authority revocation and is not counted as reproduction.
validatePath in packages/ui-server/src/brain/application.ts:32–43 checks static policy/dot-path and Markdown restrictions, but no admitted governance protection list. makeBridge is created before the governed hold in packages/ui-server/src/ws/run-session.ts:435–461; the later admission at :482 supplies the worker’s frozen policy and protected mounts. The bridge’s application closure at packages/ui-server/src/ws/bridge.ts:473–495 does not receive those facts. This contradicts the policy decision’s added protected-set meaning; it is a missing enforcement path for an approved policy choice, not a request for a new permission ruling.
Scope
Make authoritative agent applications consume the actual admitted turn’s frozen effective protected paths, consistently with the worker. Cover every affected application operation and planned output, including paths generated by capture planning, submitted PNG mask destinations, and protected files/directories otherwise removed by the same mask operation's scratch cleanup. Preserve the existing static policy/alias restrictions, exact-input authority and writer-lock/revalidation behavior. Refuse a protected target with a named reason and no partial mutation.
Deliver this bounded correction together with #1650 in #1741 before the new policy surface is marked ready. It is supporting integrity work under the governed-profile programme.
Out of scope
New policy keys, new protection categories, changing tier release authority, budget/scope/egress enforcement, policy-update/revert authority, extra approval UI, or reparsing brain code on the host.
Acceptance criteria
- The reproduced protected document remains unchanged through both adapters’ real application bindings after direct worker write refusal.
- Existing protected files, descendants of protected directories and protected absent targets are refused for applicable create/update/remove/capture outputs; permitted documents remain writable through the same route.
- An already admitted turn keeps its captured policy; a later policy read or a different session cannot replace that turn’s authority.
- Validation occurs for every target under the existing write/revalidation path, including planner-derived paths, without false success or partial writes.
- A mutation removing the policy-target guard fails the named actual application assertion, then the restored runtime and focused preflight pass. Full selected hosted proof is required before ready/merge.
Verification
The owned fixture reproduction above, both first-party policy bindings, real host application writes and worker positive/negative controls, followed by bun run check:pr --base origin/main and integrated #1741 proof after the foundation. Preserve the failing-first receipt and immutable head/base details.
Contract impact
Internal turn-to-application authority plumbing. Reuse existing refusal envelopes unless a necessary additive field is documented in the same CONTRACT commit. Existing #1650 release commitment is0.42.0.
Blocked by #1649
2026-10-12 confirmed same-class paths: both first-party mask bindings accept an authorized, matching browser PNG submission and replace a configured protected mask after the direct worker write refused. An otherwise permitted scratch mask's actual prune also removes a protected old file beneath a protected directory. These owned fixtures fail POLICY_SUBMITTED_MASK_PROTECT_REFUSAL and POLICY_MASK_CLEANUP_PROTECT_RETENTION, respectively. The bounded correction covers these exact write/removal paths with the same admitted facts; no new permission or exploratory scope is introduced.
Activity
schlessera commentedon Oct 12, 2026
Claim:
policy-protect-1743-78381f66; branchfeat/1650-policy-reader-78381f66, draft #1741 together with #1650. Implementing the confirmed authoritative Markdown, submitted PNG and protected scratch-cleanup paths using the turn’s captured protection, preserving existing authority, static restrictions and locks. #1649 remains the integration prerequisite; no further exploratory scope is added. Milestone 0.42.0.fix(ui-server): honor admitted protection in authoritative applicatio…
CONTRACT: honor admitted protection in authoritative applications (#1743
schlessera commentedon Oct 12, 2026
Unblocked: #1649 is closed, so
scripts/sync-project.tsis removing theblockedlabel.CONTRACT: honor admitted protection in authoritative applications (#1743
CONTRACT: read immutable governance policy at turn admission (#1650) (#…