Skip to content

🤖 tests: test the socket lock-owner check itself, keep make's dry runs off the host, and refuse a too-long default socket path early - #7913

Merged
ThomasK33 merged 4 commits into
mainfrom
fix/dev-server-socket-tests
Nov 4, 2026
Merged

ThomasK33 merged 4 commits into
mainfrom
fix/dev-server-socket-tests

Conversation

@ThomasK33

@ThomasK33 ThomasK33 commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Summary

Three small fixes from the advisor and checker review of #7912: a lock-owner test that tests the lock-owner check, make dry runs in the test file that no longer create folders on the host, and make refusing a too-long default socket path before it creates a folder.

Background

#7912 added the socket lock and the fresh-folder choice. Its reviews found three leftovers. None of them changes what the dev server does for a normal start.

Implementation

  1. Lock-owner test (src/node/utils/privateUnixSocket.test.ts). "refuses a lock file that another user owns" went through withPrivateUnixSocketPath with a foreign uid, and the folder check failed first, so it passed even without the lock-owner check. assertLockPathUsable is now exported and the test calls it on its own: the lock file is ours and the expected owner is not. A second test checks that a missing lock file is accepted. The symlink and folder tests still go through withPrivateUnixSocketPath, which shows that the check is wired in.
  2. Dry runs (scripts/devServerAuth.test.ts). make -pn dev-server claims the default socket folder at parse time (since 🤖 fix: lock the dev-server socket across probe and bind, and use a fresh folder when the default one is not ours #7912), in $XDG_RUNTIME_DIR or /tmp. The test helper now passes XDG_RUNTIME_DIR set to one temp directory for the whole file, removed in afterAll. The directories are made under /tmp, not os.tmpdir(), so that the socket path under them fits the 103 bytes of macOS (its os.tmpdir() is a long /var/folders/... path). A test asserts that the default socket path is inside it. The tests that set their own XDG_RUNTIME_DIR use their own temp directories, which they already removed.
  3. Length check (src/node/utils/privateUnixSocketFolder.ts). chooseDevSocketPath checked the length of the fallback path but not of the normal default path, so a too-long default created an empty folder and the backend refused later. It now checks the default path before it creates anything, and make stops with the "too long" message plus the existing hint that names XUM_BACKEND_SOCKET and XDG_RUNTIME_DIR.

Validation

Red first (tests: commit before the code): the new tests failed before the change (the lock-owner test and the length tests: assertLockPathUsable was not exported, and make exited 0 for a too-long default path).

  1. Mutation: with the owner check removed from assertLockPathUsable, the new test fails (1 of 24 tests in the file). The old test, run against the same mutated code, still passes.
  2. I ran strace -f -e trace=mkdir,mkdirat over bun test scripts/devServerAuth.test.ts:
    • The file from main: 12 mkdir calls on /tmp/xum-dev-1000 itself, plus the test-owned temp folders.
    • The file on this branch: 0 calls on /tmp/xum-dev-*. The 12 calls are on /tmp/xum-make-base-<random>/xum-dev-1000, and the test-owned folders are as before. No xum-make-* folder was left in /tmp after the run.
  3. Make with a default path that is too long exits non-zero, prints "too long" and the names of both variables, and the folder under it stays empty (a test checks that). chooseDevSocketPath has a unit test for the same case.

Risks

Tests and one early check in make's parse-time script. The only product change is that a too-long default path now stops make a step earlier, with the message that the backend would have given.


Generated with xum • Model: anthropic:claude-sonnet-5-5 • Thinking: xhigh • Cost: $53.21

…temp runtime dir, and refuse a default path that does not fit

Red: assertLockPathUsable is not exported, and the chooser creates the folder before it checks the length of the default path.
…socket path that does not fit before make creates the folder
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T09:29:26.783595Z 8e7a79f Manual request
🔒 Security Review ✅ Completed 2026-11-04T09:31:03.527154Z 8e7a79f Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Head: 1dff9b6

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

🟢 e2e stories (Haiku): 14 passed

22 agent steps · 7 replayed from cache · 15 model calls · 47.1k tokens (23% cached)
Spend: $0.09 of the $1.00 cap (proxy ledger)

All 14 tests in 9 files
Test Agent Time
🟢 chatRestart.e2e.ts · 1 passed 1 step · 1 call 5.3s
🟢 a chat survives a restart of the server 1 step · 1 call 5.3s
🟢 compaction.e2e.ts · 1 passed 1 step · 1 call 4.2s
🟢 /compact replaces the old chat with a summary 1 step · 1 call 4.2s
🟢 pluginTrustRestart.e2e.ts · 1 passed 4 steps · 2 calls 9.7s
🟢 a trusted plugin hook stays trusted after the server restarts 4 steps · 2 calls 9.7s
🟢 settingsRoundTrip.e2e.ts · 1 passed 2 steps · 1 call 9.3s
🟢 a chat survives trips through Settings 2 steps · 1 call 9.3s
🟢 sidebarPerWorkspace.e2e.ts · 1 passed 4 steps · 1 call 4.3s
🟢 a new workspace starts with its right sidebar collapsed while another keeps it open 4 steps · 1 call 4.3s
🟢 smoke.e2e.ts · 1 passed 2 steps · 1 call 2.6s
🟢 the agent opens the playground workspace 2 steps · 1 call 2.6s
🟢 streamErrors.e2e.ts · 1 passed 1 step · 1 call 10.2s
🟢 stream errors show in the chat, and the chat recovers 1 step · 1 call 10.2s
🟢 todoNudge.e2e.ts · 1 passed 1 step · 1 call 3.8s
🟢 the agent finishes open TODO items after the turn-end nudge 1 step · 1 call 3.8s
🟢 touchAlignment.e2e.ts · 6 passed 6 steps · 6 calls 21.4s
🟢 the Settings close button is level with the title on a touch screen 390px wide 1 step · 1 call 3.7s
🟢 the Settings close button is level with the title on a touch screen 768px wide 1 step · 1 call 4.0s
🟢 Backup settings checkboxes are small and level with their labels on a touch phone 1 step · 1 call 4.6s
🟢 the heartbeat checkbox is small and level with its label on a touch phone 1 step · 1 call 3.2s
🟢 a reply's model and time stay on one line on a touch phone 1 step · 1 call 3.3s
🟢 the workspace actions menu stays on the title row on a touch phone 1 step · 1 call 2.6s

e2e 0.20.0 · 1m 14s · web · run artifacts

🟢 e2e Electron stories (Haiku): 3 passed

3 agent steps · 3 model calls · 8.0k tokens (22% cached)
Spend: $0.02 of the $1.00 cap (proxy ledger)

All 3 tests in 3 files
Test Agent Time
🟢 electron/deepLink.e2e.ts · 1 passed 1 step · 1 call 4.9s
🟢 a deep link of a second launch starts a chat in the running app 1 step · 1 call 4.9s
🟢 electron/menuBar.e2e.ts · 1 passed 1 step · 1 call 5.5s
🟢 the workspace menu bar is the desktop title bar 1 step · 1 call 5.5s
🟢 electron/smoke.e2e.ts · 1 passed 1 step · 1 call 5.2s
🟢 Xum Electron opens the playground workspace 1 step · 1 call 5.2s

e2e 0.20.0 · 17.9s · electron · run artifacts

🟢 e2e agent repros (Haiku): no tests selected

Spend: $0.00 of the $1.00 cap (proxy ledger)

e2e 0.20.0 · 5.9s · 2 targets (web, phone) · run artifacts

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 1dff9b6e29

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1dff9b6e29

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/devServerAuth.test.ts Resolved
…path fits on macOS

Codex review on #7913. os.tmpdir() on macOS is a long /var/folders path, and the default socket path under it exceeds the 103-byte limit that the chooser now checks.
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Head: 8e7a79f

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 8e7a79fe2c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 8e7a79fe2c

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ThomasK33
ThomasK33 added this pull request to the merge queue Nov 4, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 4, 2026
@ThomasK33
ThomasK33 added this pull request to the merge queue Nov 4, 2026
Merged via the queue into main with commit d806f6a Nov 4, 2026
33 of 34 checks passed
@ThomasK33
ThomasK33 deleted the fix/dev-server-socket-tests branch November 4, 2026 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant