Skip to content

Make the Overview issue-first with GitHub and Local issue sources - #218

Closed
yansfil wants to merge 16 commits into
mainfrom
feat/overview-issue-first
Closed

yansfil wants to merge 16 commits into
mainfrom
feat/overview-issue-first

Conversation

@yansfil

@yansfil yansfil commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Related: #215 (hided가 gh를 찾게 한 수정, 머지됨. 이 PR의 GitHub 자동 판별이 그것에 기대요) · 후속: PRD 파이프라인이 이슈를 만드는 일은 이 저장소 밖이라 넣지 않았어요

Summary

Overview를 이슈 중심으로 다시 짰어요: 이슈 → 에이전트 → PR이 한 카드로 흐르고, Tasks 보드(백로그 · 진행 중 · 리뷰 · 완료)가 기본 화면이에요.
모든 프로젝트에 이슈 출처가 하나 있어요: GitHub, 또는 hide가 이 Mac에 두는 Local(L-3). Settings › Issues에서 프로젝트마다 고르고, 보드 · 새 이슈 · 본문 읽기 · 닫기 · 연결이 두 출처에 같은 모양으로 동작해요.
hide에서 이슈를 만들고(C), 백로그 카드의 시작(S)이 워크트리(AI가 이름을 지어 채우고 사람이 고칠 수 있음) + 이슈 연결 + 이슈 본문을 첫 지시로 받은 에이전트를 한 번에 시작해요.
"태스크 출처 연결 안 됨" 칸, 기다림 띠, 즉석 줄은 없어졌고, 페이지 전체가 스크롤되며, Agents 탭은 내 차례 / 실행 중 / 쉬는 중 / 정리할 것 인박스예요. All projects와 각 Overview가 ⌃Tab에 나와요.

Tasks 보드 (dark)
Tasks 보드: 이슈가 카드 머리, 질문 중인 에이전트는 카드 테두리로, 이슈 없는 워크트리는 이슈 연결로 붙여요.

Review

  • 판단해 주세요:
    • 9/21의 "GitHub는 읽기만" 결정을 뒤집었어요: gh issue create와 gh issue view <n> --json body만 허용 목록에 추가(github.rs).
    • 출처 자동 규칙: Git이 아닌 폴더는 Local, GitHub 저장소로 읽히면 GitHub, gh가 없거나 GitHub remote가 없으면 Local. Let Hide daemons find installed CLI tools from Finder #215 이전 빌드처럼 gh를 못 찾으면 GitHub 프로젝트가 Local로 보여요.
    • Local 이슈는 자동으로 닫히지 않아요(머지 조상 판정이 막 만든 브랜치까지 닫아버려서). 카드 ⋯ 메뉴의 이슈 닫기로만 닫혀요.
    • 폴더/main에서 시작하면 에이전트는 첫 지시와 함께 뜨지만 이슈 연결이 남지 않아 카드는 백로그에 머물러요.
    • Local 저장 위치: 상태 디렉터리의 local-issues.json(프로젝트 경로별, 번호 재사용 없음, 프로젝트당 2,000개 상한).
    • 어댑터 모양: 지금은 trait이 아니라 tasks::SourceKind(GitHub/Local) 하나를 runtime/issues.rs의 동작마다 match해요. 출처가 둘일 때는 이게 가장 단순하다고 봤고, Linear 같은 세 번째가 오면 trait으로 올리는 게 맞을지 판단해 주세요.
    • Pen과 다른 점: 시작 대화상자의 "그 패널로 이동" 체크 없음(시작하면 항상 그 패널로 감), Linear 행 없음, "1일 넘은 것" 수 없음(체크아웃별 활동 시각이 없음), "다음 차례 J" 없음.
    • 대표 이미지에서 볼 것: 진행 중 카드 한 장의 밀도(브랜치 · 제목 · 사실 줄 · 에이전트 줄)가 적당한지.
  • 조심해서 볼 파일:
    • herdr-core/src/runtime/issues.rs - gh/AI 호출은 worker 스레드, Local 저장은 합쳐 쓰는 save 스레드. mutex 안에 I/O가 없는지.
    • herdr-core/src/local_issues.rs - 깨진 파일을 빈 파일로 덮지 않는지, 상한 넘김이 거절로 보고되는지.
    • herdr-core/src/worktree_control.rs - agent.start 뒤 agent.prompt(15초 제한). Herdr 계약 밖 호출이 없는지.
    • herdr-core/src/github.rs - 허용 목록 확장.
    • herdr-core/src/model.rs, web/src/snapshot.ts - wire: issue_work, ui_state.project_issue_sources, ui_state.issue_settings, TaskSource.chosen, Task.updated_at_unix_ms 추가, unconnected_reason 제거.
    • web/src/recent.ts, web/src/keyboard.ts - ⌃Tab 항목이 surface 또는 screen이 되도록 바꾼 모델.
    • web/src/WorkspaceDialogs.tsx - 만든 워크트리의 패널을 focus만 하던 것을 openAgent로 열게 바꿔서, Overview에서 시작해도 그 Workspace로 넘어가요. New worktree 대화상자도 같은 길을 타요.
  • 질문:
    • Local 이슈 번호를 L-3처럼 보여주고 브랜치도 L-3-slug로 짓는데, 이 접두어 괜찮아요?
    • 새 이슈 단축키 C(입력창 · 터미널 · 대화상자 밖에서만)와 포커스된 백로그 카드의 S가 다른 단축키와 부딪히는 자리가 있을까요?

Evidence

  • 확인한 것:
    • origin/main을 합친 뒤 cargo 워크스페이스 1,350개 통과(herdr-core 889 포함), verify-cargo.sh lint(clippy · fmt) 통과. 전체 실행에서 hide-agent-hooks의 deadline 테스트 하나가 부하로 실패했고 단독 재실행은 통과(이 PR이 건드리지 않은 crate).
    • web typecheck · lint 통과, vitest 437개 통과(보드 규칙 23, 시작 이름 · 첫 지시 3, Settings › Issues, ⌃Tab 포함).
    • web e2e(격리된 Herdr + hided, 가짜 gh): overview.spec.ts가 새 이슈(C) · Local 이슈 생성과 닫기 · 이슈 연결 · 시작(Run only the bundled Herdr and derive the API contract from the pinned binary #3 → 3-graph-view 워크트리가 진행 중 카드로) · List · Agents 인박스 · Settings › Issues · 재시작 후 유지를 따라가요. 통과.
    • 다른 web e2e 19개 spec(s2 · s3 · s4 · s6 · s7 · s8 · recent · theme · shell · close-policy · new-tab · digit-hints · pane-scroll-find · workspace-cli · agent-tab-names · delegated-checkout · sidebar-status · projects-sidebar · checkout-pr) 통과. 옛 Overview 선택자를 쓰던 s2 · s6 · s8은 이 PR에서 고쳤고, 그중 main을 합친 뒤 다시 돌린 것은 overview · s2 · s6 · s8 · recent · projects-sidebar · checkout-pr예요.
    • node scripts/check-design-contract.mjs 통과. scripts/hide-screens, pen-transplant 노드 테스트 41개 통과.
  • 확인하지 못한 것:
    • 실제 gh issue create, 실제 Claude/Codex에 agent.prompt가 들어가는 것, AI 워크트리 이름(e2e는 가짜 gh와 터미널 에이전트, AI 없음).
    • 데스크톱 앱과 설치된 hide.app에서의 확인. 모든 캡처는 headless Chromium.
    • CI(요청대로 기다리지 않았어요).
  • 생성물: design/hide-screens.pen은 scripts/pen-screens.mjs를 고치고 gen-screens로 다시 쓴 것이라 diff가 커요(Main · Project Overview · Project Sessions · Settings · Dialogs and Sheets 시트만 바뀜, 라이브러리는 그대로). 결과 이미지는 추가 증거 마지막 장.
추가 증거

시작 대화상자: 이름은 이슈 번호 + 제목 영단어로 열리고 AI가 답하면 바뀌어요, 첫 지시는 이슈 본문에서 채워요.

Start dialog

새 이슈(C): 어디에 = 이 Mac의 프로젝트와 그 출처, 만들고 바로 시작.

New issue dialog

이슈 연결: 열린 이슈 검색, 이미 작업 중인 이슈는 작업 중으로 표시.

Link issue popover

List 모드: 진행 중 → 백로그 → 완료(접힘), 질문 중인 행은 펼쳐진 채 시작.

List mode

Agents 인박스: 내 차례 / 실행 중 / 쉬는 중 / 정리할 것(접힘).

Agents inbox

All projects의 Tasks: 카드마다 프로젝트 이름, 완료는 프로젝트별 수로 접혀요.

All projects tasks

Settings › Issues (헤더의 호스트 이름은 잘라냈어요).

Settings Issues

폴더 프로젝트의 Local 이슈 L-1.

Local issue

Pen Screen / Project Overview (design/hide-screens.pen): 보드 · Dependencies · Agents 인박스.

Pen Project Overview sheet

AI tooling: 대부분 AI 도구. 사람이 손으로 대조한 것은 아직 없어요.

…nd started from Hide

The core now projects a project's tasks from the source it reads: GitHub
through gh, or Local issues kept in hided's state directory. Without a
choice a repository gh cannot see on GitHub reads Local, so no project is
left without a source. Settings choose a source per project and how work
starts from an issue.

New events create an issue (gh issue create or the Local store), read an
issue's body, ask the background AI for a worktree name, and close or
reopen a Local issue. create_worktree links the new worktree to its task
and hands the started agent its first prompt through agent.prompt.
…h new issue, start and link dialogs and Settings > Issues
Brings in Agent tab groups (#217), the sidebar shell (#219), the
sidebar row menus (#220) and the project row fold (#221) alongside the
issue-first Overview.

- The every-project screen keeps main's title, Overview (sidebar-shell
  D-02), on the issue-first board; its docs and Screen / Main follow.
- actions.ts keeps main's row-menu and project-fold actions and the
  issue-linked createWorktree; WorkspaceDialogs keeps the issue dialogs
  and main's Remove project `listed` flag; keyboard.ts keeps the renamed
  recent entries and main's agentListOrder.
- design/hide-screens.pen is rewritten from the merged
  scripts/pen-screens.mjs with scripts/gen-screens.mjs rather than
  merged by hand.
…w does

Main titled the every-project screen Overview and gave its sidebar row
the house glyph and the project count (sidebar-shell D-02), so its
Recent Panels row now reads Overview over the project count with the
house mark instead of All projects over Overview with the grid mark.
Main's primary-close contract spec opens a project whose one linked
worktree has no agent, so the issue-first board shows only its fold
line at the foot of 진행 중 and neither a card nor the empty state.
The e2e helper now settles on that fold line too and goes in through
the sidebar.
Brings in browser page zoom (#225), which touches only the desktop host
and its docs.
@yansfil

yansfil commented Sep 28, 2026

Copy link
Copy Markdown
Contributor Author

#238로 합쳤습니다. 이 PR의 head(12bd34d)가 #238에 그대로 들어 있어서, 리뷰와 머지는 #238에서 합니다.

@yansfil yansfil closed this Sep 28, 2026
yansfil added a commit that referenced this pull request Sep 28, 2026
…a panel, and a PRs tab (#238)

Related: #218 (이 PR에 포함, 머지되면 #218도 머지로 표시됨),
`agents/prd/overview-lenses-tiles-agents/prd.md`,
`agents/prd/overview-lenses-issues/prd.md`,
`agents/prd/overview-lenses-prs/prd.md`

## Summary

Overview를 네 객체(이슈 · 체크아웃 · 에이전트 · PR)를 보는 렌즈로 다시 짰습니다.
#218(이슈 중심 Tasks 보드, Local/GitHub 이슈 출처, 이슈에서 시작) 위에 승인된 PRD 세 개를 순서대로
얹은 통합 브랜치입니다.
- 탭 줄 자리에 타일 Agents · Issues · PRs · Sessions, 첫 화면은 Agents › 체크아웃
레인(main 맨 위, 내 차례 레인 다음), 두 번째 모드는 계보, Inbox 제거
- Issues는 이슈만 카드 머리로 두고, 카드를 누르면 오른쪽 이슈 패널(본문 · 라벨 · 작성자 · 댓글을 열 때 한 번
읽음), 필터, 이슈 없는 작업은 접힌 줄 하나
- PRs 탭은 차례별 묶음(내 차례 · 에이전트가 고치는 중 · CI 실패 · 최근 머지), 맡기기(실패한 체크와 변경 요청을
첫 지시로 에이전트 시작), 이슈 잇기(GitHub 이슈면 확인 한 번 뒤 PR 본문에 `Closes #N`)
- 에이전트 시작을 새 pane의 셸이 터미널을 잡은 뒤로 미뤄, 이슈 시작 · 맡기기가 가끔 에이전트 없이 끝나던 경합을
고쳤습니다
- 사이드바 "↰ …에서" 화살표와 장치 칩 아이콘이 정의되지 않은 크기 토큰 때문에 24px로 그려지던 것을 12px로
고쳤습니다

![첫 화면 Agents › 체크아웃: 타일 머리, main 맨 위, 질문 중인 에이전트(노란 테두리) 레인이 다음,
위임선](https://github.com/yansfil/pr-assets/blob/main/hide/overview-lenses/ede8801/overview-agents-checkouts-light.png?raw=true)
첫 화면: 탭 줄 자리의 타일, main이 맨 위이고 내 차례(노란 테두리) 레인이 그다음, 부모에서 자식으로 내려가는 위임선.

## Review

- **판단해 주세요**: 첫 화면을 Agents › 체크아웃 레인으로 바꾸고 Inbox를 없앤 결과가 "내 차례"를 충분히
드러내는지(노란 노드 · 레인 순서 · 타일 배지)
- **판단해 주세요**: 모든 프로젝트 Overview에서 각 프로젝트의 main 레인을 무조건 위에 고정하지 않고 에이전트
상태로 정렬합니다(같으면 main 먼저)
- **판단해 주세요**: 새 타일 · 레인 · 이슈 패널 · PR 줄은 라이브러리 `Component /` 시트 없이
`Screen / Project Overview`에 로컬 토큰으로 그렸습니다
- **판단해 주세요**: '정리'는 main의 Delete worktree 대화상자를 그대로 열어 영어 문구입니다
- **조심해서 볼 파일**: `herdr-core/src/worktree_control.rs` - failure path,
Herdr contract: 에이전트 시작 전 pane 셸 준비를 기다리는 규칙
- **조심해서 볼 파일**: `herdr-core/src/runtime/pull_requests.rs`,
`herdr-core/src/github.rs` - runtime mutex, 바깥 쓰기: gh 이슈 생성과 PR 본문 쓰기는
worker에서, 다시 써도 한 번
- **조심해서 볼 파일**: `herdr-core/src/sidebar.rs`, `web/src/snapshot.ts` -
snapshot wire: 에이전트 마지막 말 `message`, `issue_work`, `pr_work`, 프로젝트별 PR
목록
- **조심해서 볼 파일**: `web/src/overviewLens.ts` - 타일 · 레인 · 계보를 매 snapshot에서
계산하는 순수 함수(메모이즈)

## Evidence

- **확인한 것**: 최종 트리에서 `verify-cargo.sh lint`, `verify-web.sh`(vitest 484
+ 44), `check-design-contract.mjs` 통과
- **확인한 것**: 슬라이스마다 격리된 Herdr와 hided로 web e2e 전체(83개 안팎)와 cargo test
전체(1386개 안팎) 통과, 실패는 고친 뒤 재실행
- **확인한 것**: 시작 경합은 e2e가 Herdr agent list로 새 pane에 claude가 실제로 떴는지 확인.
수정 전 PR 맡기기 spec 2/2 실패, 수정 후 4/4 통과
- **확인한 것**: hided는 자기 PATH에 없는 에이전트는 시작을 거부하므로, e2e fixture가 기본으로
claude shim을 hided PATH 맨 앞에 두고 자기 PATH를 넘기는 spec은 shim을 직접 넣습니다.
claude가 없는 CI 러너에서 이슈 시작 · 맡기기 e2e 2개가 실패하던 것을 로컬에서 claude를 PATH에서 뺀 채
재현했고, 같은 조건에서 main을 머지한 최종 트리의 web e2e 전체 88개 통과(weekly-usage가 자기 가짜
claude를 쓰는 걸 가리던 첫 수정의 회귀도 여기서 잡아 고침)
- **확인한 것**: 전체 e2e에서 PR 맡기기 대화상자가 '시작하는 중'에 60초 멈춘 것을 한 번 잡았습니다. 새
워크트리가 에이전트 시작 전에 체크아웃 목록에 들어오면 대화상자가 기다릴 작업 종류를 바꿔버리던 경합이라, 시작을 누른 순간의
선택을 고정하도록 고쳤습니다(`web/src/PrDialogs.tsx`)
- **확인한 것**: 이슈 잇기 · 새 이슈 만들기의 GitHub 쓰기는 모든 쓰기를 기록하는 가짜 gh로 e2e 검증
- **확인한 것**: 사이드바 화살표 폭을 e2e로 측정(수정 전 24px, 수정 후 12px), 선언되지 않은 CSS 변수를
잡는 unit 테스트 추가
- **확인하지 못한 것**: 실제 GitHub 저장소로의 이슈 생성과 PR 본문 쓰기, Electron desktop
e2e(로컬에서 안 돌림, CI가 돎), 설치된 앱
- **확인하지 못한 것**: 워크트리 20개 규모와 좁은 창 폭, 일부 hover · ⚠ 상태와 Local 이슈 잇기는 unit
테스트만
- **게이트 변경**: `scripts/check-no-workstation-identity.sh`가 `git grep
--text`로 읽습니다. `-diff`로 접은 `hide-screens.pen`을 git grep이 "Binary file
matches"로만 알려, 허용된 `/Users/example`(main의 Mobile 화면)을 걸러내지 못하고 실패했기
때문입니다
- **게이트 변경**: desktop e2e는 `@needs-focus` 테스트를 나머지 뒤에
돌립니다(`desktop/playwright.config.ts` project 분리). main의 포커스 가드(#246) 뒤로
CI 러너에서는 첫 focus 테스트가 앱을 앞으로 가져왔다 끝낸 뒤 다른 앱이 없어 macOS가 다음에 뜨는 앱마다 활성화했고,
그 뒤 background 테스트 11개가 모두 실패했습니다(#240도 같은 11개). 로컬에서는 운영자 화면을 건드리지 않으려고
desktop e2e를 돌리지 않았고 `--list`로 순서만 확인, CI가 검증합니다
- **생성물**: `design/hide-screens.pen`은 `scripts/pen-screens.mjs`가 만든 파일이라
`.gitattributes`로 diff를 접었습니다(`git diff --text`로 볼 수 있음)

<details><summary>추가 증거</summary>

![Issues 이슈만 보드와 오른쪽 이슈
패널](https://github.com/yansfil/pr-assets/blob/main/hide/overview-lenses/ede8801/overview-issues-panel-light.png?raw=true)
Issues: 카드 머리는 항상 이슈, 이슈 없는 워크트리 · PR은 접힌 줄, 카드를 누르면 오른쪽 패널(라벨 · 작성자 · 이
이슈로 한 일 · 본문 · 댓글).

![PRs 탭 차례별
묶음](https://github.com/yansfil/pr-assets/blob/main/hide/overview-lenses/ede8801/prs-tab-light.png?raw=true)
PRs: 내 차례 · 에이전트가 고치는 중 · CI 실패 · 맡은 에이전트 없음 · 최근 머지(접힘), 이슈 칸은 제목 바로 뒤.

![PR
맡기기](https://github.com/yansfil/pr-assets/blob/main/hide/overview-lenses/ede8801/prs-delegate-light.png?raw=true)
맡기기: 실패한 체크와 변경 요청을 첫 지시로 PR 브랜치에서 에이전트 시작.

![이슈 잇기
확인](https://github.com/yansfil/pr-assets/blob/main/hide/overview-lenses/ede8801/prs-link-confirm-light.png?raw=true)
이슈 잇기: GitHub PR 본문에 Closes #N을 쓰기 전 확인 한 번.

![계보
모드](https://github.com/yansfil/pr-assets/blob/main/hide/overview-lenses/ede8801/overview-agents-lineage-light.png?raw=true)
계보: Observer에서 Implementor, 하위 에이전트로 왼쪽에서 오른쪽.

![다크 테마 체크아웃
레인](https://github.com/yansfil/pr-assets/blob/main/hide/overview-lenses/ede8801/overview-agents-checkouts-dark.png?raw=true)
다크 테마.

![사이드바 화살표
12px](https://github.com/yansfil/pr-assets/blob/main/hide/overview-lenses/ede8801/raised-from-arrow-12px.png?raw=true)
사이드바 "↰ …에서" 화살표가 글자 크기(12px)로.

</details>

**AI tooling**: 대부분 AI 도구. 사람은 Pen 보드에서 결정과 PRD를 정하고 승인했으며, 코드 diff를 손으로
대조한 것은 아직 없습니다.
@yansfil
yansfil deleted the feat/overview-issue-first branch October 19, 2026 06:51
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