Repository navigation
Read a declared parent_pane token as the lineage source - #97
Merged
Merged
Conversation
sasu starts its implementor with agent.start, the only start that can carry the role marker, so Herdr records no lineage for it and the row was a root in another checkout with no child under the Observer. The dispatch now declares the Observer's pane as the pane token parent_pane, and wire.rs resolves the parent once: Herdr's own spawned_from_pane_id when the fork carries it, else that token. Everything downstream (tree, ownership, breadcrumb, stall clock, relocation) reads the one field. The token is also the lineage source that outlives the fork, since the stable release records none. docs/status-model.md owns the contract.
1 task
yansfil
added a commit
that referenced
this pull request
Sep 18, 2026
## Summary hide는 지금까지 `modakbul-gongbang/herdr` 포크 프리뷰(protocol 23)를 번들했고, 포크에만 있는 API 면(이벤트 시퀀스와 `after_sequence` 재개, 스냅샷의 `host`/`event_sequence`/`lineage`, `AgentInfo`의 `spawned_from_pane_id`/`agent_instance_id`/`ambient`, `agent.new`)에 코어와 플러그인이 기대어 있었다. 이 PR은 핀을 업스트림 `herdrdev/herdr v0.9.1`(protocol 22)로 옮기고, 그 면에 의존하던 코드를 업스트림 계약만으로 동작하게 바꾼다. - **구독과 스냅샷 순서를 뒤집었다.** 업스트림 스트림에는 시퀀스가 없어 재개할 위치가 없다. `events.subscribe`를 먼저 열고 `session.snapshot`을 읽어, 둘 사이의 이벤트를 잃지 않는다. 그 대가로 스냅샷 직전에 발생한 이벤트가 한 번 더 도착하는데, 스냅샷 도착 후 1초 동안은 `ApplyMode::Reconcile`로 스냅샷이 이미 담은 이벤트를 진단과 함께 버리고, 그 뒤엔 strict로 돌아가 실제 발산은 재부트스트랩한다. 재연결은 항상 구독 + 스냅샷이다(커서, 지문, `event_gap` 처리 삭제). - **부모 관계는 `parent_pane` 토큰 하나로.** #97이 넣은 토큰 폴백이 유일한 출처가 됐다. hide의 fork 명령은 `agent new --from-pane` CLI 대신 소켓으로 `pane.split` → `agent.start` → `pane.report_metadata`(source `hide`, token `parent_pane`)를 호출하고, `agent.start`가 실패하면 만든 pane을 닫는다. sasu의 dispatch는 같은 토큰을 이미 쓴다. - **ambient 카운트 삭제.** 포크의 `AgentInfo.ambient`(subagents/background running/failed)를 읽던 Rust와 Swift 체인을 지웠다. pet 배지의 subagent 수는 hook이 pane 토큰으로 보고하는 `working` 합계로 대체했고, background 배지 둘과 AgentRow의 `N sub / N bg / N failed` 라벨은 사라진다. - **remote 스냅샷 envelope**은 호출자가 도달한 host를 스탬프하고, agent id는 pane id로 식별한다. 시퀀스 회귀 검사는 삭제. - **agent-context-labels 플러그인**은 커서/리플레이 없이 항상 fresh pane list로 시작하고, 이벤트는 kind만 읽는다. - `wire.rs`에 "Herdr가 이벤트에 `sequence`를 선언하거나 `after_sequence`를 받기 시작하면 실패하는" 테스트를 남겨, 재개 커서를 다시 지을 날을 표시한다. ## Related - #97 (`parent_pane` 토큰 폴백; 이 브랜치는 그 위에 쌓였다) - sasu `cd24b90` (dispatch가 `parent_pane`을 쓴다), sasu `ADAPTER_TARGET`은 이미 0.9.1/22 ## Breaking change - **번들 Herdr가 포크 → 업스트림 v0.9.1(protocol 22)로 바뀐다.** 지금 포크 서버(protocol 23)를 띄워 둔 운영자는 새 hide가 그 서버에 붙지 못하고 protocol mismatch를 본다. 작업이 안전해진 시점에 Herdr 서버를 멈추고 hide를 다시 열면 번들된 업스트림이 뜬다. - pet 배지 `background_running`/`background_failed`와 AgentRow의 ambient 라벨이 사라진다. `subagents_active`는 남되 출처가 hook 토큰으로 바뀐다(hook 미설치 세션은 0이 아니라 기여 없음). - hide의 fork는 이제 Herdr lineage 레코드 없이 토큰만 남긴다. 다른 클라이언트가 `spawned_from_pane_id`를 읽어 부모를 알던 방법은 없어진다. ## Review focus - **사람이 판단할 것**: reconcile 창 1초(`RECONCILE_GRACE`)라는 상수. 리더 스레드가 늦게 스케줄될 때를 덮으려는 값이고, 창 안에서 스냅샷과 어긋난 이벤트는 버려진다. 더 짧거나 길어야 할 근거가 있으면 알려 달라. - **위험한 파일**: `herdr-core/src/session_sync/{subscription,coordinator,replica}.rs`(연결 순서와 reconcile), `herdr-core/src/live.rs::run_agent_fork`(세 호출의 실패 경로), `herdr-core/src/wire.rs`(검증에서 빠진 필드). - **리뷰어에게 묻는 것**: fork에서 `agent.start`가 실패했을 때 만든 pane을 닫는 선택이 맞는가. 이전 `agent new`는 원자적이었다. ## Risk surface - **Snapshot wire**: cursored stream이 아니라 무순서 stream + 부트스트랩 스냅샷. 채널이 그것뿐이다. - **Ownership**: 변화 없음. 부모 선언은 display-only 토큰이고 pane 존재는 여전히 Herdr 소유. - **Herdr contract**: 스키마에 없는 메서드는 부르지 않는다. `check-herdr-contract.sh --schema-only`가 v0.9.1 바이너리와 바이트 단위로 일치한다. - **Failure path**: reconcile 창에서 버려진 이벤트는 `session_sync/event.reconciled` 진단으로 남는다. fork 실패는 이전과 같이 부모 pane의 notice와 stderr 진단으로 간다. - **High-frequency path**: 이벤트당 `Instant` 하나가 메시지에 실린다. 지문(JSON 재직렬화)이 사라져 이벤트당 일은 줄었다. ## Evidence - **확인한 것**: `verify-cargo.sh lint`와 `test`(herdr-core 557, hide-herdr-client, 플러그인, hook 크레이트 전부 통과), `verify-swift.sh test`, `check-herdr-contract.sh --schema-only`(v0.9.1, protocol 22), `check-herdr-pin-single-source.sh`, `check-design-contract.mjs`, `check-core-bridge-structure.py`, `check-capability-readers-off-lock.sh`, `check-no-workstation-identity.sh`, `scripts/tests` 38개. fake Herdr 소켓 테스트로 구독→스냅샷 순서, 스트림 오류 후 fresh 스냅샷 재부트스트랩, reconcile 창에서 이미 있는 pane의 `pane_created`가 버려지고 strict에서 거부되는 것을 확인했다. - **확인하지 못한 것과 그 이유**: 업스트림 v0.9.1 서버에 실제로 붙인 라이브 세션. 이 워크스테이션의 운영자 Herdr는 아직 포크(protocol 23)이고, QA를 위해 그 서버를 재시작하지 않았다. fork 명령의 세 호출과 sasu dispatch 후 사이드바에 자식 행이 뜨는 것도 라이브에서는 미확인이다. 격리 서버로 확인한 뒤 결과를 여기에 덧붙이겠다. - **화면 증거**: 없음. 지워진 것(배지 둘, 라벨)만 있고 새로 그린 것은 없다. ## AI tooling - [ ] 사람이 직접 작성 - [ ] 일부를 AI 도구로 작성 - [x] 대부분을 AI 도구로 작성 **손으로 확인한 것**: 업스트림 v0.9.1 `api schema --json`에서 `EventsSubscribeParams`, `EventEnvelope`, `SessionSnapshot`, `AgentInfo`, `PaneInfo`, `PaneReportMetadataParams`, `PaneSplitParams`의 필드 목록을 직접 대조했고, `terminal_id`가 `surface.attach`가 아니라 pane 최상위 필수 필드라는 것을 fixture 실패로 확인해 고쳤다.
1 task
yansfil
added a commit
that referenced
this pull request
Sep 18, 2026
…#99) ## Summary 에이전트 행이 무엇을 하는지(`summary`)가 아니라 누구인지(세션 이름)로 불리고, 둘째 줄은 상태가 고른 한 문장만 보인다. 사이드바 행, pane 헤더, ⌘K 검색 행, ⌃Tab Recent Panels 행, lineage chip, Overview 에이전트 줄이 전부 코어의 `identity_label` 하나를 쓴다. - 코어(`sidebar.rs`): ladder `name 토큰 → Herdr 에이전트 이름 → task → 워크스페이스 라벨`. `summary` 읽기와 `MISSING_SUMMARY`("Check agent-context-labels settings") 삭제. 둘째 줄은 그룹으로 정해(Needs You·안 본 Done = 상태 단어 + `expected_reply`(없으면 `progress`), Working = `progress`만, Seen = 없음) `detail`/`status_word_visible`로 내려보낸다. 에이전트 pane이 하나인 탭은 `StripTabSnapshot.agent_identity`를 얻는다. - 셸: `AgentRow`가 둘째 줄을 그리고(caption medium 상태색 단어 + caption regular 문장, tail truncation, 툴팁), `PaneHeaderTitle`은 `이름 · [단어] 문장` 한 줄을 `ViewThatFits`로 문장→단어 순서로 떨군다. `HideSearchView`는 정체성 제목 + 문장 부제(pane id는 매치·접근성에만), `RecentNavigation`은 한 에이전트 탭을 정체성 + 상태 마크로 그린다. - 플러그인(`agent-context-labels`): 세션 이름을 Claude Code의 `ai-title`(없으면 첫 Human 턴, `session_title_missing` 한 번 로그) 또는 Codex의 첫 Human 턴에서 한 번 정해 `agent.rename`(Herdr 규칙 `[a-z][a-z0-9_-]{0,31}`을 통과할 때) 또는 `name` 토큰으로 쓰고, 에이전트 하나뿐인 탭의 Herdr 생성형 라벨을 `tab.rename`한다. 두 번째 `pane.report_metadata`로 `name`/`progress`/`expected_reply`(40자 명령형)를 발행하고 재시작 시 상태 파일에서 다시 붙인다. 이름은 Herdr가 기록한 `agent_session`이 있는 pane에만 쓴다. - `hide-session`: `ai-title` 레코드를 `ParsedSession.title`로 파싱. - 문서·캔버스: `docs/status-model.md` 상태별 둘째 줄 표, DESIGN.md 행·헤더·검색·Recent 규칙, 플러그인 README "Session names", `design/hide.pen`의 Projects·Agent row states·Header states·Conversation·Search/Recent 보드. 아래 "Changed Paths"는 PRD base(b9d5d74) 기준 목록이라 사이에 머지된 main(#96, #97, #98)의 파일이 섞여 있다. 이 PR이 main에 더하는 diff는 45개 파일이다. ## Result - Claude Code pane은 첫 요청 뒤 세션이 스스로 지은 이름("README.md 생성")으로, Codex pane은 첫 요청 앞 30자로 불리고, 턴이 이어져도 제목이 움직이지 않는다. 탭 라벨도 같은 이름이 된다. - 답을 기다리는 행은 `Approval`/`Question` 단어와 사용자가 할 일 한 문장, 일하는 행은 회색 진행 문장만, 본 뒤 쉬는 행은 제목 한 줄이다. 문장이 없는 행은 예전처럼 상태 단어만 남고 둘째 줄이 통째로 비는 행은 없다. - pane 헤더는 `! ❋ 결제 멱등키 PR … · Approval A/B 중 하나를 선택하고 …` 한 줄이고, 좁아지면 문장, 그다음 단어가 빠진다. - 옛 플러그인(`summary` 발행)과 새 코어를 섞으면 제목은 Herdr 이름 또는 워크스페이스 라벨, 둘째 줄은 상태 단어만이다. 경고는 없다(B13). - 포함하지 않은 것: 라벨 생성 빈도·provider 선택·프롬프트의 task 판정은 그대로다. 프롬프트에서 바뀐 것은 `expected_reply`의 길이·어미뿐이다. 설치된 `/Applications/hide.app`과 운영자의 watcher는 이 PR이 바꾸지 않는다(업그레이드는 운용 후속). ## Screenshots / Demo 화면 증거 6장은 로컬 run 디렉터리(`agents/runs/agent-row-identity/evidence/live/`, 저장소 규칙상 커밋하지 않음)에 있고, 무엇이 보였는지는 아래 Evidence 섹션에 적었다. GitHub user-attachments 업로드는 브라우저 UI가 필요해 이 PR 본문에는 인라인 이미지가 없다. 이미지가 필요하면 그 디렉터리의 01~06을 이 섹션에 끌어다 놓으면 된다. ## Human Review Focus 증거가 이미 증명한 것: 코어 ladder·둘째 줄·헤더 문자열·검색·Recent(단위 테스트 + 라이브 스크린샷), 플러그인 이름 도출·소유권·두 번째 보고·재시작 재발행(단위 테스트 + 격리 서버에서 실제 Claude Code/Codex 세션으로 이름·탭 확인), 세 게이트 PASS. 사람이 판단할 것: - **문장 색 선택**: 강조 행 문장 `primary`, working 행 `secondary`. 실제 사이드바에서 두 회색이 구분되는지(D-07은 세 번째 회색을 버렸다). - **raised(prominent) 행의 둘째 줄 밀도**: 단어 + 40자 문장 + 프로젝트 qualifier(`hari-x`)가 한 줄에 놓여 문장이 먼저 잘린다(스크린샷 01). qualifier를 유지할지, 문장에 자리를 더 줄지. - **Codex 이름 규칙**: 첫 Human 턴 30자는 "이 폴더에 NOTES.md를 만들고 "codex…"처럼 요청문 그대로다. PRD D-02가 정한 규칙이지만 제목으로 읽히는지는 사용자가 볼 일이다. - **`agent_session` 없는 pane은 이름을 쓰지 않음**(PRD 밖의 추가 규칙): 같은 cwd의 이웃 세션 이름을 빌려 탭에 쓰는 것을 라이브에서 봤고, 그 pane은 자기 세션이 기록될 때까지 워크스페이스 라벨/`task`로 보인다. - **위험한 파일**: `plugins/agent-context-labels/src/lib.rs`의 `sync_names`(Herdr에 쓰는 유일한 경로: `agent.rename`, `tab.rename`)와 `report_if_changed`(보고 수만큼 revision을 미리 더해 자기 이벤트를 걸러내는 가정), `herdr-core/src/runtime.rs::sync_strip_agent_identity`(세 패스에서 호출). - **리뷰어에게 묻는 것**: 새 토큰 `Layout.paneHeaderSentenceMinWidth`(120pt)를 받을지. D-07의 "새 토큰 없음"은 행 타이포에 대한 말이었고, 헤더가 문장을 먼저 자르고(D-08) 그다음 떨구려면 최소 폭이 필요했다. ## Related - PRD: `agents/prd/agent-row-identity/prd.md` (run 중 한 번 amend: D-03 name-token fallback, D-15/D-16, B17/B18) - 선행 PR: #93(hook 보고 소켓 경로), #96(Scratch 제거, 이 PR의 ladder에서 chat title rung 제거), #98(upstream Herdr v0.9.1 pin) ## Risk surface - **Runtime mutex**: 새로 든 일은 `sync_strip_agent_identity`(strip 항목 × 탭 × 에이전트 walk)와 `token_text` 문자열 cut뿐. 서브프로세스·블로킹 I/O 없음. - **Snapshot wire**: `SidebarAgentSnapshot`에 `detail`, `status_word_visible`, `task` 추가, `summary` 제거; `PaneSnapshot.summary → identity_label`; `AgentChipSnapshot.detail: Option` + `status_word_visible`; `StripTabSnapshot.agent_identity`. 셸 디코더는 빠진 키를 기본값으로 읽는다(`status_word_visible` 없으면 `true`). - **Ownership**: 에이전트 이름·탭 라벨은 Herdr 소유. 플러그인이 위 소유권 규칙 안에서만 쓰고, 코어는 Recent Panels 표기를 위해 Herdr 라벨을 바꾸지 않고 파생만 한다. - **Herdr contract**: `agent.rename`, `tab.rename`, `tab.get`, `pane.report_metadata`, `agent.list`의 `name`/`tab_id`. 전부 `contracts/herdr-api.schema.json`(v0.9.1)에 있다. 에이전트 이름 패턴은 스키마에 없어 로컬 검사 + 서버 응답 두 겹으로 처리. - **Failure path**: 이름이 안 붙으면 행은 Herdr 이름/워크스페이스 라벨로 보이고 `agent_rename_failed`/`tab_rename_failed`/`session_title_missing`이 `events.jsonl`에 한 줄씩 남는다. - **High-frequency path**: 보고는 상태 토큰과 정체성 토큰을 따로 비교해 바뀐 쪽만 보내고, `reported_revisions`에 보고 수를 더해 자기 이벤트를 걸러낸다(`watcher_deduplicates_reports_and_its_own_revision_bump`). ## Evidence - **확인한 것**: `verify-cargo.sh test`(코어 542 + 플러그인 80 + hide-session·hide-agent-hooks 등 전 워크스페이스), `verify-swift.sh test` 470개, `verify-cargo.sh lint`(fmt + clippy -D warnings), `check-design-contract.mjs`(check-pen 포함) 모두 PASS at 2aee3c8. 라이브: 격리 Herdr 세션 `hari`에서 실제 Claude Code pane이 `ai-title` "README.md 생성"으로 `name` 토큰 + 탭 라벨을 얻고, 실제 Codex pane이 첫 턴 30자로 이름·탭 라벨을 얻는 것을 `herdr agent list`/`tab list`/`pane get`과 watcher `display-state.json`으로 확인. 스크린샷 6장: 사이드바 4상태(Approval 30자 이름·40자 문장 `…` 잘림, Done + progress, Done 단어만, working progress만), 헤더 한 줄, 3분할 좁은 헤더(문장·단어 탈락), ⌘K 시트와 pane id 매치, ⌃Tab Recent Panels. - **확인하지 못한 것과 그 이유**: 위 "Risks" 섹션의 (1)~(4). - **화면 증거**: 로컬 `agents/runs/agent-row-identity/evidence/live/01~06`. 저장소 규칙(evidence는 커밋 금지)으로 본문 인라인 없음. ## AI tooling - [ ] 사람이 직접 작성 - [ ] 일부를 AI 도구로 작성 - [x] 대부분을 AI 도구로 작성 **손으로 확인한 것**: 스크린샷 01~06을 눈으로 대조(행 제목·둘째 줄·헤더·검색·Recent), `herdr agent list`/`tab list` 출력, 격리 watcher의 `events.jsonl`과 `display-state.json`, pen 보드 export 5장. ## Product And Scope Result - PRD: agents/prd/agent-row-identity/prd.md - Implementation state: /Users/hoyeonlee/projects/herdr-ide.worktrees/agent-row-identity/agents/runs/agent-row-identity/state.json - Verification report: /Users/hoyeonlee/projects/herdr-ide.worktrees/agent-row-identity/agents/runs/agent-row-identity/verification-report.json (status: PASS) - Verification summary: /Users/hoyeonlee/projects/herdr-ide.worktrees/agent-row-identity/agents/runs/agent-row-identity/verification-report.md ## Actual Tests - S1: GREEN - `bash scripts/verify-cargo.sh test` (cwd: ., exit 0) - S2: GREEN - `bash scripts/verify-swift.sh test` (cwd: ., exit 0) - S3: GREEN - `bash scripts/verify-cargo.sh lint` (cwd: ., exit 0) ## Actual Observations - agents/runs/agent-row-identity/evidence/live/01-sidebar-initial.png (screenshot, observed 2026-09-18T04:28:12.602Z, sha256 73582931994feff481d5254afe957961e83fb8430cb9c6ab02d62c8fcf7f3ab0): screencapture -l <window id> of the hide (agent-row-identity) window, background exact-window capture - agents/runs/agent-row-identity/evidence/live/02-needs-you-pane-header.png (screenshot, observed 2026-09-18T04:28:12.917Z, sha256 698ff1475dd0d20c422960a2c7c6b0d0ba80b32e813abe29cdf0dbf20c5e4780): screencapture -l <window id> of the hide (agent-row-identity) window, background exact-window capture - agents/runs/agent-row-identity/evidence/live/03-narrow-header-crop.png (screenshot, observed 2026-09-18T04:28:13.234Z, sha256 899051a96f00e5d8f8ee195198abe1b636bb1eb7874fac8e55f885db6be0e084): screencapture -l <window id> of the hide (agent-row-identity) window, background exact-window capture, cropped to the header band with PIL - agents/runs/agent-row-identity/evidence/live/04-search-sheet.png (screenshot, observed 2026-09-18T04:28:13.523Z, sha256 76f3840c7df9978bd8b8746b8d90f80427f18304d66ad22853518b01e98ee97d): screencapture -l <window id> of the hide (agent-row-identity) window, background exact-window capture - agents/runs/agent-row-identity/evidence/live/05-search-by-pane-id-crop.png (screenshot, observed 2026-09-18T04:28:13.818Z, sha256 399c2ecc3dffb2b0dc62ad92988cc7e3bf6ff7b2a07a44774272e4e151670e54): screencapture -l <window id> of the hide (agent-row-identity) window, background exact-window capture, cropped to the sheet with PIL - agents/runs/agent-row-identity/evidence/live/06-recent-panels-crop.png (screenshot, observed 2026-09-18T04:28:14.121Z, sha256 7771256042ce06c6896803feac969bfb4871c5a2b2b0dd6fb2d51727e71bb564): screencapture -l <window id> of the hide (agent-row-identity) window, background exact-window capture while ctrl+tab was held via peekaboo press --hold, cropped with PIL - agents/runs/agent-row-identity/evidence/live/herdr-state.log (log, observed 2026-09-18T04:28:15.617Z, sha256 2c4fe7bb4b897853b5d86bb02f07bcbaf0d79bef746ca0f024ce28fb048278fb): herdr CLI under /tmp/hari-x/env.sh; cat of the isolated watcher state - agents/runs/agent-row-identity/evidence/gates/cargo-test.log (log, observed 2026-09-18T04:28:17.090Z, sha256 6b9953ab9c3d8797ee963e96382f13e174e3c604e0e585f08bcbc9dac45e84e5): bash scripts/verify-cargo.sh test - agents/runs/agent-row-identity/evidence/gates/cargo-lint.log (log, observed 2026-09-18T04:28:17.603Z, sha256 c695fa3ae25298a42b490b722118b836bb69f07ffb81b939f61084a140554dfd): bash scripts/verify-cargo.sh lint - agents/runs/agent-row-identity/evidence/gates/swift-test.log (log, observed 2026-09-18T04:28:18.076Z, sha256 a0c5fc2fa5d4dd91094e74a4cf298917b387e3f6efa00473afea5f3bf4c7e6db): bash scripts/verify-swift.sh test - agents/runs/agent-row-identity/evidence/design/qZcwf.png (image, observed 2026-09-18T04:28:18.436Z, sha256 fce451d7a31a96d3582ce0e65a922312d3fcecba1a2ff9149305ea087cb8ae35): pen interactive Export of node qZcwf - agents/runs/agent-row-identity/evidence/design/arb009.png (image, observed 2026-09-18T04:28:19.739Z, sha256 0806cbded3cd3db2b164eb2621b68667672d43b592bf142497625f7683301a14): pen interactive Export of node arb009 - agents/runs/agent-row-identity/evidence/design/dexoX.png (image, observed 2026-09-18T04:28:21.290Z, sha256 05e964485f2f875a6f782699c3ee4d90d5fb0d83c408740e7f7cc08bbe4797ad): pen interactive Export of node dexoX - agents/runs/agent-row-identity/evidence/design/acv-needs-you.png (image, observed 2026-09-18T04:28:21.838Z, sha256 c89cab23db8558d8841406bf9fbc89a9de6400e21db9f48eb31647c8e9177345): pen interactive Export of node acv-needs-you ## Deterministic Verification - Deterministic verification: PASS - PRD SHA: 5de3593a471b2959bc92ba7baa7c99dfc677485258ba77f4e2ac0c4784472645 - Base SHA: b9d5d74 - Head SHA: 2aee3c8 - Source fingerprint: 1cc177273dadea5bbc4da3f49acbd3c34c11fcdcd1dd509ca8be2481e20b9536 - Generated: 2026-09-18T05:02:47.302Z - Agent reviews are visible advisory notes produced by native runtime subagents. ## Agent Review: Fix Now - Code review: `hide-agent-hooks/src/report.rs` 테스트가 `/tmp`에 소켓 디렉터리를 남김. 9977880에서 소켓 파일과 디렉터리를 지우도록 고침(같은 커밋에서 `CoreAgentChip` 편의 init의 `statusWordVisible` 기본값을 디코더와 같은 `true`로 맞추고, `HideSearchView.agentSubtitle`의 겹친 doc comment 정리). - Fidelity review: Fix now 없음. B15를 PARTIAL로 판정한 근거("30/40자 잘림이 보이지 않음")는 계수 오류다: 스크린샷 01의 이름 토큰은 정확히 30자, `expected_reply`는 정확히 40자(`len()`으로 재고 발행)이며 둘 다 `…`로 잘려 보인다. ## Agent Review: Follow-up Improvements - `report_if_changed`가 보고 수(0~2)만큼 revision을 미리 더한다. Herdr가 내용이 바뀐 보고마다 revision을 정확히 1 올린다는 가정이며, 어긋나면 불필요한 full `process()`가 한 번 더 도는 정도(멱등)다. 고정 Herdr 계약으로 이 의미를 확인하는 것이 후속. - `sync_strip_agent_identity`가 상태·strip 재구성·lineage 세 패스에서 각각 돈다. pane·tab 수에 비례하는 작은 walk지만 한 사이클에 두 번 겹칠 수 있다. - 격리 watcher 재시작 직후 `herdr_subscription_lost`(cursor=0, event_gap)가 수십 번 반복되고 나서 resume됐다. 이 PR과 무관한 기존 재구독 동작이지만 로그 소음이 크다. - pen 캔버스 master `HXWFK`에 raised 행의 trailing qualifier 슬롯이 없어 Projects 보드 행은 qualifier를 생략했다. 검색 시트·Recent Panels의 `Screen /` 보드는 없어서 Component spec 보드만 갱신했다. - 라이브 확인은 당시 pin이던 fork preview(0.9.0-preview) 서버에서 했다. 머지된 main은 upstream v0.9.1을 pin하며, 플러그인이 쓰는 `agent.rename`/`tab.rename`/`tab.get`/`agent.list`의 `name`·`tab_id`는 v0.9.1 스키마에 있다. v0.9.1 서버에서 이름 거부(`invalid_agent_name`)와 토큰 null 클리어 동작을 한 번 더 보는 것이 후속. - 라이브에서 본 관찰: raised 행에서 문장이 qualifier에 밀려 일찍 잘린다(위 Review focus). - Code review 2차(9977880, d262130 머지): Fix now 없음. `MAX_SESSION_NAME_CHARS`(80)가 Claude Code `ai-title`에만 적용되고 첫 턴 기반 이름은 `normalize_task`의 30자 예산을 따른다는 점을 doc comment에 적음(2aee3c8). ## Delivery Staging - Mode: unknown - Branch: unknown - Base: main - Staging include: default allowlist - Staging exclude: default volatile paths ## Changed Paths Planned For This PR - AGENTS.md - DESIGN.md - README.md - contracts/README.md - contracts/herdr-api.schema.json - design/hide.pen - docs/ARCHITECTURE.md - docs/INSTALL.md - docs/README.md - docs/status-model.md - docs/verification-fixtures.md - herdr-core/src/fork.rs - herdr-core/src/lib.rs - herdr-core/src/live.rs - herdr-core/src/model.rs - herdr-core/src/persistence.rs - herdr-core/src/pet.rs - herdr-core/src/project_context.rs - herdr-core/src/remote.rs - herdr-core/src/runtime.rs - herdr-core/src/runtime/agents.rs - herdr-core/src/runtime/editor.rs - herdr-core/src/runtime/events.rs - herdr-core/src/runtime/session.rs - herdr-core/src/runtime/terminal.rs - herdr-core/src/runtime/tests.rs - herdr-core/src/runtime/tests/agents_settings_remote.rs - herdr-core/src/runtime/tests/lineage.rs - herdr-core/src/runtime/tests/projects.rs - herdr-core/src/runtime/tests/session_navigation.rs - herdr-core/src/scratch.rs - herdr-core/src/session_sync.rs - herdr-core/src/session_sync/coordinator.rs - herdr-core/src/session_sync/projection.rs - herdr-core/src/session_sync/replica.rs - herdr-core/src/session_sync/subscription.rs - herdr-core/src/session_sync/tests.rs - herdr-core/src/sidebar.rs - herdr-core/src/wire.rs - herdr-core/src/worktree_control.rs - herdr-core/tests/fixtures/agent-created.json - hide-agent-hooks/src/report.rs - hide-herdr-client/src/lib.rs - hide-session/src/lib.rs - macos/Resources/THIRD_PARTY_NOTICES/herdr-APACHE-2.0.txt - macos/Sources/HerdrMacOS/AgentBadge.swift - macos/Sources/HerdrMacOS/AgentRow.swift - macos/Sources/HerdrMacOS/ChatComposer.swift - macos/Sources/HerdrMacOS/ChatComposerSheet.swift - macos/Sources/HerdrMacOS/CheckoutOverview.swift - macos/Sources/HerdrMacOS/CoreBridge.swift - macos/Sources/HerdrMacOS/CoreBridgeDispatchPolicy.swift - macos/Sources/HerdrMacOS/CoreBridgeSnapshot.swift - macos/Sources/HerdrMacOS/CoreBridgeWorkspaceSnapshot.swift - macos/Sources/HerdrMacOS/HerdrApp.swift - macos/Sources/HerdrMacOS/HideHintState.swift - macos/Sources/HerdrMacOS/HideSearchView.swift - macos/Sources/HerdrMacOS/HideSettings.swift - macos/Sources/HerdrMacOS/HideSidebar.swift - macos/Sources/HerdrMacOS/HideTheme.swift - macos/Sources/HerdrMacOS/OverviewPresentation.swift - macos/Sources/HerdrMacOS/PaneLineageHeader.swift - macos/Sources/HerdrMacOS/PetDashboardProjection.swift - macos/Sources/HerdrMacOS/PetView.swift - macos/Sources/HerdrMacOS/PetWindow.swift - macos/Sources/HerdrMacOS/RecentNavigation.swift - macos/Sources/HerdrMacOS/Resources/herdr-bundle.json - macos/Sources/HerdrMacOS/RuntimeEnvironment.swift - macos/Sources/HerdrMacOS/ShellMenuCommand.swift - macos/Sources/HerdrMacOS/ShellModel.swift - macos/Sources/HerdrMacOS/ShellModelNavigation.swift - macos/Sources/HerdrMacOS/ShellRootView.swift - macos/Sources/HerdrMacOS/ShellView.swift - macos/Sources/HerdrMacOS/SidebarGrouping.swift - macos/Sources/HerdrMacOS/WorktreeTasks.swift - macos/Tests/HerdrMacOSTests/ChatComposerTests.swift - macos/Tests/HerdrMacOSTests/ChatLaunchFailureTests.swift - macos/Tests/HerdrMacOSTests/CoreDispatchRoutingPolicyTests.swift - macos/Tests/HerdrMacOSTests/FocusedTabPresentationTests.swift - macos/Tests/HerdrMacOSTests/GitWorktreesPresentationTests.swift - macos/Tests/HerdrMacOSTests/HideHintTests.swift - macos/Tests/HerdrMacOSTests/HideSearchPresentationTests.swift - macos/Tests/HerdrMacOSTests/LineageDecodeTests.swift - macos/Tests/HerdrMacOSTests/OperationalPolicyTests.swift - macos/Tests/HerdrMacOSTests/PaneHeaderControlsTests.swift - macos/Tests/HerdrMacOSTests/PaneLineagePresentationTests.swift - macos/Tests/HerdrMacOSTests/PaneShortcutSettingsTests.swift - macos/Tests/HerdrMacOSTests/PetDashboardProjectionTests.swift - macos/Tests/HerdrMacOSTests/RecentNavigationIntegrationTests.swift - macos/Tests/HerdrMacOSTests/SidebarGroupingTests.swift - macos/Tests/HerdrMacOSTests/SidebarPresentationTests.swift - macos/Tests/HerdrMacOSTests/WorktreeTaskTests.swift - plugins/agent-context-labels/AGENTS.md - plugins/agent-context-labels/README.md - plugins/agent-context-labels/scripts/verify-runtime.sh - plugins/agent-context-labels/src/context_label.rs - plugins/agent-context-labels/src/lib.rs - plugins/agent-context-labels/src/tests.rs - scripts/check-core-bridge-structure.py - scripts/check-hide-accessibility.mjs - scripts/check-hide-copy.mjs - scripts/design-control-policy.json - scripts/pen-token-map.json - scripts/probe-typed-live-remote.py - scripts/scratch-verification-fixture.sh ## Risks, Rollback, And Human Review - **Breaking change**: 코어가 `summary` 토큰을 더 읽지 않는다. 운영자의 watcher가 옛 플러그인이면 행 제목은 Herdr 이름/워크스페이스 라벨, 둘째 줄은 상태 단어만이다(B13, 경고 없음). 플러그인 clone을 갱신하고 watcher를 재시작하면 이름·문장이 붙는다. `display-state.json`의 새 필드는 `serde(default)`라 옛 상태 파일이 그대로 읽힌다. 프롬프트 스키마 버전은 `context_label.v3`. - **Herdr에 쓰는 새 경로**: 플러그인이 `agent.rename`과 `tab.rename`을 호출한다. 소유권 규칙(이름 없는 에이전트 또는 플러그인이 마지막에 쓴 이름, Herdr 생성형 라벨 또는 플러그인이 쓴 라벨, 에이전트 하나인 탭)을 벗어나면 쓰지 않고, 실패는 `agent_rename_failed`/`tab_rename_failed` 한 줄 로그 후 재시도 없음. - **Rollback**: 이 PR을 revert하면 코어는 `summary`를 다시 읽고 플러그인은 세 토큰을 발행하지 않는다. 이미 바뀐 Herdr 에이전트 이름과 탭 라벨은 Herdr 세션 상태에 남는다(`herdr agent rename`/`herdr tab rename`으로 되돌릴 수 있다). - **확인하지 못한 것**: (1) 설치된 `/Applications/hide.app`을 교체한 확인은 하지 않았다(운영자 앱·서버·watcher를 건드리지 않는 규칙). 워크트리 번들(`me.grab.hide.agent-row-identity`)을 격리 Herdr 서버와 격리 watcher(HOME 분리, 자동 요약 끔)에 붙여 확인했다. (2) 질문·working 행의 `progress`/`expected_reply`는 provider 분석을 끈 상태라 플러그인이 쓰는 토큰 이름으로 손으로 발행해 화면을 확인했고, 실제 provider 응답 → 40자 cut은 단위 테스트로만 확인했다. (3) upstream v0.9.1 서버에서의 라이브 재확인(위 후속). (4) 닫힌 pane의 `tab_agent_counts`·상태 정리는 기존 pane 수명 경로를 따르며 별도 라이브 확인은 없다.
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
sasu가 띄우는 Implementor는
agent.start로 시작해야 role marker(--env)를 실을 수 있고, 그 시작에는 Herdr lineage가 기록되지 않는다.그래서 Implementor row는 Observer 밑 자식이 아니라 다른 checkout의 루트로만 보였다.
이제 부모는 한 곳(
wire.rs::lineage_parent)에서 두 소스로 정한다.Herdr 자체 기록(
spawned_from_pane_id, 포크의agent.new --from-pane)이 있으면 그것, 없으면 pane을 만든 쪽이pane.report_metadata로 선언한 pane 토큰parent_pane(값은 부모 pane id).빈 토큰은 선언 해제로 읽고, 둘 다 있으면 Herdr 기록이 이긴다.
트리, ownership, breadcrumb, stall clock, 자식 pane 이동은 모두 기존
spawned_from_pane_id하나를 읽으므로 그 아래는 손대지 않았다.sasu 쪽은
yansfil/sasucd24b90에서agent start직후herdr pane report-metadata <child> --source sasu --token parent_pane=$HERDR_PANE_ID를 쓴다.이 토큰은 upstream herdr(v0.9.1)에도 있는 경로라, 포크를 버릴 때 살아남는 lineage 소스다.
Review focus
parent_pane과 "Herdr 기록 우선" 순서. 이 둘이 앞으로 멀티 에이전트 부모-자식 표시의 계약이 된다.herdr-core/src/wire.rs의From<res::AgentInfo>. 생성된 토큰 맵에서 키를 찾는 자리라, 스키마가 바뀌면 여기가 먼저 깨진다.Risk surface
agent.list응답과session.snapshot의agents[].tokens를 읽는다. 새 채널은 없다.contracts/herdr-api.schema.json에 있는tokens필드만 읽는다. 새 메서드나 필드는 없다.Evidence
verify-cargo.sh lint와test통과(worktree에서 전체 lane). 새 wire 테스트 1건: 토큰만 있을 때 부모가 되고, Herdr 기록과 함께 있으면 기록이 이기고, 빈 토큰은 부모가 없고, 아무것도 없으면 없음.check-herdr-contract.sh --schema-onlypass, 나머지 check 스크립트 전부 ok. 핀된 포크 서버에 내가 만든 pane으로report-metadata --token parent_pane=<pane>후pane get에서 같은 값이 돌아오는 것을 확인하고 pane을 닫음./implement에서 확인 필요.verify-swift.sh test는 로컬에서 돌리지 않았고 CI에 맡긴다(Swift 변경 없음).AI tooling
손으로 확인한 것: upstream herdr v0.9.1 바이너리를 받아 sasu가 보내는 모든 명령의 플래그와 소켓 스키마를 포크와 대조했고, 포크 전용 메서드는
agent.new하나뿐임을 확인했다.