Repository navigation
fix(acp): keep the ACP run temp folder short enough for unix sockets - #38968
Merged
Merged
Conversation
An ACP agent's TMPDIR sat inside the data folder. On macOS that path made a socket such as datacloud-mcp-dataAgentKit-antigravityide.sock 131 bytes long, over the 103-byte limit, so child programs could not bind it. When a socket under the data-folder root would not fit, use a short per-user folder in /tmp (mode 0700, owner checked via ensureOwnedPrivateDir, keyed by a hash of the data root so Orca copies never wipe each other), and clear the old data root once. Roots that fit, and Windows, keep the current behavior. Ported from #33948 onto current main (acp-private-temp now uses launchPreparationFailure; daemon-socket-endpoint-path moved under daemon/endpoint/publication; the launch-parity test it touched was removed). Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 52 seconds. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
8 of 9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #33948 by @thefrikidude (Manan Chataut), with follow-ups from @Jinwoo-H. The original branch conflicts with main, so this ports it onto current main. The commit keeps Manan as author and credits the others with
Co-authored-bytrailers.Fixes #33809
Problem
An ACP agent's
TMPDIRlived inside the Orca data folder. On macOS, a child socket such asdatacloud-mcp-dataAgentKit-antigravityide.sockthen had a path 131 bytes long. Thesun_pathlimit is 103 bytes, so Antigravity's MCP proxy could not bind its socket.Fix
<data>/acp-temp/<agent>/run-XXXXXX/would not fit, the run root moves to/tmp/oacp-<uid>/<sha256(dataRoot)[0:8]>. That parent folder is checked with the existingensureOwnedPrivateDir(mode 0700, owned by this user). The hash stops two Orca copies from wiping each other's runs.Port notes (conflicts with main)
acp-private-temp.ts: main now throwslaunchPreparationFailure(error)instead ofnew AgentSessionPreSpawnError(error). The PR's logic is kept and uses the new helper.daemon-socket-endpoint-path.tsmoved tosrc/main/daemon/endpoint/publication/. The import and the error-message tweak point there now.structured-agent-launch-parity.test.tswas removed from main, so the PR's change to it is dropped.daemon-init-fresh-importcommit (test(daemon): import fresh daemon-init modules one at a time #34085) is already on main, so it is not included.acp-text-task.test.tsmakes its scratch root as a short/tmp/o…folder on POSIX, the same pattern the PR uses in other fixtures. Without this, the private-temp stage test waits for a path containingacp-tempthat never appears once the root moves.Verification
pnpm typecheck:nodepasses.pnpm test src/main/acp src/main/antigravity src/main/daemon/endpointpasses, including the PR's real-socket relocation test.pnpm check:changed: every gate passes except unit tests. The unit-test failures are in the cross-version wire harness (tar -xf timed out after 45000mswhile extracting old releases, plus a shared release-lock clash),orcad-chat-restart-offerandstructured-agent-launch-support. They happened with machine load around 70–90. On rerun,orcad-chat-restart-offerand the others pass; two cross-version harness tests still time out extracting releases. None of these touch ACP temp paths.