Skip to content

[fix] Keep E2E daemon sockets within path limits - #456

Closed
bvolpato wants to merge 3 commits into
mainfrom
bvolpato/fix-macos-e2e-socket
Closed

bvolpato wants to merge 3 commits into
mainfrom
bvolpato/fix-macos-e2e-socket

Conversation

@bvolpato

@bvolpato bvolpato commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

Why

The Web UI E2E daemon could not bind its socket under the default macOS temporary directory. Long TMPDIR and --bench-home paths also broke standalone daemon equivalence checks.

What changed

Choose a temporary parent that keeps the longest E2E socket path within the macOS Unix-socket limit. Keep the configured temporary directory when it is short enough, and otherwise use /tmp. Windows keeps its configured temporary directory because its daemon uses a TCP port file. The Web UI script still reports the actual retained directory with --keep-tmp. The CI ShellCheck command checks the shared temporary-directory helper.

For standalone daemon equivalence, use a private temporary alias when the requested home has an overlong socket path. Artifacts stay in the requested home. Worktree daemon homes also use a socket-safe temporary parent.

To reproduce with the web dependencies and Playwright Chromium installed:

base=$(mktemp -d /tmp/ig-e2e-check.XXXXXX)
long="$base/this-directory-name-is-long-enough-to-exceed-the-unix-domain-socket-path-limit-in-the-e2e-workflow"
mkdir "$long"
TMPDIR="$long" ./scripts/e2e_all.sh
TMPDIR="$long" python3 scripts/check_daemon_equivalence.py --skip-build --binary "$PWD/target/release/ig" --bench-home "$long/bench-home" --worktree-steps 1

Validation

python3 -m unittest discover -s tests -p test_e2e_workflow.py, python3 -m unittest discover -s tests -p test_check_daemon_equivalence.py, and ShellCheck cover the temporary-directory helpers and changed scripts. On macOS, the initial revision completed scripts/e2e_all.sh --binary <release-binary> with an overlong TMPDIR, including CLI, daemon, and headless Web UI acceptance. The standalone Web UI acceptance also completed with the host's default TMPDIR and --keep-tmp. Standalone daemon equivalence completed with an overlong multibyte temporary path, both with its default home and with an explicit --bench-home. The Rust suite was not rerun on this branch alone because this change only affects test infrastructure. Windows execution was not available locally.

A temporary worktree combined the code changes from the three PR branches. It ran cargo test --locked --test skip_gitignore --test literal_cli, both E2E infrastructure unit-test modules, and scripts/e2e_all.sh --binary <debug-binary> with an overlong TMPDIR. The browser used one headless worker.

The dependency audit fails on the unchanged main-branch lockfile because of existing rustls and zip advisories.

Evidence

Not applicable.

Risk

When a Unix temporary path is too long, the shell E2E artifacts use /tmp instead of the requested parent. Standalone daemon equivalence retains artifacts in its requested home and removes its private socket alias after stopping the daemon. The temporary directories remain private. The scripts fail if no suitable temporary parent is available. Revert the change to restore the previous temporary path selection.

Checklist

  • Change is focused and follows existing project patterns.
  • Tests cover changed behavior or regression, or testing is not applicable.
  • ./test.sh --quick passed during iteration.
  • ./test.sh passes, or Validation explains narrower proportional checks.
  • Relevant CLI, daemon, MCP, browser, neural, or artifact E2E passes, or E2E is not applicable.
  • User-facing docs and changelog are updated when needed.
  • Performance and relevance claims include reproducible evidence.
  • No private code, credentials, generated caches, or local paths are committed.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 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-10-17T22:02:08.282156Z d22baa6 PR opened
ℹ️ 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.

@bvolpato

Copy link
Copy Markdown
Owner Author

Included in #454, merged as b6f4e75.

The commits from reviewed head db1173e1de9766d44ff3cfe0982d628f9824462f are preserved in the combined branch. I verified that the merged tree exactly matches the reviewed candidate. Long and multibyte temporary-path cases, standalone daemon aliases, and real hosted macOS E2E passed. Closing as superseded.

@bvolpato bvolpato closed this Oct 18, 2026
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