Skip to content

단축키를 시스템마다: Windows·Linux에서 ⌘는 Ctrl+Shift, ⇧⌘·⌥⌘는 Alt+Shift, 맨 Ctrl은 셸에 - #347

Merged
yansfil merged 6 commits into
mainfrom
ui/platform-shortcuts
Oct 3, 2026
Merged

yansfil merged 6 commits into
mainfrom
ui/platform-shortcuts

Conversation

@yansfil

@yansfil yansfil commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Related: Refs with-hide/hide-private#103 (batch 7의 PR 1, 운영자 결정 2026-10-03)

Summary

  • 단축키 표(web/src/shortcuts.ts)는 macOS 코드로 한 번 쓰고, 규칙 하나(modChord)로 Windows·Linux 키를 만듭니다.
  • 규칙: ⌘는 Ctrl+Shift(Windows Terminal, GNOME Terminal, WezTerm, kitty)라서 맨 Ctrl 키는 셸과 에이전트 CLI로 갑니다. ⇧⌘·⌥⌘는 Alt+Shift(Windows Terminal이 pane에 쓰는 층, ⇧⌘D는 Alt+Shift+D)라 키는 최대 세 개입니다(운영자 결정 2026-10-03).
  • 예외는 PC_KEYS 한곳: 글자 크기 Ctrl+=/-/0, 최근 프로젝트 Ctrl+Shift+` (Alt+Tab은 시스템 것), 휴지통 Delete, 그리고 네 키가 남는 둘(아래 Review).
  • 터미널: Ctrl+Shift+C/V로 복사·붙여넣기. Ctrl+C는 선택이 있으면 복사, 없으면 인터럽트(Windows Terminal과 같음).
  • 창 리스너, 홀드 힌트, ⌘/ 시트, Settings, 앱 메뉴 accelerator, 화면의 모든 키 글자가 같은 표를 읽습니다. 전체 표는 docs/UI_BEHAVIOR.md "Keyboard shortcuts per system".

Windows·Linux의 ⌘/ 시트(브라우저 탭): 규칙이 만든 키는 Ctrl+Shift+ 또는 Alt+Shift+로 시작하고, "moved for Chrome"은 Chrome이 그 시스템에서 쥔 다섯 키에만 붙습니다.

Review

  • 판단해 주세요: 네 키가 남는 두 곳.
    • 이전 최근 프로젝트 Ctrl+Alt+Shift+` : 쥔 cycle은 Ctrl을 놓을 때 확정되므로 Alt+Shift+` 로는 cycle 안에서 뒤로 갈 수 없고, GNOME이 Shift+Alt+` (switch-group-backward)를 씁니다.
    • 브라우저 탭의 Reopen tab Ctrl+Alt+Shift+T: Chrome이 Alt+Shift+T(툴바 포커스)를 쓰고, macOS 브라우저 키 ⌥⇧T도 같은 키라 moved-for-Chrome으로 옮겼습니다.
  • 판단해 주세요: 새 Alt+Shift 키(T, N, H, B, K, D, Enter, W)는 Windows·GNOME·Chrome 목록과 겹치지 않습니다(Chrome의 Alt+Shift+T/A/I/N은 예약 목록에 추가). readline은 Alt+Shift+B를 Alt+B로 읽어(do-lowercase-version) 셸과 Claude Code의 Alt+B/D/T는 그대로 갑니다.
  • 판단해 주세요: 텍스트 필드·팔레트·보드·문서 안에서는 시스템 자신의 키(Ctrl+Enter, Ctrl-클릭, 문서의 Ctrl+S). 터미널이 키보드를 쥐지 않는 곳입니다.
  • 판단해 주세요: 탭 번호는 규칙대로 Ctrl+Shift+1-9(WezTerm). Windows Terminal·GNOME·브라우저가 서로 달라 지배적 관례가 없다고 봤습니다.
  • 조심해서 볼 파일:
    • web/src/keyboard.ts - high-frequency path. 키 입력마다 늘어난 일은 시스템 비교 하나와 AltGr 확인 하나(할당·구독·core 이벤트 없음).
    • web/src/terminals.ts - 키와 우클릭 메뉴의 복사·붙여넣기가 한 경로. 메뉴 Paste도 이제 이미지를 첨부하고, 클립보드 거절은 진단 로그로 갑니다.
    • desktop/src/main/menu.ts - Windows·Linux에서 Window 메뉴(Ctrl+W/Ctrl+M)를 빼고 종료·reload를 Ctrl+Shift로. 맨 Ctrl은 편집 역할과 글자 크기뿐.
    • web/src/shortcuts.ts - 저장 세트는 macOS 형태로 남습니다. Windows·Linux에서 ⇧⌘X·⌥⌘X·⌥⇧X가 모두 Alt+Shift+X라, 둘을 묶은 세트는 통째로 거절되고 그곳에서 녹화한 Alt+Shift+X는 ⇧⌘X로 저장됩니다.
  • 원칙: engineering 1(손으로 쓴 movedFrom, mapModifiedKey, opensExternally 중복 제거), 2·7(기존 레지스트리 위 systemRegistry 한 층), 4(시스템이 쥔 키는 저장 전 거절), 6(기존 터미널 앱 관례), 12(시스템별 전체 표와 "맨 Ctrl은 셸 것" 불변식만 고정). design 5·10(그 시스템에서 동작하는 키만 표시).
  • 질문: Linux 브라우저 탭의 영역 cycle(Alt+` , Alt+Shift+` )은 GNOME·KDE 기본 키와 겹칩니다(이 PR 이전 결정에서 온 것, 문서에 한계로 적음). Linux만 다른 키를 둘지 정해 주세요.
  • 질문: Windows·Linux 앱 창에서 Alt 단독 입력이 메뉴 막대로 포커스를 옮기는지는 실제 기기에서 봐야 합니다. 그때 autoHideMenuBar 같은 창 옵션을 정할까요?

Evidence

  • 확인한 것:
    • 웹 단위 860개, 데스크톱 단위 94개(3 skip) 통과. tsc·eslint·build, cargo fmt --all --check, 구조 검사 통과. verify-web.sh의 hcoord e2e는 이 Mac의 부하(load 10)에서 herdr 호출이 시간 초과로 한 번 실패했고, 단독 재실행에서 35/35 통과(이 PR은 hcoord를 건드리지 않음).
    • 독립 리뷰 Fix now 6건 반영: 붙여넣기의 이미지 유실, 조용한 복사 실패, 메뉴의 맨 Ctrl, 이유 없이 달랐던 브라우저 키 셋, 문서의 Ctrl+U, macOS 폼의 ⌃↵ 제출.
    • Alt+Shift 층 변경 뒤 새 독립 리뷰 Fix now 3건 반영: Ctrl+Alt+Shift pane 바인딩 거절(Mac에서 세트가 버려지던 것), 기록기의 AltGr 거절, 낡은 주석과 문서의 GNOME 모순.
    • Alt+Shift 변경 뒤 Windows·Linux 키를 강제한 로컬 e2e: 영향받는 spec 11개 61개 중 60 통과. 실패 1건(s7가 Settings에 묶던 Alt+Shift+K가 이제 Keep open이라 거절됨)은 올바른 동작이라 spec을 Alt+Shift+U로 옮겨 통과. macOS 키로 s2·s7·sidebar-shell 16개 통과.
    • macOS에서 Windows·Linux 키를 강제한 로컬 e2e: 바뀐 spec 파일 27개(테스트 94개) 중 91 통과.
      • checkout-pr·overview-prs 실패는 강제 환경의 산물(ControlOrMeta가 macOS에서 ⌘를 보냄). recent는 실제 spec 버그(Alt+Tab 고정)라 고쳤고, 수정 뒤 영향받는 spec 13개 37개 테스트 통과.
    • Windows·Linux 키의 실제 증거는 이 PR verify의 Linux e2e shard입니다.
  • 확인하지 못한 것:
    • Windows·Linux 실제 기기의 데스크톱 앱(메뉴 표시, Alt 단독 입력, IBus의 Ctrl+Shift+E/U 같은 입력기 키). 운영자 결정대로 실제 Windows 확인은 나중입니다.
    • 데스크톱 e2e는 macOS에서만 돕니다. Electron의 Windows·Linux 키는 메뉴 단위 테스트로만 증명됩니다.
    • AltGr 무시는 테스트가 없습니다(Chromium이 macOS에서 AltGraph를 보고하지 않음).
추가 증거
macOS Windows·Linux
⌘/ 시트(브라우저 탭)
터미널 우클릭 메뉴

Windows·Linux 캡처는 macOS에서 시스템 판정을 고정한 로컬 빌드로 찍었습니다(커밋하지 않음). macOS 키캡은 ⌘↵에서 ⌘↩로 바뀌었습니다.

@yansfil

yansfil commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

머지 준비 완료 dcf939f
독립 리뷰 Fix now 6건 모두 반영, verify run 37124347158 green(Linux e2e 6 shard 118개가 Windows·Linux 키로 통과), 보고서 섹션 추가. #345 머지 뒤의 main과도 충돌 없이 합쳐집니다(겹치는 파일은 web/src/host.ts 주석뿐).

The registry stays written in macOS chords. `modChord` turns ⌘ into
Ctrl+Shift there, as Windows Terminal, GNOME Terminal, WezTerm and kitty
do, so a plain Ctrl key always reaches the shell and the agent CLIs; a ⇧
or ⌥ added to ⌘ becomes Alt, the layer kitty and WezTerm put above
Ctrl+Shift. `PC_KEYS` holds the few commands that keep another chord there,
each with its reason: text size on Ctrl and =, - or 0, the recent project
cycle off the system's Alt+Tab, and Delete for Move to Trash.

Matching, the hold hint, the sheet, Settings, the app menu's accelerators
and every chord label read the registry for the system the operator types
on (`keySystem`), and the glyphs follow it ("⇧⌘T" against
"Ctrl+Shift+Alt+T"). A stored set keeps macOS chords, so one set reads the
same on either system. Chords inside a text field, a palette, a board or
a document use the system's own command key (⌘↵ is Ctrl+Enter, ⌘-click is
Ctrl-click, Ctrl+S saves a document), and every direct metaKey test now
goes through it. In a terminal Ctrl+Shift+C copies and Ctrl+Shift+V
pastes, and Ctrl+C copies while there is a selection and interrupts
otherwise, as Windows Terminal does. AltGr is never read as a chord.
`web/e2e/chords.ts` reads the keys from the shell's registry for the
machine the spec runs on, Meta+K on the macOS job and Control+Shift+K on
Linux, so the Linux e2e exercises the Windows and Linux chords and the
macOS @platform job the macOS ones. Labels a spec asserts come from the
same place, and the terminal copy in s2 now uses the system's copy chord
on Linux too instead of the browser's copy command.
UI_BEHAVIOR.md gains Keyboard shortcuts per system: the rule, each
exception and its reason, the terminal copy, paste and interrupt keys,
and one table of every command in both hosts on both systems, generated
from the registry. ARCHITECTURE.md, the documentation map and
CONTRIBUTING.md point at it and say how the e2e presses chords.
Electron gives quit, reload and the Window menu's close and minimize plain
Ctrl keys off macOS, which fire whenever a terminal does not hold focus.
Quit and reload take the rule's Ctrl+Shift there and the Window menu stays
macOS's, so only the edit roles and text size keep plain Ctrl; a test
checks that against Electron's own role keys.
- Copy and paste in a terminal, from a key or the pane menu, go through one
  clipboard path: paste attaches an image as the menu's did, a refused
  clipboard is a diagnostic, and a failed copy keeps the selection.
- Ctrl+Shift+C is the terminal's even with nothing selected, so Chrome's
  element inspector never opens, and a binding on the terminal's copy or
  paste chord is refused.
- A browser chord differs from the desktop one on Windows and Linux only
  where Chrome keeps that chord there (reopen tab, close pane and Settings
  return to the desktop chord).
- A form still submits on Ctrl+Return on macOS; the one command-key helper
  replaces opensExternally; the exception reasons are comments.
- The Recent Projects e2e holds the system's own chord, since Alt+Tab is
  the system's on Windows and Linux.
- UI_BEHAVIOR: Ctrl+U for the line start, the plain Ctrl keys the app does
  take, Alt as the shell's Meta, and a stored set binding both ⇧⌘X and ⌥⌘X.
The Ctrl+Shift+Alt layer took four keys. A macOS chord that adds Shift or
Option to Cmd is now Alt+Shift there, the layer Windows Terminal puts its
panes on, while plain Cmd stays Ctrl+Shift and a plain Ctrl key still
always reaches the shell.

- Chrome keeps Alt+Shift+T, A, I and N on Windows and Linux; a browser tab
  reopens a tab with Ctrl+Alt+Shift+T, marked moved for Chrome.
- Previous recent project stays Ctrl+Alt+Shift+`: a held cycle commits on
  releasing Ctrl, and GNOME keeps Alt+Shift+`.
- A desktop pane binding takes exactly one of Ctrl and Alt with Shift, so a
  stored set always means a macOS chord; the recorder refuses AltGr.
- Chords are written in Windows' order Ctrl, Alt, Shift.
- UI_BEHAVIOR: the new layer, its checks against Windows, GNOME, Chrome and
  readline, the two four-key exceptions, and the Linux browser area cycle
  that GNOME and KDE take.
@yansfil
yansfil force-pushed the ui/platform-shortcuts branch from dcf939f to 1f8af3c Compare October 3, 2026 13:59
@yansfil yansfil changed the title 단축키를 시스템마다: Windows·Linux에서 ⌘는 Ctrl+Shift, 맨 Ctrl은 셸에 단축키를 시스템마다: Windows·Linux에서 ⌘는 Ctrl+Shift, ⇧⌘·⌥⌘는 Alt+Shift, 맨 Ctrl은 셸에 Oct 3, 2026
@yansfil

yansfil commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

머지 준비 완료 1f8af3c
운영자 결정(⇧⌘·⌥⌘ → Alt+Shift) 반영. 변경이 커서 새 독립 리뷰를 돌렸고 Fix now 3건 모두 반영, verify run 37128044163 green(Linux e2e 6 shard 117개 통과), 보고서에 갱신 섹션 추가. 이전 최근 프로젝트는 쥔 cycle과 GNOME 충돌 때문에 Ctrl+Alt+Shift+` 예외로 남겼고, 브라우저 탭의 Reopen은 Chrome의 Alt+Shift+T 때문에 moved-for-Chrome으로 Ctrl+Alt+Shift+T입니다(Review에 판단 항목).

@yansfil
yansfil merged commit 01edb48 into main Oct 3, 2026
21 checks passed
@yansfil
yansfil deleted the ui/platform-shortcuts branch October 3, 2026 14:10
yansfil added a commit that referenced this pull request Oct 3, 2026
Related: #349, `agents/prd/overview-modal/prd.md` (이어지는 작업: #350, 관련:
#306, #347, `agents/prd/three-column-panel/prd.md`)

## Summary

이슈 #349를 구현하기 전에 운영자가 승인할 PRD만 추가합니다. 코드는 바꾸지 않습니다.
Overview를 프로젝트 소속이 아닌 하나의 화면으로 만들어, Workspace 위에서는 모달, 중앙에 Workspace가
없으면 페이지로 보이고 범위는 All projects와 현재 프로젝트를 전환합니다.
진입점은 사이드바 맨 위 `Overview` 행(내 차례 수와 `⌘⇧O`), 툴바의 글자 없는 아이콘(내 차례가 있으면 점),
`⌘⇧O`입니다.
`⌘⇧P`/`⌘⇧A`는 사이드바 Projects/Agents 탭의 직접 키이고, Overview에서도 `⌃Tab`이 가장 최근
에이전트 pane으로 갑니다.
Decisions 25개, Behaviors 35개입니다. 화면은 아직 바뀌지 않아 이미지는 없습니다.

## Review

- **판단해 주세요 (툴바 순서)**: 점과 열린 View 개수 뱃지가 붙지 않도록 Overview 아이콘을 Open
server 앞에 둡니다. 시안은 globe 다음이었고 개수 뱃지를 뺀 그림이었습니다(D-07, B5).
- **판단해 주세요 (Home 행)**: Home 행은 지금처럼 Overview 페이지를 엽니다. 시안의 "Home is
only the Home workspace"는 #350이나 보드 승인 때 다시 봅니다(D-17).
- **판단해 주세요 (범위 내용)**: All projects는 오늘 Home Overview, 현재 프로젝트는 오늘 프로젝트
Overview를 그대로 담습니다. 기기 횡단은 하지 않습니다(D-12).
- **판단해 주세요 (내 차례 수)**: 앞에 있는 기기의 Needs You 수로, 사이드바 `Needs You · N`과
같습니다. 0이면 수도 점도 없습니다(D-14).
- **판단해 주세요 (사이드바 탭 키)**: `⌘⇧P`/`⌘⇧A`는 숨은 사이드바를 보이고 키보드를 그 목록으로 옮깁니다.
`Toggle sidebar view`는 없앱니다(D-18).
- **판단해 주세요 (⌘⇧H)**: Project home은 기본 chord 없이 ⌘K, View 메뉴, 툴바 메뉴로
남습니다(#350까지, B22).
- **조심해서 볼 파일**: `agents/prd/overview-modal/prd.md` Technical structure
- 웹 셸 페이지 상태만 바뀌고 core, wire, Herdr 계약은 그대로라는 경계.
- **질문**: 구현 전에 `home-final.html` 보드를 `design/hide-screens.pen`으로 옮겨
승인받아야 합니다. 시안에 없는 상태(수 0, 라이트, 좁은 창, 선택된 탭)를 어느 세션에서 그릴까요? 이 machine에는
`pen`이 없습니다(D-21).

## Evidence

- **확인한 것**: `sasu gate gap-audit` PASS(1차 BLOCK 2건: Home 행 동작, 팔레트 중
⌘⇧O를 고친 뒤), `sasu gate spec` PASS, 둘 다 sealed입니다.
- **확인한 것**: `sasu prd readiness`가 blocking gap 0개로 통과했습니다(behaviorCount
35, decisionCount 25).
- **확인한 것**: `shortcuts.ts`, `menu.ts`, `areaCycle.ts`, `keyboard.ts`,
`ui.ts`, `App.tsx`, `MainScreen.tsx`, `ProjectOverview.tsx`,
`sidebar.tsx`, `WorkspaceScreen.tsx`와 `UI_BEHAVIOR.md`,
`ARCHITECTURE.md`, `BROWSER_DISPLAYS.md`, `status-model.md`를 읽고 사실 진술을
맞췄습니다.
- **확인한 것**: `⌘⇧O`, `⌘⇧P`, `⌘⇧A`는 REGISTRY, `CHROME_RESERVED`,
`MACOS_RESERVED`, Electron 메뉴 accelerator에 없습니다.
- **확인한 것**: `check-no-workstation-identity.sh`,
`check-no-attribution.py`가 통과했습니다.
- **확인하지 못한 것**: macOS 시스템 단축키, 다른 앱, Chrome(⌘⇧A 탭 검색)과의 충돌은 확인하지 않았습니다.
- **확인하지 못한 것**: 운영자가 이 실행에서 새 질문에 답할 수 없어 qa-log는 이슈 #349, #350, 시안,
handoff에서 썼고, 위임 범위의 가정은 PRD에 가정으로 표시했습니다.
- **확인하지 못한 것**: 원칙 저장소에 ROOT.md가 없어 `sasu principles list`가 실패했습니다.
engineering 원칙은 직접 읽었습니다(D-25).
- **확인하지 못한 것**: three-column-panel 구현이 아직 main에 없어 그 툴바와의 실제 배치는 보지
못했습니다. 코드 변경이 없어 web, desktop, cargo lane은 실행하지 않았습니다.
yansfil added a commit that referenced this pull request Oct 5, 2026
…rt (#440)

Closes #342

## Summary

#347 already moved every on-screen chord through `chordLabel`,
`displayChord` and `commandLabel`, and the every-command table already
sits in `docs/UI_BEHAVIOR.md`.
This change checks that nothing was missed, closes the drift risk and
records the support range.
No screen changes, so there are no screenshots.

- Searched `web/src` and `desktop/src` for hardcoded `⌘ ⌥ ⇧ ⌃` and for
Ctrl, Cmd, Alt words: what remains is comments, the design gallery's
invented data, and catalog strings that are already picked by system
(`...Mac` / `...Pc` keys, `trashMacHint` shown only for the macOS-only
passthrough).
- New `web/src/shortcutsDoc.test.ts` parses the Every command table and
compares each row with the registry for both hosts on both systems.
It found a real error: Agents sidebar's Windows and Linux chords were
swapped between the desktop app and the browser tab (now `Alt+Shift+A`
and `Ctrl+Alt+A`).
Two row names now match the registry titles (`Agents sidebar`, `Projects
sidebar`).
- `docs/INSTALL.md` gains a per-system support table and a short list of
what stays unverified on Windows and Linux (paths, file manager reveal,
default app, trash, macOS text-editing keys, Alt+Shift input switching).
Nothing was refactored.

## Review

- **판단해 주세요**: the support table marks the desktop window and menu
"unverified" on Windows and Linux because no desktop e2e runs there; say
so if you would rather state it differently.
- **조심해서 볼 파일**: `docs/INSTALL.md` - the claims in the table must match
what CI actually runs.
- **질문**: none.

## Evidence

- **확인한 것**: `scripts/verify-web.sh web typecheck`, `lint` and `test`
(104 files, 989 tests) and `desktop test` (99 passed, 3 skipped) pass
locally; the new test failed before the doc fix and passes after;
`check-no-workstation-identity.sh` passes.
- **확인하지 못한 것**: no native screenshot, because no rendered text changed;
no run on Windows or Linux hardware.
- **CI**: the first run failed `web e2e linux 2/6` on
`e2e/new-tab.spec.ts:72` (tab count timeout). This PR changes no runtime
code, and the shard passed on one `--failed` rerun, so it is treated as
a flake and not fixed here.
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>
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