Repository navigation
Stop three resident hided loops: Codex CLI roles, unrecorded link sessions, slow worktree reads - #1093
Merged
Conversation
Codex CLI rollouts record instructions with the role developer, which the conversation wire refused as conversation_role_invalid, so Memory failed every Codex CLI session over the node link and failed it again each time the rollout grew. The Codex CLI reader now names that message system, the role the wire already carries for provider-injected instructions; unknown roles are still refused.
A lineage edge or a file cursor can name a session the ledger holds no row for: a spawn known before its file is read, a Pi or omp child named by its file where its reader names it by its id, or a session retention removed. The links worker failed its context with ledger_session_missing on every read answer, every two seconds. Such a session now answers its parent's name and no work, and a record tree lists only the children the ledger records.
…line A 32-worktree repository took 48 to 51 s per read and was read whole on every commit in any of its worktrees, past the core's 60 s wait, with the timed-out call still running beside the next. The node now keeps each worktree's facts with what they were measured from (listed HEAD, branch and lock, index file, base, upstream and their commits) and a watch read measures only the worktrees whose inputs moved; a refresh or an Overview opening measures all of them, the longest unmeasured first. One repository read ends within 45 s and one worktree within 30 s, and a worktree left unmeasured is named in its answer.
Contributor
Author
|
리뷰 결과: 세 커밋 모두 원인 수정이고 회귀 테스트가 실패 경로를 잡습니다. CI 완료 후 premerge-check로 머지합니다. 확인한 것
비차단 메모 (후속)
|
yansfil
added a commit
that referenced
this pull request
Oct 15, 2026
## Summary 오늘 머지된 #1093, #1107, #1111이 쓸모없게 만든 코드를 걷어내고, 같은 일을 하던 두 군데를 한 곳으로 합쳤습니다. 화면과 동작은 그대로이고, 하나만 다릅니다: 원격 기기의 프로젝트가 GitHub 저장소를 갖지 않을 때, 이제 이 컴퓨터의 프로젝트와 똑같이 아무것도 그리지 않습니다. 전에는 기기 프로젝트의 체크아웃 카드에만 "origin이 GitHub 저장소를 가리키지 않는다"는 문장이 따로 떴습니다. ## Review - **판단해 주세요**: 기기 프로젝트의 "GitHub 없음"을 로컬과 같은 답(`available`, 사유 없음)으로 맞췄습니다. 웹이 `unavailable_reason`을 카드에 그리기 때문에 문장 하나가 사라지는 변화입니다. `failure_category`는 그대로라 로컬 이슈 기본값은 같습니다. - **조심해서 볼 파일**: `hide-project/src/lib.rs` - origin을 읽는 규칙 둘을 그대로 지켰습니다. `include`는 파일이 직접 적은 origin을 가리지 못하고(목록 전체만 "알 수 없음"), 이름 비교는 정확히 `origin`이라 `"Origin"`은 다른 remote입니다. - **조심해서 볼 파일**: `hide-host/src/worktrees.rs` - 자체 origin 파서와 읽기 상한 256 KiB가 사라지고 hide-project의 1 MiB 상한을 따릅니다. `ProjectWorktreesSnapshot.repository`가 이 값을 씁니다. - **조심해서 볼 파일**: `web/src/PaneHeaderBand.tsx` - 모듈 전역 캐시 대신 필드별 selector와 `useMemo`를 썼습니다. 세션 목록의 행 목록은 헤더와 같은 단일 슬롯 캐시를 공유합니다(둘 다 스토어의 `agents`와 `status.remote`를 넘김). ## Evidence - **확인한 것**: web typecheck, lint, `PaneHeaderBand`/`AgentSessions` 테스트(렌더 횟수 테스트 포함); `cargo fmt-check`, `lint`; hide-project, hide-host, herdr-core 전체 테스트(새 테스트 `a_node_repository_without_a_github_remote_draws_no_reason`, origin 규칙 둘을 hide-project로 옮긴 테스트); 정책 스크립트 4종과 attribution 검사. - **확인하지 못한 것**: 전체 테스트를 부하 속에서 돌렸을 때 `hided` 통합 테스트(`connect_build`, `mobile`, `node_session_activity`)가 실행마다 다르게 1~2개 실패했고, 단독 실행에서는 모두 통과했습니다. 이 변경과 닿는 코드가 아니며 원인은 찾지 못했습니다. herdr-core lib 테스트 하나도 첫 전체 실행에서 한 번 실패하고 재실행에서 통과했습니다. - **확인하지 못한 것**: `usage_ledger` 쪽 `fail_with` 정리(A4)는 호출부 11곳의 로그 모양이 바뀌어 이번에는 하지 않았습니다.
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
hided가 아무도 아무것도 하지 않을 때도 같은 실패를 끝없이 반복하던 세 가지를 고칩니다 (설치된
0.1.0-main.f3f857e7에서 89분 동안 읽기 전용으로 잰 결과).developer메시지를 노드 링크가 모르는 역할로 거부해, 세션 파일이 자랄 때마다 같은 실패가 반복됐습니다 (89분에 262번). 이제developer는 에이전트가 주입한 지시(system)로 읽고, 모르는 역할은 계속 거부합니다.Review
hide-host/src/worktrees.rs- failure path: memo(Measured) 재사용 조건(목록의 HEAD·브랜치·잠금, index 파일, base, upstream, 그 커밋들)과 마감 계산. 시간에 잘린 측정은 memo에 남기지 않습니다.hide-node-link/src/protocol.rs-Call::Worktrees.reuse_unchanged를#[serde(default)]로 추가,PROTOCOL_VERSION은 그대로 (같은 빌드끼리만 연결). snapshot wire는 바뀌지 않습니다.herdr-core/src/worktrees.rs- 같은 generation의 watch 읽기만 재사용을 허용하고, 새로고침과 Overview 열기는 전부 다시 잽니다. 기기 읽기(device_catalog.rs)는 항상 전부 잽니다.herdr-core/src/links/ledger_store.rs- 자식 목록이sessions와 JOIN됩니다. 기록이 없는 자식은 오류 대신 목록에서 빠집니다.hide-session/src/lib.rs- Codex CLIdeveloper만system으로 바꿉니다. 다른 에이전트의 역할 변환은 그대로입니다.for-each-ref1회와 워크트리당 indexstat1회가 늘고, 입력이 그대로인 워크트리의 status·rev-list·ignored 스캔이 빠집니다.GIT_WATCH_LIMIT), 저장소당 워크트리 수만큼의 사실만 들고, 노드 프로세스와 함께 끝납니다.git rev-parse1회는 그대로입니다 (아래 측정에서 가장 큰 비용).Evidence
every_agents_conversation_page_reads_back_from_the_node_link)와 Codex CLI 세션이 분석되고 카드가 배우는 Memory 테스트. 수정 전에는conversation_role_invalid.links.sqlite3의 읽기 전용 복사본에서 원인 확인(Pi/omp 자식 경로 이름, 지워진 세션 커서 8개, 없는 부모 3개). 테스트는 그 모양을 재현해 수정 전ledger_session_missing3행, 수정 후 0행.[0,1,0], 새로고침 뒤[1,1,1]. 응답 없는 워크트리(fsmonitor가 멈춤)는 이름과 함께 답하고 다음 워크트리는 계속 잽니다.bash scripts/verify-cargo.sh lint,bash scripts/verify-cargo.sh nextest --workspace(4592 통과, 97 skip),scripts/tests340개, workstation identity, capability readers off lock, core touches no machine./Applications/hide.app은 이 작업에서 바꾸지 않음). 반복이 실제로 멈췄는지는 설치 후core.jsonl에서 봐야 합니다.Call::Worktrees는 라이브로 돌리지 않았습니다 (테스트에서reuse_unchanged: false전달만).워크트리 읽기 측정 (2026-10-14, 이 Mac, herdr-ide 32-33개 워크트리, 읽기 전용 git)
hide_host::worktrees::read를 운영자 체크아웃에 대해 직접 시간 잼, load average 15-24.워크트리 하나 비용: 대부분 0.3-1.4 s. 큰 것은 ignored 실행 폴더에 중첩 저장소가 많은 워크트리였습니다: 460개 12.3 s, 550개 15 s, 144개 4.7 s.