refactor(server): remove the generic ACP client fs guard and write grants - #13633
Conversation
| guardClientFsWrite(request.path).pipe( | ||
| Effect.andThen(clientFileSystem.writeTextFile(request, sessionCwd)), | ||
| ), | ||
| clientFileSystem.writeTextFile(request, sessionCwd), |
There was a problem hiding this comment.
Removing the guard changes how opted-in fs/* requests behave, but this PR deletes the focused adapter tests without replacing them. Could you add a test using the test filesystem layer that exercises an opted-in write outside a workspace-write sandbox (and a read in approval-required mode) to verify the intended delegation?
Posted via Macroscope — Effect Service Conventions
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR removes T3's generic ACP filesystem authorization guard, allowing the opted-in Antigravity path to rely on native agent approvals while retaining provider-specific path containment. Because this changes a production filesystem security boundary and the exact delegation behavior lacks the requested workspace-write adapter coverage, it warrants human review. You can add or adjust custom eligibility rules. Learn more. |
4bef658 to
bd9cc73
Compare
7bbffe5 to
6e062f3
Compare
bd9cc73 to
7cb3cd4
Compare
…ants Client fs is now opt-in and only Antigravity serves it, from handlers that confine requests to the workspace, while the agent asks before its own edits. Drop the fs policy guard in front of them, the fs dispositions, and the approval grants that let a client write follow an approved edit. The execute disposition and command grants stay for Devin's client terminals. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…s own approvals Without the generic guard, an opted-in flavor serves its fs requests under any runtime policy, confined to the workspace. Under a read-only sandbox and under approval-required, Antigravity reads and writes inside the workspace and is still refused outside it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
7cb3cd4 to
fc7e66b
Compare
Since #13623 only Antigravity serves client fs, and its handlers confine every request to the workspace and attachments dir. Antigravity also asks through
session/request_permissionbefore each edit. The generic fs policy guard in front of those handlers, and the write grants that let an fs write follow an approved edit, were built for agents that routed all their file work through T3. None do anymore.Part of the ACP work ("rely on the agent's own sandboxes and permission models rather than implementing our own, like Claude and Codex"). Restacked directly onto
t3code/codex-turn-mappingafter #13623 merged; it does not depend on #13629.What changed
AcpAdapterV2: removedguardClientFsRead/guardClientFsWrite. An opted-in flavor's fs handlers are registered directly.AcpClientPolicy: removedacpClientReadDisposition,acpClientWriteDisposition, and the write-root grants (allowsWrite, canonical write roots,MAX_GRANTED_WRITE_ROOTS).makeAcpClientPolicyGrantsnow records only command approvals. The module doc now says what T3 still mediates.acpPermissionDisposition(answers every agent's permission prompts), the MCP elicitation disposition,acpClientExecuteDispositionwith command grants, andAcpClientTerminalsfor Devin's client terminals. The path canonicalization helpers stay because the workspace-write sandbox still uses them to check permission-request locations.AcpProviderCapabilitiesV2now describesclient-boundarytruthfully: ACP agents run their own tools, and T3 only answers their permission requests by policy.AntigravityAdapterV2 client file system under restrictive policies > serves in-workspace reads and writes and still refuses outside paths. Under a read-only sandbox and under approval-required, Antigravity reads and writes inside the workspace and is refused outside it. With the guard still in place the write is denied and this test fails, which pins the delegation described below.AcpAdapterV2 > confines client-mediated writes under an explicit workspace-write sandboxand> serves client-mediated reads without approval in approval-required modeexercised the removed guard through a test-only fs handler. Antigravity's containment is covered byAntigravityAdapterV2 client file system(fix(server): Antigravity keeps its workspace containment #13613). Non-opted-in agents are covered by the method-not-found test (refactor(server): ACP client fs and terminals are opt-in per flavor #13623).AcpClientPolicy.test.ts > client-mediated dispositions(fs parts) and the write-grant cases ofmakeAcpClientPolicyGrantstested only removed functions. The terminal disposition and command-grant cases were rewritten against the smaller API.AcpAdapterV2 > does not turn an unknown permission approval into an execute grantstill covers the grant end to end.Decisions (override if you disagree)
defaultfor approval-required) still asks first.Verification
In
apps/server, withTMPDIRunder /home:vp test run src/orchestration-v2/Adapters/{AcpAdapterV2,AcpRegistryAdapterV2,AntigravityAdapterV2,GrokAdapterV2}.test.ts src/provider/acp/AcpClientPolicy.test.ts src/provider/acp/AcpClientTerminals.test.ts src/orchestration-v2/testkit/OrchestratorReplayFixtures.integration.test.ts: 251 passed, including all 87 replay fixtures.vp exec tsc --noEmit -p .: clean.vp run knip:check: clean.vp linton the touched files: only pre-existing warnings.Restack verification (head fc7e66b, on 6107b66):
vp test runonAcpAdapterV2,AcpRegistryAdapterV2,AntigravityAdapterV2,GrokAdapterV2,AcpClientPolicy,AcpClientTerminals: 166 passed.OrchestratorReplayFixtures -t "grok|antigravity|acpRegistry": 21 passed.tsc --noEmit -p apps/server: clean.knip:check: clean.vp linton touched files: only the pre-existing unusedNodePathimport inAcpAdapterV2.ts.Model: Claude Opus 5.5 (Claude Code)
🤖 Generated with Claude Code