Repository navigation
Refuse a HERDR_BIN_PATH that names nothing executable before the daemon starts - #200
Merged
Merged
Conversation
…on starts Herdr hands every pane the path its server started from, and that path died when the Electron bundle replaced the Swift one under the running server (Resources/herdr-runtime/herdr became Resources/herdr). A hided started inside a pane inherited the old value, came up healthy, and then failed every pane attach with spawn_failed, so the app showed every pane as unavailable with the cause only in the core log. The daemon now refuses that value before it binds or writes state, and hide connect refuses it before spawning as start_failed with the path, instead of a ten-second no_response that names nothing. A missing binary stays the logged degraded state; a Workspace command still never checks it, since it never runs herdr.
yansfil
added a commit
that referenced
this pull request
Oct 28, 2026
…dows shell never draws (#1810) Closes with-hide/hide-private#200 Related: with-hide/hide-private#116, with-hide/hide-private#117, with-hide/hide-private#154, with-hide/hide-private#312 ## Summary Linux desktop nightly가 매일 실패하던 원인을 고치고, Windows web e2e에서 첫 화면이 안 그려지는 flaky의 원인을 다음 실패에서 알 수 있게 기록합니다. - #200: Herdr 화면에는 줄바꿈 표시가 없어서, 줄 끝까지 꽉 찬 주소는 다음 줄 첫 단어로 이어진다고 읽습니다. Linux에서는 이 테스트의 pane이 정확히 29칸이고 `http://127.0.0.1:PORT/a.html`도 29자라, 다음 줄 `osc8`이 주소에 붙었습니다. 주소 다음 줄을 비워 폰트 폭과 무관하게 했습니다. - #116, #117(같은 증상 #123 #133 #146 #217): Windows에서 shell이나 프로젝트 줄이 20초 안에 안 그려집니다. 남은 증거로 원인을 확정하지 못해 이 PR에서 닫지 않습니다. `enterWorkspace`의 대기가 실패하면 페이지 상태, 각 요청의 응답, 응답 없이 끝난 요청(최대 32개, Chromium의 이유 포함)을 failure dump로 남깁니다. 통과한 테스트는 아무것도 출력하지 않습니다. - #154: #1650(4fc9b8c)이 이미 고쳤습니다. 이후 flaky 3건은 모두 그 수정이 없는 커밋이고 10-24 이후 재발이 없어, 근거와 함께 이슈를 닫았습니다. ## Review - **판단해 주세요**: #200의 제품 동작은 이 PR에서 고치지 않았습니다. 꽉 찬 URL 뒤에 상관없는 줄이 오면 운영자에게도 틀린 링크가 열리지만, 화면 격자만으로는 진짜 줄 넘김과 구분할 수 없습니다(이어지는 조각도 URL 문자로 시작). Herdr는 `recent_unwrapped`로 그 사실을 알고 있어서, 그것을 링크 판단까지 가져오는 일을 with-hide/hide-private#312로 남겼습니다. - **판단해 주세요**: #116/#117은 원인 수정이 아니라 진단 추가입니다. 분석은 #116, #117 코멘트에 있습니다. - **조심해서 볼 파일**: `web/e2e/wire.ts` - 모든 web spec이 지나는 길입니다. 대기를 감싸기만 하고 timeout, 재시도, 단언은 그대로입니다. - **조심해서 볼 파일**: `web/e2e/failure-dump.ts` - 실패한 요청 기록은 페이지마다 32개 상한이고 페이지가 닫히면 버립니다. 주소의 hash에 daemon token이 있어서 경로만 기록합니다. ## Evidence - **확인한 것**: 10-27 nightly 스크린샷(`terminal-url-menu.png`)에서 주소가 pane 오른쪽 끝에 정확히 닿고 다음 줄이 `osc8`로 시작합니다. 수정 전 9회 nightly가 모두 두 시도에서 받은 값 `.../a.htmlosc8`로 실패했습니다. - **확인한 것**: 361a08faa에서 nightly `lane=linux`를 두 번 dispatch했습니다(40718149961, 40718546910). 두 번 모두 desktop e2e linux 19/19 통과, 고친 테스트 첫 시도 통과, flaky 없음입니다. - **확인한 것**: 같은 커밋의 PR verify(40718258556)가 통과했습니다. 고친 테스트는 macOS와 Windows desktop e2e에서도 첫 시도에 통과했고, desktop·web e2e 모든 shard에 flaky가 없었습니다. - **확인한 것**: 9d7fd7c(실패 요청 버퍼)는 web e2e eslint, 타입 검사, `playwright test --list`(387 tests)가 통과했습니다. CI는 이 커밋에서 다시 돕니다. - **확인하지 못한 것**: 로컬 desktop e2e는 돌리지 못했습니다. 디스크 여유가 759 MiB라 debug build가 불가능해 실행 근거는 모두 CI입니다. - **확인하지 못한 것**: #116/#117의 원인. 다음 Windows 실패의 `[failure dump] shell start` / `project row` 줄이 근거가 됩니다. <details><summary>Verification record</summary> - Base: `8915cb3d8878` (origin/main at branch start) - Heads: `361a08faa` (spec fix and dump), `9d7fd7c38` (failed requests kept for the dump only) - Nightly dispatch `lane=linux` on 361a08f: run 40718149961 success; run 40718546910 desktop e2e nightly-linux success. Both: `✓ terminal-links.spec.ts:420:5 ... @platform`, `19 passed`, `no flaky test in this run`. - PR verify 40718258556 on 361a08f: success. desktop e2e macOS 1/2 and 2/2, windows desktop, web e2e linux 1-6/6, web e2e windows: each `no flaky test in this run`. - Before the fix: nightly runs 39158794370 through 40586138794 (9) failed `terminal-links.spec.ts` on both tries with `Received: ".../a.htmlosc8"`. - Local on 9d7fd7c: `eslint e2e/wire.ts e2e/failure-dump.ts` exit 0; `tsc --noEmit --strict` on both files exit 0; `playwright test --list` 387 tests in 119 files. - #154: last flaky comment 2026-10-23T19:16Z on commits without 4fc9b8c; main 115b63c run 40706855580 desktop e2e macos 2/2 `ok 72 new-tab.spec.ts:130`. </details>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
2026-09-27 18:59 the Electron
hide.appreplaced the Swift bundle under a running Herdr server, andherdrmoved fromResources/herdr-runtime/herdrtoResources/herdr.The server keeps handing every new pane the path it started from, so a
hidedstarted from inside a pane inherited a deadHERDR_BIN_PATH, came up healthy, and failed every pane attach withspawn_failed; the app showed every pane as "unavailable · click to retry" with the cause only incore.jsonl.The daemon now refuses a
HERDR_BIN_PATHthat names nothing executable before it binds or writes state, andhide connectrefuses the same value before spawning, answeringstart_failedwith the path instead of a ten-secondno_response.A missing binary stays the logged degraded state, and a Workspace command still never checks it, since it never runs herdr.
Review
hided/src/env.rs-load_from은 그대로 관대하고(herdr_bin_path_wins_over_path_lookup이 존재하지 않는 경로로 Ok를 기대), 검사는herdr_bin_error로 분리해 데몬 시작과 spawn 직전에만 호출합니다. failure path.hided/src/lib.rsstart_daemon- lock, state file, bind보다 앞에서 거부해 죽은 pid를 가리키는 state file을 남기지 않습니다.Evidence
cargo test -p hided전체 통과(lib 102, handshake 22, opener 10), 새 단위 테스트 1개(없는 경로 -> 경로가 담긴 오류, 실행 가능 파일 -> None, 바이너리 없음 -> None);verify-cargo.sh lint경고 없음.hide connect에 없는 경로를 주면{"ok":false,"reason":"start_failed","detail":"HERDR_BIN_PATH: <path> is not an executable file; …"}exit 2, state dir에 아무것도 남지 않음;hided직접 실행도 같은 메시지로 exit 2.HERDR_SOCKET_PATH를 없는 경로로)에서hide connect가 데몬을 띄우고hide stop으로 내려감, 잔류 프로세스 없음.parseConnect가start_failed+detail로 읽는 것은 기존 테스트cli.test.ts가 증명).server.live_handoff로 새 번들 경로로 넘길 예정이라, 실제 pane 환경이 고쳐지는 것은 이 PR이 아니라 그 작업이 증명합니다.AI tooling: 대부분 AI 도구. 로그의
spawn_failed원인과ps eww의HERDR_BIN_PATH, 재시작 후terminal.session_ready를 손으로 대조했습니다.