Repository navigation
PRD: 프로젝트별 Overview 제거와 프로젝트 행의 마지막 체크아웃 열기 - #351
Merged
Merged
Conversation
yansfil
added a commit
that referenced
this pull request
Oct 30, 2026
…four hided flakes (#1860) Closes with-hide/hide-private#351 Closes with-hide/hide-private#321 Closes with-hide/hide-private#347 Closes with-hide/hide-private#330 Related: with-hide/hide-private#339 (diagnostics only; the issue stays open) ## Summary Five flaky hided tests, one cause each: - #351 (`link_mux` connection end): on macOS a `recv` blocked on a local socket sometimes misses its peer's shutdown, and after that misses its own end's shutdown too. Then a core-side mux never saw its node end and kept its streams. Every macOS `LocalStream` read now waits in `poll` first, which hears both. The test's own `SO_RCVTIMEO` (EINVAL on macOS after the end) is replaced by a reading thread with a hang guard. - #321 (`device_bootstrap`): five tests each copied and stripped the 140 MB debug `hided` at once, past the fixture's 10 s command bound. A shared helper now strips and signs each build version once under a lock, and `remote_delivery` and `core_move` use it too. - #347: its one flaky run was the CI merge commit 15f05b4 of a #1846 head that was later rewritten, where 43 of 44 `core_move` tests failed together. It has passed first try on main since. The cause of that run is not proven; the issue is closed on the later main passes (evidence in the issue comment). - #330: the test was deleted with the SFTP upload in 14b6b68. - #339 (WSL, Windows only): the cause is not found. The journey keeps its steps and the Hide AI progress in a bounded in-memory record (256 lines) and prints it only when it fails. At its own 105 s guard, before the lane's 120 s one, it prints the record and the distribution's processes, read by an owned `ps` bounded to 10 s, and ends the test. A passing run prints nothing. ## Review - **판단해 주세요**: a macOS-only `poll` before every local-socket read, against the kernel's lost wakeup, instead of changing each caller that waits for a peer's end. - **조심해서 볼 파일**: `hide-platform/src/ipc.rs` - high-frequency path: every `LocalStream` read on macOS (Herdr socket, mux, pane service). - **조심해서 볼 파일**: `hided/tests/it/support/shipped.rs` - shared state across test processes: lock, half-made copy cleanup, eviction of an older build. - **질문**: `link_mux`'s end tells the link's user by shutting down its end of an in-process pair, which a Windows peer does not hear until the handle closes, and no `link_mux` test runs on Windows. Should that become its own issue? - **비용 검토**: one `poll(2)` per macOS read, with no new thread, timer, queue or notification. Linux and Windows read paths are unchanged (`cfg!(target_vendor = "apple")`). The mux frame reader sits behind a `BufReader`, so a frame is not one read per field. ## Evidence - **확인한 것**: #351 reproduced before the fix: `the_connection_ending_frees_every_stream` failed in 1 of 13, 1 of 81 and 1 of 141 stress iterations (both signatures). A stack sample showed the core's demux thread asleep in `recvfrom` after its peer ended. - **확인한 것**: the kernel behaviour, in C at load ~30 on macOS 15.1: `recv` after the peer's `shutdown(SHUT_WR)` hung for over 60 s, about once in 4,500 rounds. A `poll` wait hung 0 times in 48,000 rounds, and `close()` 0 times in 18,000. - **확인한 것**: the new contract test `a_shutdown_ends_the_peers_blocked_read_every_time` hung in recvfrom on its first iteration before the fix. Its rounds now run in an owned exact-test subprocess bounded to 60 s. With the macOS `poll` removed again, it failed at stress iteration 12 (round 3,724) in 10 s, with the subprocess reaped. With the fix: 75 runs × 5,000 rounds passed, and the `link_mux` tests passed 300 of 300 stress iterations (before the drain's failure-path change, which only touches a timeout). - **확인한 것**: `device_bootstrap` passed 6 of 6 twice locally at 8 threads (macOS, private sshd and pinned Herdr 0.9.5). The store held one stripped copy, rebuilt once when the build changed. - **확인한 것**: `hide-platform` + `hided` (lib and `it`) 971 tests and `herdr-core` + `hide-herdr-client` 3,496 tests passed on macOS with the change. Clippy `-D warnings` and fmt are clean. - **확인한 것**: the new contract is Unix only: on the first CI run, `os contract (windows)` showed that a Windows shutdown never reaches the peer (`CancelIoEx` ends this end's own I/O; the peer hears the end when the handle closes). - **확인하지 못한 것**: #339's cause (no WSL here). `wsl_device.rs` is Windows-only; a cross-check from macOS could not build its C dependencies, so the `windows wsl` lane is its first compile. - **확인한 것 (비용, 미시)**: a C microbenchmark of plain `recv` vs `poll`+`recv` on one socketpair (macOS 15.1, load 18-48), not a product build. 64 B messages × 300,000: `recv` 1.14-5.87 µs per read over 5 completed trials, `poll`+`recv` 1.61-6.71 µs over 9. The difference within a matched pair was 0.3-1 µs; 2 more `recv` trials hung on the lost wakeup. 16 KiB × 20,000, 6 trials each: 5.7-17.8 µs vs 6.4-16.4 µs, with the pairs disagreeing in sign (noise). - **확인하지 못한 것 (비용, 실사용)**: `docs/PERFORMANCE_TESTING.md`'s matched idle/driven terminal measurement (`scripts/web-shell-measure`, `MEASURE_SCENARIO=keys`: key echo p50/p95, hided CPU and RSS, base a891332 vs this head). It was not run: two release builds do not fit on this Mac's disk now, and its load is 20-60. The microbenchmark does not prove the product's end-to-end cost. - **확인하지 못한 것**: `core_move` and `remote_delivery` with the shared helper (left to the remote mailbox lane). <details><summary>Verification record</summary> </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.
Related: #350,
agents/prd/overview-remove/prd.md(함께 들어가야 하는 작업: #349)Summary
이슈 #350을 구현하기 전에 운영자가 승인할 PRD만 추가합니다. 코드는 바꾸지 않습니다.
프로젝트 행을 누르면 Overview 대신 그 프로젝트에서 마지막으로 포커스한 체크아웃이 열리고, 프로젝트 아래
Overview자식 행과 프로젝트 주소로 여는 진입점을 없앱니다.프로젝트 단위 조감은 #349의 Overview에서 범위를
이 프로젝트로 전환해서 봅니다.Decisions 12개, Behaviors 13개입니다. 화면은 아직 바뀌지 않아 이미지는 없습니다.
Review
sidebar-row-click-overview-row의 D-03과 B5-B7입니다.이 프로젝트범위를 두는 것이 확정돼야 D-05, D-06이 성립합니다. 두 PRD를 같은 순서로 승인할까요?Evidence
sasu prd readiness가 blocking gap 0개로 통과했습니다(behaviorCount 13, decisionCount 12).web/src/{sidebar,SearchPalette,WorkspaceScreen,keyboard,actions,recent,projects}.ts(x),herdr-core/src/model.rs,runtime/recent_checkouts.rs,docs/UI_BEHAVIOR.md의 Overview 진입점과 최근 체크아웃 목록을 읽고 사실 진술을 맞췄습니다.