Skip to content

Project Overview becomes a stage board in the web shell - #152

Merged
yansfil merged 11 commits into
mainfrom
prd/web-project-overview
Sep 25, 2026
Merged

yansfil merged 11 commits into
mainfrom
prd/web-project-overview

Conversation

@yansfil

@yansfil yansfil commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Related: PRD agents/prd/web-project-overview/prd.md · follows #150 (web design system reset) and #151 (sidebar agent status)

Summary

  • 웹 셸의 Project Overview가 목록이었던 것을 Swift ProjectHomeBoard와 같은 규칙의 보드로 바꿉니다 (Pen board F 기준).
  • Tasks 보기: 준비 / 작업 중 / 리뷰 / 머지됨 단계 열, worktree가 아닌 checkout의 즉석 줄, 링크 안 된 issue backlog; 머지됨은 접혀 이름만 보입니다.
  • Agents 보기: lineage root마다 카드 하나를 진행 중 / 내 확인 대기 / 끝 열에 놓고, 답을 기다리는 카드가 열 맨 앞에 halo로 옵니다.
  • 헤더: worktree 수, 열린 PR 수, upstream보다 뒤처진 커밋 수, Sessions, New agent (git 프로젝트는 New worktree 대화상자, 폴더는 Workspace).
  • 카드의 agent 행은 #151의 Agents 목록 행(AgentRowItem, agentRow.ts)을 그대로 쓰고, 후손을 기다리는 링은 core의 waiting_on_descendants에서 옵니다 (D-07).
  • ⌘⇧H가 앞에 있는 checkout의 Overview를 열고, Escape는 열린 대화상자나 메뉴가 없을 때만 Workspace 또는 Main으로 돌아갑니다.

Tasks board (Dark): card rows are the Agents list row, the needs-you card haloed with its request line

Agents board (Light): one card per lineage root in 진행 중 / 내 확인 대기 / 끝

Review

  • 판단해 주세요: 단계 규칙이 Swift와 같아서, 자기 커밋이 없는 새 worktree(커밋 안 한 변경이 있어도)는 merge-base --is-ancestor로 머지됨에 들어갑니다. PRD B5대로 두었고 바꾸지 않았습니다.
  • 판단해 주세요: 브랜치 칩은 Sidebar agent status: waiting-on-children parent, badge child list, quiet rows #151 규칙(부모와 checkout이 다를 때)을 따릅니다. 전에는 카드의 checkout과 다를 때였으므로, 3단 lineage에서 같은 checkout에 머문 손자에는 칩이 없습니다.
  • 판단해 주세요: 카드는 사이드바 접힘과 무관하게 lineage 전체를 그리므로 chevron과 후손 배지가 없습니다. issue link/unlink 메뉴는 이식하지 않았습니다.
  • 판단해 주세요: 문구는 board F의 한국어를 따릅니다. 원격 기기 칩은 원격 프로젝트에만 보입니다.
  • 조심해서 볼 파일: web/src/keyboard.ts - Escape 순서 (escapeLayers 다음, overlay 다음에 Overview 나가기)
  • 조심해서 볼 파일: web/src/components/agent-row.tsx - 사이드바와 공유. onToggleTree가 null이면 chevron 열을 그리지 않으며, 사이드바는 항상 함수를 넘깁니다.
  • 조심해서 볼 파일: web/src/projectBoard.ts - high-frequency path. agent가 틱할 때마다 보드를 다시 만들고, memo된 AgentRowItem이 바뀐 행만 다시 그립니다.
  • 조심해서 볼 파일: web/src/navigation.ts - OverviewProject가 deviceAgents로 바뀌어 기기가 응답하지 않아도 마지막 행을 유지합니다 (D-06).

Evidence

  • 확인한 것: 격리된 pinned Herdr 0.9.1과 worktree에서 빌드한 hided 위의 Playwright e2e. main 병합 후 전체 60/60, 마지막 chevron 변경 뒤 overview/sidebar-status/s6/s8/shell/theme 10개 통과 (8d0b9ea).
  • 확인한 것: overview.spec은 git 저장소 + bare origin + worktree 3개(긴 브랜치, 답을 기다리는 agent, ff-merge 끝남), 폴더, agent 없는 프로젝트를 fixture로 씁니다.
  • 확인한 것: overview.spec이 확인하는 것: 단계 배치, halo, 두 번째 줄, 머지됨 접기, 긴 브랜치 잘림, 헤더/⌘⇧H/Escape, 대화상자 안의 Escape, 데몬 재시작 중 보드 유지(alert 없음).
  • 확인한 것: pnpm --dir web typecheck, lint, test (39 files, 318 tests); Swift parity 단위 테스트는 projectBoard.test.ts.
  • 확인한 것: node scripts/check-design-contract.mjs, shortcut/right-panel/workstation-identity/harness-ignore 체크 통과. Light/Dark 캡처를 Pen board F와 나란히 대조했습니다.
  • 확인하지 못한 것: 실제 gh 데이터(리뷰 열, CI 결과, 열린 PR 수, issue 칩, backlog)는 fixture에 GitHub이 없어 단위 테스트로만 확인했습니다.
  • 확인하지 못한 것: 원격(SSH) 기기 프로젝트 보드, 라이브 앱의 GitHub stale 툴팁, 폴더/빈 상태의 Dark 캡처.
  • 생성물: design/hide-screens.pen은 node scripts/gen-screens.mjs로 다시 만들었습니다 (Screen / Project Overview).

AI tooling: 대부분 AI 도구. 단계/열 규칙을 Swift ProjectHomePresentation.swift와 대조했고, 캡처를 Pen board F와 대조했습니다.

Verification record
  • PRD: agents/prd/web-project-overview/prd.md (sha256 3515371bc8c6504f637e52229dbae83978cb9d96dd4413a4f217bf9ecead6b75)
  • Base fe5e0df → head 8d0b9ea, verified 2026-09-25T22:47:23.549Z: PASS
  • Verification report: agents/runs/web-project-overview/verification-report.json and agents/runs/web-project-overview/verification-report.md; source fingerprint d86ab5e2794edb250e3a6cab67783201e1fe7b20e34a29e4ca311e9276268d85
  • Suites:
    • S1: GREEN bash scripts/verify-cargo.sh test (exit 0)
    • S2: GREEN bash scripts/verify-swift.sh test (exit 0)
    • S3: GREEN bash scripts/verify-cargo.sh lint (exit 0)
  • Reviews:
    • Fidelity (head 8d0b9ea): no Fix now. Earlier round: Fix now 1 on 563137f (needs-you second line) fixed in b86341b. Follow-ups: restore a multi-level lineage case through buildBoard; device={null} would hide a remote row's device chip if the Overview ever shows one.
    • Code (head 8d0b9ea): no Fix now; confirmed the sidebar is unchanged, the AgentRowItem memo holds, and no removed name is referenced. Earlier round: Fix now 1 on 563137f (dead OverviewProject.agents) removed in 325dbca. Follow-ups: lineage walk written twice (treeRows, sectionTree), a 3-level branch-chip test, Date.now in the board memo, cycle/duplicate-pane tests, wire.ts sidebar assumption.
  • Evidence: 22 registered (13 screenshot, 5 image, 4 log); paths are local to the run directory
    • agents/runs/web-project-overview/evidence-2/captures/overview-tasks-dark.png
    • agents/runs/web-project-overview/evidence-2/compare/board-f-vs-tasks-dark.png
    • agents/runs/web-project-overview/evidence-2/captures/overview-agents-dark.png
    • agents/runs/web-project-overview/evidence-2/compare/board-f-vs-agents-dark.png
    • agents/runs/web-project-overview/evidence-2/captures/overview-tasks-light.png
    • agents/runs/web-project-overview/evidence-2/compare/board-f-vs-tasks-light.png
    • agents/runs/web-project-overview/evidence-2/captures/overview-agents-light.png
    • agents/runs/web-project-overview/evidence-2/compare/board-f-vs-agents-light.png
    • agents/runs/web-project-overview/evidence-2/captures/overview-folder-light.png
    • agents/runs/web-project-overview/evidence-2/captures/overview-empty-light.png
    • agents/runs/web-project-overview/evidence-2/pen-screen-project-overview.png
    • agents/runs/web-project-overview/evidence-2/web-unit.log
    • agents/runs/web-project-overview/evidence-2/web-e2e.log
    • agents/runs/web-project-overview/evidence-5/captures/overview-tasks-dark.png
    • agents/runs/web-project-overview/evidence-5/captures/overview-tasks-light.png
    • agents/runs/web-project-overview/evidence-5/captures/overview-agents-dark.png
    • agents/runs/web-project-overview/evidence-5/captures/overview-agents-light.png
    • agents/runs/web-project-overview/evidence-5/captures/overview-folder-light.png
    • agents/runs/web-project-overview/evidence-5/captures/overview-empty-light.png
    • agents/runs/web-project-overview/evidence-5/captures/sidebar-status-waiting.png
    • agents/runs/web-project-overview/evidence-5/web-unit.log
    • agents/runs/web-project-overview/evidence-5/web-e2e-focused.log
  • Changed paths: 34 (see Files changed)

…pshot

The web snapshot types gain the issue, GitHub status, change and merge
fields the core already serializes, and buildBoard puts each checkout in
the Git column the Swift ProjectHomeBoard does, with ad hoc, backlog,
Agents-view roots, needs-you ordering, delivery facts and the Overview's
state precedence.
The list Overview (Workspaces and Agents lists) becomes the board: a
header with the Tasks/Agents tabs, worktree, open-PR and behind-origin
facts, Sessions and New agent; the ad hoc strip; Git columns with Merged
folded; checkout cards with issue and mismatch chips, the needs-you halo
and one delivery fact; and agent rows that keep one line unless the agent
waits, changed unseen, or is selected. The same entry points open it, and
the Agents board groups lineage roots by lifecycle.
The reserved project_home chord opens the front checkout's Project
Overview instead of a not-ready notice, Escape returns to the Workspace in
front (or Main) once no dialog or menu is open, and an e2e on an isolated
Herdr covers entry, columns, cards, the Agents board, and the folder and
empty states.
UI_BEHAVIOR's Project Home section names the web owners and the rules the
board follows, including that merged is Git ancestry, and the screen list
and Screen / Project Overview sheet now draw the board instead of the
retired Workspaces and Agents lists.
… card

A Project with no agent shows the Overview's empty state, so the shared
e2e helper opens that Project's first checkout from the sidebar's project
list and puts the sidebar back on the list it showed.
… second line

The row's sentence is the label plugin's expected_reply token, which the
fixture now reports, so the needs-you card is checked for the question it
shows and not only for its halo.
overviewProject no longer computes the per-project agents only the retired
list read; the board reads the device's rows it keeps while unreachable.
The mismatch tooltip names git's stage as Swift does, a missing checkout
says so in its header's accessible name, agent rows are memoized like the
sidebar's, and Escape leaves the Overview only after the escape layers,
which the e2e now checks with the New worktree dialog open.
…ting ring

Adopt the sidebar-agent-status row rules in Overview cards: AgentRowItem
replaces the Overview's own AgentLine, the waiting ring and the second line
come from agentRow.ts and the core's waiting_on_descendants, and the branch
chip follows lineage_worktree_badge. A list with nothing to fold draws no
chevron column.
@yansfil
yansfil merged commit c0966d6 into main Sep 25, 2026
6 checks passed
@yansfil
yansfil deleted the prd/web-project-overview branch September 25, 2026 23:10
yansfil added a commit that referenced this pull request Sep 25, 2026
…152) under the desktop host

The shortcut table keeps the filled Electron column and takes main's
Project home row, which now opens the front checkout's Project Overview.
yansfil added a commit that referenced this pull request Sep 26, 2026
…h hide connect (#149)

Related: PRD `agents/prd/electron-basic-port/prd.md` · main(#150 web
design system reset, #151 sidebar agent status, #152 Project Overview)을
머지해 그 web shell 위에서 동작 (PRD D-09)

## Summary

- 브라우저 탭의 web shell은 ⌘T/⌘W 같은 단축키를 Chrome에 빼앗기고 다른 탭 사이에 섞입니다.
- `desktop/`에 Electron 호스트를 추가했습니다: `hide connect`로 살아 있는 hided에 붙거나
띄우고, 그 web shell을 전용 창에 띄웁니다.
- 레지스트리의 Electron 열을 Swift 단축키로 채웠고, 앱 메뉴도 같은 열에서 만들어 창 리스너와 같은 `run`으로
보냅니다.
- hided CLI에 `hide connect`(JSON)와 `hide status --json`을 추가했고, 데몬은 자기
프로세스 그룹을 가집니다.
- 서명·공증·배포 없이 로컬 `.app` 패키징(`pnpm --dir desktop package`)과 dev 실행만
제공합니다.

![The desktop app attached to an isolated hided, on the reset design
system](https://github.com/yansfil/pr-assets/blob/main/hide/electron-basic-port/4a006a8/desktop-attached.png?raw=true)

![⌘/ in the desktop app lists the Electron column, with no 'moved for
Chrome'
notes](https://github.com/yansfil/pr-assets/blob/main/hide/electron-basic-port/4a006a8/desktop-shortcut-sheet.png?raw=true)

![The host's own screen when hided cannot be reached, styled through the
generated
tokens](https://github.com/yansfil/pr-assets/blob/main/hide/electron-basic-port/4a006a8/desktop-cli-missing.png?raw=true)

## Review

- **머지 전 필수 수동 확인**: 패키징한 앱에서 실제 키로 ⌘T, ⌘W, ⌃Tab, ⌘C/⌘V를 한 번씩 눌러 동작이 정확히
한 번인지 봐 주세요.
- **판단해 주세요**: 한 번 누름이 두 번 실행되면 대안은 Electron에서 메뉴 소유 단축키를 리스너가 답하지 않게 하는
것입니다(CodeMirror의 Mod-d/f/`/`와 충돌 비용 있음).
- **판단해 주세요**: 새 탭/새 워크스페이스 힌트 문구 4곳과 Settings 안내 한 줄이 호스트 단축키를 읽게
바뀌었습니다(브라우저 출력은 이전과 같음).
- **판단해 주세요**: Electron에서는 브라우저 단축키 재지정(`browser_shortcut_bindings`)을
적용하지 않습니다. Electron 재지정은 후속입니다.
- **조심해서 볼 파일**: `hided/src/cli.rs` - failure path: `hided`가 옆에 없는
`hide`는 이제 자신을 다시 띄우지 않고 `start_failed`로 거절합니다(심볼릭 링크 CLI에서 자기 증식 체인이 나던
버그).
- **조심해서 볼 파일**: `desktop/src/main/host.ts` - failure path: 발견 상태 기계, 데몬
소실 후 재부착, 토큰이 로그에 남지 않는 경계.
- **조심해서 볼 파일**: `.github/workflows/pr.yml` - desktop lane 추가와 web lane
안의 Electron e2e는 GitHub에서 처음 돕니다.

## Evidence

- **확인한 것**: `_electron` smoke 5개, 격리된 hided + pinned Herdr: 부착과 터미널
pane, Playwright ⌘T와 메인 프로세스 메뉴 클릭이 각각 `create_tab` 정확히 1회, ⌥T 무반응.
- **확인한 것**: 같은 smoke에서 renderer에 Node API 없음(`hideHost`는 `kind`,
`onCommand`뿐), 외부 링크·이동은 기본 브라우저로, 창은 데몬 origin 유지.
- **확인한 것**: 두 번째 실행은 종료하고 기존 창을 부름, 마지막 창을 닫아도 앱 유지 후 activate로 복귀, 종료
후 같은 데몬 pid에 재부착, 창 크기·위치 복원.
- **확인한 것**: CLI 없음 화면과 Retry 후 부착, `hide stop` 후 web shell의 끊김 표시, 새
데몬으로 창이 따라감.
- **확인한 것**: 패키징한 unsigned `hide.app` 한 인스턴스(PID로 식별)를 격리 상태로 띄워 창 캡처,
종료·재실행 때 같은 데몬 pid(33068) 재사용. 이 네이티브 확인은 main 머지 전 head에서 했습니다.
- **확인한 것**: main 머지(#151, #152 포함) 후 head에서 web 단위 321개와 web e2e 60개
전체, desktop 단위 23개(토큰이 로그에 남지 않음 포함)와 `_electron` smoke 5개, cargo
test/lint, swift test.
- **확인한 것**: 머지 후 상태 페이지는 생성된 토큰만 씁니다. 렌더된 배경·글자·버튼 색이 `tokens.css`의
`.dark` 값과 같음을 Electron에서 계산된 스타일로 확인했습니다.
- **확인하지 못한 것**: 실제 키 입력. 이 Mac에 손쉬운 사용/이벤트 합성 권한이 없어 비활성 앱에 보낸 CGEvent가
버려졌습니다. 메뉴 가속키 이중 실행과 터미널의 ⌘C/⌘V는 미확인입니다.
- **확인하지 못한 것**: Dock 클릭과 ⌘Q를 실제로 누르지는 않았습니다(`activate` 이벤트와 기본 `quit`
역할로 대신).
- **CI**: 첫 실행에서 lifetime 테스트가 러너의 작은 화면 때문에 실패했고, 창 크기를 작업 영역 안에 맞추고 실제
배치된 bounds를 기대하도록 고쳤습니다.

<details><summary>Verification record</summary>

- PRD: `agents/prd/electron-basic-port/prd.md` (sha256
f9d347e4d5d315f4304d2cc2b5c183509b659c24e75b5560f492a5635b3b8bca)
- Base cb8bdff → head e1e560b (merges of origin/main fe5e0df #150 and
c0966d6 #151/#152), verified 2026-09-25T23:43:59.806Z: PASS
- Verification report:
`agents/runs/electron-basic-port/verification-report.json` and
`agents/runs/electron-basic-port/verification-report.md`; source
fingerprint
99f1c74ce8d26623f6d880100f826b6659673231741625629f5a21c6e3e95e0d
- Suites:
  - S1: GREEN `bash scripts/verify-cargo.sh test` (exit 0)
  - S2: GREEN `bash scripts/verify-swift.sh test` (exit 0)
  - S3: GREEN `bash scripts/verify-cargo.sh lint` (exit 0)
- Reviews:
- Fidelity, reviewed 5ec821c, follow-ups to ee979d9, 3b05523 (CI test
fix) and 4a006a8 (merge of #150: host-chord edits all survived on the
redesigned components, status page on generated tokens only; no new
findings) and e1e560b (merge of #151/#152: every host call site
survived, the Overview's ⌘⇧H and Escape go through the shared listener,
the ARCHITECTURE table matches the registry; no new findings): Fix now
(1) native double-fire unverified and the docs stated it as fact - docs
reworded to an assumption with the fallback, native check left to the
human above; (2) hint literals beyond the stated web boundary - accepted
within B9/B12, called out above. Follow-ups: B7 e2e added; watch the
first CI run; daemon_binary change called out.
- Code, reviewed 5ec821c, follow-ups to ee979d9, 3e2a669, 3b05523 (CI
test fix; its read-back suggestion applied in 3b05523) and 4a006a8
(merge of #150: token extraction throws on a missing block, rendered
status colors match `.dark`, lockfile only adds desktop; no new
findings) and e1e560b (merge of #151/#152: no auto-merge fault in
keyboard.ts, the menu bridge's null event reaches the new Overview
action safely, no new call site bypasses the host registry; no new
findings): Fix now (1) a failed loadURL logged Electron's message with
the token URL - fixed, only the error code is logged, `log.test.ts`; (2)
native double-fire - kept as the unverified human check, menu-only
fallback not taken because of CodeMirror's own Mod-d/f/`/`. Follow-ups
taken: queued CLI call after quit resolves as not started, post-spawn
stream error is not a spawn failure, `engines` node >=22.12. Left:
`MAX_DAEMON_CHILDREN` unused (pre-existing), CI lanes install the whole
workspace (intentional).
- Follow-up improvements: Electron shortcut rebinding; native keystroke
automation once an Accessibility-granted QA host exists; tray, global
shortcuts, Dock badge, pet, Browser pane, drops, usage (PRD D-05).
- Evidence: 8 registered (6 screenshot, 2 log); paths are local to the
run directory
  - agents/runs/electron-basic-port/qa/native-after-cmd-t.png
  - agents/runs/electron-basic-port/qa/native-attached.png
  - agents/runs/electron-basic-port/e2e-final/desktop-attached.png
  - agents/runs/electron-basic-port/e2e-final/desktop-shortcut-sheet.png
  - agents/runs/electron-basic-port/e2e-final/desktop-cli-missing.png
  - agents/runs/electron-basic-port/e2e-final/desktop-daemon-lost.png
  - agents/runs/electron-basic-port/qa/app.log
  - agents/runs/electron-basic-port/checks-transcript.txt
- Changed paths: 51 (see Files changed)

</details>
yansfil added a commit that referenced this pull request Oct 29, 2026
Closes with-hide/hide-private#153
Closes with-hide/hide-private#152
Closes with-hide/hide-private#148
Closes with-hide/hide-private#218
Closes with-hide/hide-private#213
Closes with-hide/hide-private#227
Closes with-hide/hide-private#319
Closes with-hide/hide-private#159
Closes with-hide/hide-private#246
Closes with-hide/hide-private#186
Closes with-hide/hide-private#126

## Summary

herdr-core의 연결 노드 runtime 테스트 11개가 가끔 실패하던 원인을 고쳤습니다.
대부분은 테스트가 순서를 직접 정하지 않아 백그라운드 작업이 끼어든 경우였고, 그중 둘은 제품 쪽 문제였습니다.

- 정리(cleanup) 검토 결과가 화면에 나온 바로 그 순간 누른 "정리" 확인이 조용히 버려졌습니다. 이제 검토 결과와 다음
작업 허용이 같은 순간에 일어나서 확인이 항상 받아들여집니다.
- 새 pane의 셸 대기에서, 마감이 읽기 도중에 끼어들면 앞서 실패한 이유가 지워져 진단 기록이 "unreadable" 대신
"timeout"이 되거나 엉뚱한 이유를 남겼습니다. 이제 마감에 잘린 읽기는 결과로 치지 않습니다.

대기 시간을 늘리거나 재시도를 더하지 않았습니다.
with-hide/hide-private#274(doorbell 두 테스트)는 재현되지 않아 범위에서 뺐고, 원인 후보와 증거를
이슈에 남겼습니다.

스크린샷 없음: 화면을 바꾸지 않는 core와 테스트 변경입니다.

## Review

**제품 동작이 바뀌는 곳** (둘 다 수정 없이 실패하는 테스트로 증명, Evidence 참고):

1. `herdr-core/src/worktree_cleanup.rs` `WorkerGuard`, `worker_ended` -
정리 worker가 마지막 snapshot 전달과 lane 해제를 한 lock 안에서 합니다(전에는 lock 두 번).
`runtime/projects.rs` `confirm_cleanup`은 lane이 잡혀 있으면 확인을 거절하는데, 검토 답과
lane 해제 사이에 온 확인이 여기서 버려졌습니다(#152의 CI 로그: 10초 동안 제거 진단이 하나도 없음).
- `Mutex<Runtime>` 아래 일: 늘지 않았습니다. 같은 `ingest_cleanup`과
`cleanup_worker_finished`(필드 하나를 `None`으로)를 두 번의 lock 대신 한 번의 lock에서
합니다. 새 I/O, subprocess, 직렬화는 없고 `notify`는 전처럼 lock 밖입니다.
`scripts/check-capability-readers-off-lock.sh` 통과.
- 판단해 주세요: lane 해제가 마지막 답과 묶였으므로 `confirm_cleanup`의
`cleanup_worker.is_some()` 거절은 이제 "검토가 아직 loading 중"일 때만 걸립니다. 그 주석을
고쳤습니다.
2. `herdr-core/src/runtime/terminal_input.rs` `wait_with` - 셸 대기의 반복이
시계와 한 번의 읽기를 받아 돌고, 마감에 걸쳐 끝난 읽기(결과가 무엇이든)는 결과로 치지 않아 마지막으로 끝난 읽기의 결과가
남습니다. `shell_reads_keys`는 main과 같습니다. 결과는 `terminal.input_shell_wait`
진단의 `outcome`/`reason`에만 쓰이고, 키는 어느 경우든 그대로 써집니다.

다음 둘은 지시서에 제품 변경 후보로 적혔지만 **테스트 fixture만** 바뀝니다: #218/#213의 held
link(`runtime/tests/inbound.rs`), #227/#319의 연결
전환(`runtime/tests/links.rs`).

**조심해서 볼 파일**:
- `runtime/tests/inbound.rs` - held link의 Herdr가 link가 풀릴 때까지
`connect`에서 기다립니다(전에는 없는 socket이라 즉시 거절). 그 거절을 node session sync가 받아
테스트가 연결해 둔 node를 끊긴 상태로 덮었습니다. link를 쓰는 모든 테스트(inbound,
hide_ai_devices)가 통과하지만, 끝까지 release를 쥔 테스트가 있으면 멈출 수 있는 구조라 봐 주세요. 이전의
10초 자동 종료(`recv_timeout`)는 없앴습니다.
- `runtime/tests/node_issues.rs` - 확인을 검토 답의 announcement 안에서
누릅니다(`ChangeNotifier::announcing`). 콜백 안의 panic은 삼켜지므로 값을 모아 밖에서
assert합니다.
- `suggestions/worker.rs` `handled` - 실행 중인 run이 없는 pen 명령의 거절 답을
barrier로 씁니다. 상태를 바꾸지 않는 명령이라 골랐습니다.
- `docs/TESTING.md` - The test decides the order와 Wait for state에 규칙 네
줄을 더했습니다.

<details><summary>이슈별 원인과 처리 (main 8a865d8 기준)</summary>

| 이슈 | 테스트 | 원인 | 처리 |
| --- | --- | --- | --- |
| #153, #148 | `runtime::delivery::tests::moved_terminal_keeps_…`,
`remote_observation_without_a_local_socket_…` | `Worker::spawn`이
doorbell/watch producer를 띄워 자기 시계로 pass를 돌림. watch tick이 fixture의 옮겨진
child를 못 읽고 폴더가 없다고 보면 watch를 끝냄(`watches.len()` 0, `watches[0]` index),
store가 쓰는 중에 테스트가 파일을 읽음(`ledger_unavailable`, 로컬 재현) | #1812와 같은 규칙: 이
파일의 테스트 12개를 `Worker::store`로, 파일을 읽기 전에 store를 멈춤 |
| #152 | `node_issues::a_node_s_merged_worktree_is_removed_…` | 제품: 위 1번
| worker 마지막 답과 lane 해제를 한 lock에서. 테스트는 가장 이른 순간에 확인 |
| #218 |
`inbound::a_node_pane_s_hide_memory_reads_for_the_node_s_session` | node
session sync의 `socket_missing` 답이 테스트가 넣은 session 뒤에 도착해 node를 끊김으로
바꿈(`pane_not_connected`, 실패 0.04초) | held link의 Herdr가 link 동안 답하지 않음 |
| #213 | `inbound::a_moved_core_reads_its_own_kit_…` | 같은 원인 + kit 작업이
대기열에 남은 채 dispatch하면 node는 `checking`이 되지 않음, dispatch 뒤 lock을 놓은 사이 답이
끝날 수 있음 | 대기열까지 비기를 기다리고, dispatch와 확인을 한 lock에서 |
| #227, #319 | `links::a_native_fork_keeps_state_changes_…` (#227의 새 이름이
#319) | "다음 connect에 전환" arm을 fork worker 옆의 control lane(focus)이 가져가면,
전환이 fork worker의 확인 뒤에 적용되어 `pane.get`이 옛 서버로 감 | 전환을 fork worker 자신의
thread connect에서만(같은 fixture의 archive 테스트도) |
| #246 | `ssh_hosts_list::the_host_list_names_each_alias_…` | dispatch 뒤
lock을 놓은 사이 fake 답이 끝나 `loading`을 못 봄 | dispatch와 확인을 한 lock에서 |
| #126 |
`suggestions::worker::tests::a_weak_line_waits_fourteen_quiet_days_…` |
fixture의 barrier read가 전날의 남은 read일 수 있음. 그러면 clock이 `Wake` 처리 전에 움직여
run이 실제 3분 뒤로 밀리고 10초 대기가 끝남(로컬 재현) | 응답 채널이 있는 명령으로 barrier(`handled`)
|
| #159 | `memory_analysis::tests::a_linked_node_s_closed_session_…` |
테스트가 Memory hook의 1초 제품 예산 안에서 읽음, 부하에서 답이 비었음(로컬 37%) | hook 답 대신
scope가 가리키는 Project를 직접 확인. hook 답은 `memory_hook` 테스트의 몫이고 뒤의 receipt
확인은 hook과 무관해 그대로 |
| #186 | `terminal_input::tests::a_terminal_that_is_never_read_…` | 제품:
위 2번 | 잘린 읽기는 결과가 아님. 두 테스트(기존 것과 잘림 규칙 새 것)는 테스트가 움직이는 시계와 정해 둔 읽기로 돌아
socket과 벽시계에 기대지 않음, bound 150ms 그대로 |
| #274 | doorbell 두 테스트 | 재현 안 됨(fixture는 10-09부터 store만 띄움, 실패 둘 다
store의 5초 답 기한) | 범위 제외, 이슈에 증거 코멘트 |

</details>

## Evidence

- **확인한 것 (수정 전 재현)**: main 코드 테스트 바이너리로 12개 테스트를 각 200회, 24개 병렬, load
average 31-38에서 돌림: #159 74/200, #148 1/200(`ledger_unavailable`), #186
1/200, #126 1/200(`a read: Timeout`), 나머지 0/200.
- **확인한 것 (수정 후)**: 같은 조건(각 200회, 24병렬, load 27-42)에서 수정 후 바이너리로 12개
테스트와 새 잘림 테스트를 돌림: 2,600회 실패 0.
- **확인한 것 (수정 없이 실패)**: #152 - `worktree_cleanup.rs`와 `projects.rs`만
main으로 되돌리면 새 순서의 node 테스트가 5/5 `a confirmation pressed on the answer is
taken`으로 실패. #186 - 반복의 잘림 분기 한 줄만 지우면
`a_read_the_bound_cuts_short_leaves_the_last_failure_as_the_reason`이
`Timeout`(기대 `Unreadable("link down")`)으로 실패.
- **확인한 것 (#186 재수정 뒤)**: 두 셸 대기 테스트 각 200회, 24병렬, load 25-29: 실패 0.
- **확인한 것 (CI)**: verify run 40823301322(head 808270c) 성공, rust
workspace Linux를 포함한 모든 lane에서 재시도로 통과한 테스트 없음.
- **확인한 것**: 로컬 `verify-cargo.sh nextest -p herdr-core --retries 0`
3437/3437 통과.
- **확인한 것**: 바뀐 모듈 295개 테스트 통과, `verify-cargo.sh clippy -p herdr-core
--all-targets -D warnings`, `fmt-check`,
`check-capability-readers-off-lock.sh` 통과.
- **확인하지 못한 것**: #218, #213, #227/#319, #246, #153, #152는 로컬 부하 200회에서
수정 전에도 재현되지 않았습니다(CI Linux에서만 기록). 원인은 CI 로그(실패 시각, 진단 순서)와 코드로 정했고,
Linux 반복은 이 PR의 CI 실행으로만 봅니다. 이 맥은 Linux 호스트가 없고 디스크 여유가 3-9 GB입니다.

<details><summary>Verification record</summary>

- base: main 8a865d8, head: ae7f390 (CI verify run 40826129061
success, no test passed only on retry)
- before binary: main 8a865d8, after binary: 커밋 전 작업 트리(포맷만 다름)
- load repeat: `repeat.sh <bin> <tests> 200 24`, 테스트 하나당 프로세스 하나, macOS
arm64
- CI #152 로그: run 40817735918 job 123262761058, TRY 1 FAIL 11.029s,
`worktree.*` 진단 없음
- CI #218 run 40675696797, #213 run 40485064142: TRY 1 FAIL
0.040s/0.034s, 패닉 직전 `remote.session_unavailable socket_missing`

</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