Skip to content

local-ci: current-node doctor sockets exceed AF_UNIX path cap #335

Description

@ScriptedAlchemy

Summary

pnpm check:local-ci --current-node-only can make the Doctor socket fixtures exceed Linux's AF_UNIX sun_path cap even though scripts/local-ci.mjs deliberately places each leg under the system temp root.

On current origin/main (fb25f47aa), the current-node leg temp root is:

/tmp/abci-63e6dc7a-verify-current-v22.23.2

Rstest then appends agent-bundle-rstest-w1, and temporaryDoctor() appends its fixture/endpoints path. The observed live socket pathname was 118 bytes:

/tmp/abci-63e6dc7a-verify-current-v22.23.2/agent-bundle-rstest-w1/agent-bundle-doctor-dgjJqa/endpoints/event-live.sock

Including the terminating NUL, that requires 119 bytes, exceeding Linux's 108-byte sockaddr_un.sun_path capacity. The identity endpoint pathname is 122 bytes before the NUL.

Reproduction

mkdir /tmp/abci-63e6dc7a-verify-current-v22.23.2
TMPDIR=/tmp/abci-63e6dc7a-verify-current-v22.23.2 \
  pnpm exec rstest --config rstest.unit.config.ts \
  packages/agent-bundle/tests/doctor.test.ts

Result: 32/36 passed; 4 failed. The failures are the socket-bearing cases:

  • reports old live runtime sockets as unsupported without warnings
  • reports runtime identity from a live status endpoint
  • bounds a silent runtime status probe
  • reports stale sockets and stale locks as warnings

The live socket entries disappear from Doctor's findings while their .lock files remain observable.

Likely cause

The local-CI short-root calculation accounts for its own leg directory, but not Rstest's per-worker TMPDIR nesting (rstest.worker-isolation.ts) plus Doctor's fixture and endpoint names. The verify-current-<full-version> leg name pushes the resulting socket address over the kernel cap.

Found while verifying #333; this is distinct from the examples-contract and hooks regressions fixed by #328.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions