Skip to content

브리지 테스트의 소켓 경로를 Unix 길이 제한 안에 둡니다 - #356

Merged
yansfil merged 1 commit into
mainfrom
fix/bridge-test-short-socket-path
Oct 3, 2026
Merged

yansfil merged 1 commit into
mainfrom
fix/bridge-test-short-socket-path

Conversation

@yansfil

@yansfil yansfil commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Related: #335 (이 테스트를 들여온 PR), agents/prd/three-column-panel/prd.md 구현 PR의 verify를 막고 있던 실패

Summary

hided의 a_remote_bridge_answers_this_device_and_ends_with_its_channel 테스트는 TMPDIR이 길면 항상 실패합니다.
기기 브리지는 테스트 임시 폴더 아래 bridges/<tmp>/bootstrap.sock에 소켓을 묶는데, Unix 소켓 경로는 약 100바이트(macOS 104)까지만 됩니다.
macOS 사용자 임시 폴더 아래에 검증 러너가 자기 폴더를 만들면 경로가 약 113바이트가 되어 bind가 실패하고, 브리지는 ready를 보내기 전에 끝나 테스트가 Disconnected로 멈춥니다.
이제 Unix에서는 이 테스트만 /tmp 아래 짧은 폴더를 씁니다. hided/tests/real_herdr.rs가 이미 쓰는 방식과 같고, Windows는 기본 임시 폴더 그대로입니다.
제품 코드는 바꾸지 않았습니다.

Review

  • 판단해 주세요: 브리지의 bind 경로가 너무 길 때 제품 쪽에서 더 짧게 잡을지는 이 PR 범위 밖입니다. 실제 HIDE_WORKSPACE_BRIDGE_DIR가 긴 기계가 있다면 별도 이슈로 다뤄야 합니다.
  • 조심해서 볼 파일: hided/src/workspace_cli.rs - 테스트 하나의 임시 폴더만 바뀝니다.

Evidence

  • 확인한 것:
    • 검증 러너와 같은 환경(env -i, 러너 HOME, TMPDIR=$(os.tmpdir)/sasu-suite-XXXXXX, CI=1)에서 수정 후 5회 연속 통과.
    • 같은 환경에서 수정을 되돌리면 hided/src/workspace_cli.rs:424에서 Disconnected로 실패(대조 1회). 원래 코드는 이 환경에서 5회 모두 실패했습니다.
    • 원인 변수는 TMPDIR 하나였습니다. HOME, CI=1, env -i만 바꿨을 때는 통과했습니다.
    • macOS에서 bash scripts/verify-cargo.sh lint 통과.
  • 확인하지 못한 것:
    • 전체 verify-cargo.sh test는 로컬에서 돌리지 않았습니다. 바뀐 것은 테스트 하나이고 CI가 전체를 돌립니다.
    • Windows와 Linux 실행은 이 PR의 CI가 처음입니다.

The device bridge binds its bootstrap socket two folders below the
test's temporary folder, so a long TMPDIR, such as a verification
runner's own folder under the macOS per-user temp, pushed the socket
path past the roughly hundred bytes a Unix socket allows; the bind
failed and the bridge ended before it was ready. On Unix the test now
takes a short folder under /tmp, as the real-Herdr tests already do.
@yansfil
yansfil merged commit bbd14a6 into main Oct 3, 2026
21 checks passed
@yansfil
yansfil deleted the fix/bridge-test-short-socket-path branch October 3, 2026 15:48
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