Skip to content

fix(agent): agent socket exceeds macos sun_path limit - #579

Merged
skevetter merged 1 commit into
mainfrom
bouncy-pony
Jul 3, 2026
Merged

fix(agent): agent socket exceeds macos sun_path limit#579
skevetter merged 1 commit into
mainfrom
bouncy-pony

Conversation

@skevetter

@skevetterskevetter commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Signed-off-by: Samuel K skevetter@pm.me

Summary by CodeRabbit

  • Bug Fixes

    • On macOS, the app now stores its runtime files in a stable home-directory location instead of a temporary location.
    • Improved SSH agent path validation to catch paths at the maximum allowed length and avoid failures at the boundary.
  • Tests

    • Added coverage for socket path length edge cases.

Signed-off-by: Samuel K <skevetter@pm.me>
@netlify

netlifyBot commented Jul 3, 2026

Copy link
Copy Markdown

Deploy Preview for devsydev canceled.

NameLink
🔨 Latest commit9129a91
🔍 Latest deploy loghttps://app.netlify.com/projects/devsydev/deploys/6a47d5bd89d1f10008a6664a

@coderabbitai

coderabbitaiBot commented Jul 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8bf93c78-c68a-4428-af63-dc8c5138c15e

📥 Commits

Reviewing files that changed from the base of the PR and between dd860f3 and 9129a91.

📒 Files selected for processing (3)
  • pkg/config/pathmanager_darwin.go
  • pkg/ssh/server/agent.go
  • pkg/ssh/server/agent_test.go

📝 Walkthrough

Walkthrough

This PR modifies Darwin's RuntimeDir() to derive its path from the user's home directory instead of the OS temp directory, and adjusts the socket path length check in the SSH agent from > to >=, removing a warning log, plus adds a boundary test.

Changes

Darwin Runtime Dir and Agent Socket Path Checks

Layer / File(s)Summary
Darwin runtime directory resolution
pkg/config/pathmanager_darwin.go
RuntimeDir() now resolves os.UserHomeDir() and builds ~/.<RepoName>/run, wrapping home-dir errors and calling ensureDir, replacing the prior temp-dir/UID-based path.
Agent socket path length boundary fix and test
pkg/ssh/server/agent.go, pkg/ssh/server/agent_test.go
checkAgentSocketPathLen comparison changed from > to >=, comment clarified, log.Warnf call removed; a new TestCheckAgentSocketPathLen_Boundary test validates behavior at max-1, max, and max+1 lengths.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • devsy-org/devsy#74: Modifies the same darwinPathManager.RuntimeDir() function's directory selection/creation logic.
  • devsy-org/devsy#441: Also touches checkAgentSocketPathLen/maxAgentSocketPath logic in the same file.

Suggested labels:size/m

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedThe title clearly matches the main change: fixing macOS agent socket paths that hit the sun_path length limit.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@netlify

netlifyBot commented Jul 3, 2026

Copy link
Copy Markdown

Deploy Preview for images-devsy-sh canceled.

NameLink
🔨 Latest commit9129a91
🔍 Latest deploy loghttps://app.netlify.com/projects/images-devsy-sh/deploys/6a47d5bd4f01860008df16f2

@skevetter
skevetter marked this pull request as ready for review July 3, 2026 15:48
@skevetter
skevetter merged commit 585c718 into mainJul 3, 2026
105 of 107 checks passed
@skevetter
skevetter deleted the bouncy-pony branch July 3, 2026 16:43
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Devcontainer startup fails immediately on macOS: SSH agent forwarding socket bind fails

1 participant

@skevetter