Repository navigation
Keep reading a session past a record whose text is too large - #869
Merged
Merged
Conversation
A record past the 256 KiB line cap that the bounded scan could not certify as a tool record failed the read, and the cursor stayed on it forever: the session's labels froze and every bell to the pane was held as session_unread until the letter expired. A person's message with a pasted screenshot is such a record. Such a record now loses its text instead. A conversation record keeps the tool marks its structure certifies and is counted as conversation_capacity; the marks only its text could give (a person's message, an interruption) clear or end a wait and never start one, so losing them can hold a bell but never ring one into a menu. A record the scan cannot structure (an unknown envelope, an escaped discriminator, nesting past 64 levels) folds an unreadable turn mark, which leaves the wait unknown until the next turn starts or a person writes. Search reads past both instead of dropping the file's rows.
Grok's large-line scan (#868) failed the read on a record it could not follow. It now marks the scan invalid and the record is skipped as conversation_capacity with an unreadable turn mark, like the Claude Code and Codex CLI readers.
yansfil
added a commit
that referenced
this pull request
Oct 9, 2026
Related: #869, #870, #871 ## Summary - Read ordinary Cursor chats from native SQLite/protobuf storage with incremental paging and native identity checks. - Feed existing generated labels, archive/body search and desktop/phone conversation details from one shared reader. - Sleep/wake default-root sessions with the exact native ID; refuse known custom roots and duplicate IDs before effects. - Preserve recorded minute timestamps and absent facts; keep fork, tools, native titles and Memory insertion disabled. - Keep native files read-only and cap database work, graph traversal, discovery and returned content.   ## Review - **Judgment**: known-root checks cannot certify later native exec; shell exports may select other history or fail. - **Files to watch**: `hide-session/src/cursor.rs` (identity/caps), `herdr-core/src/live.rs` (lifecycle failures). - **Cost**: lifecycle-only root audit caps directory opens at 64, entries at 10,000 and retained path bytes at 8 MiB. - **Follow-up**: inherited old-attempt pane cleanup remains unresolved in #874; its separate fix follows this PR. ## Evidence - **Confirmed**: native graph fixtures cover paging, immutable source bytes, replacement refusal and consumer dispatch. - **Confirmed**: isolated browser labels, archive/body search, detail, exact wake arguments and pre-close root refusal. - **CI repair**: shared test-binary placement and isolated default-root fixtures preserve assertions and guards. - **Checks**: full Rust tests, web/desktop typecheck, lint, unit tests and builds, plus workspace Clippy passed. - **Limits**: authenticated continuation, installed desktop, physical phone and later native roots remain unverified. - **Images**: synthetic fixture observations on earlier reviewed heads; exact provenance remains in the folded record. <details><summary>Verification record</summary> - PRD: `agents/prd/session-readers-cursor/prd.md` (sha256 57aa6f1c78f5603500fde8af92e25ff5670d1f2877df2f30eea5940356ef193d) - Base 383bbd2 → head 5a8c9d8, verified 2026-10-09T12:33:49.268Z: PASS - Verification report: `agents/runs/session-readers-cursor/verification-report.json` and `agents/runs/session-readers-cursor/verification-report.md`; source fingerprint bf8641a0b0901418feb4be3a925b3099e4a943904c10f22e15f123f91ecbc168 - Suites: - S1: GREEN `bash scripts/verify-cargo.sh test` (exit 0) - S2: GREEN `bash scripts/verify-web.sh` (exit 0) - S3: GREEN `bash scripts/verify-cargo.sh lint` (exit 0) - Code: reviewed `5a8c9d81a01ff1a50f18670e4718f2d442c01dce`; full source coverage carried through the actual current-head fixture follow-up and sealed evidence closure; test layout/default-root isolation preserve every prior assertion and guard. Both technical P1s remain: later unknown exec-root selection and #874 cleanup. Follow-ups: proof/effect race, current connector and ownership fences. - Code report identities (current source follow-up / sealed closure): `d5c4db32067c89ec18ed5449c5b0566b19abc3513d7b94ddfff26402b392264f` / `4051b5f03ab53c3b4b12e4ab98280477bbc62d579a64043d183f389a242906c5`. - Fidelity: reviewed `5a8c9d81a01ff1a50f18670e4718f2d442c01dce`; complete canonical parent/child and negative-capability coverage plus same-head evidence closure; independent resume/helper expectations and original consumer/Sleep assertions pass without contract reduction. #874 separate repair and unknown shell roots retain accepted dispositions. Follow-ups: phone currentness, remote replacement and parent aggregate. - Fidelity report identities (current source follow-up / sealed closure): `e37196dd07258d927a2b733303e6708eda3d0bc3b95c4e80d8f0678c7571a9a5` / `eeef201a96e16100457b4fc766419b62dea248288ed1c7f423c3231bc89d9bc0`. - Security: reviewed `5a8c9d81a01ff1a50f18670e4718f2d442c01dce`; complete source/privacy coverage, bounded test-child impact and actual sealed evidence closure; all36 material identities match, with no new finding. Actual exec-root equivalence and inherited past-attempt cleanup remain technically unclosed; authorization is not fix credit. Follow-ups: bounded DTO allocation and non-atomic proof/effect interval. - Security report identities (current source follow-up / sealed closure): `a1021c7daabcc0f77461f2ac13fd619d91b1a7e879088afd18d2b02923ea1a83` / `b60e21c12083c1bcb6777dff24fe7835ed2ac7b2eed4278a8f5d84e5b4f07013`. - Evidence: 33 registered (1 api, 29 log, 1 browser, 2 screenshot); paths are local to the run directory - agents/runs/session-readers-cursor/native-start-resume.json - agents/runs/session-readers-cursor/cli-measure/negative-fork.json - agents/runs/session-readers-cursor/cli-measure/help.json - agents/runs/session-readers-common-v2/cursor-core-journey-2.log - agents/runs/session-readers-common-v2/cursor-web-native-3.log - agents/runs/session-readers-cursor/manual-browser-3/aside-body-search-complete.log - agents/runs/session-readers-cursor/manual-browser-3/cursor-archive-body-search.png - agents/runs/session-readers-cursor/manual-browser-3/cleanup.json - agents/runs/session-readers-common-v2/cursor-opencode-worker-before-fix.log - agents/runs/session-readers-common-v2/cursor-opencode-worker-fixed.log - agents/runs/session-readers-common-v2/cursor-p7-core-integration.log - agents/runs/session-readers-common-v2/cursor-p7-reader-integration.log - agents/runs/session-readers-common-v2/cursor-p7-integration-clippy.log - agents/runs/session-readers-common-v2/cursor-root-guard-reader-2.log - agents/runs/session-readers-common-v2/cursor-root-guard-browser-1.log - agents/runs/session-readers-common-v2/cursor-root-guard-browser-2.log - agents/runs/session-readers-common-v2/cursor-root-guard-clippy-1.log - agents/runs/session-readers-common-v2/cursor-root-guard-web-static-1.log - agents/runs/session-readers-common-v2/cursor-root-guard-web-static-2.log - agents/runs/session-readers-cursor/manual-browser-4/aside-refusal-final.log - agents/runs/session-readers-cursor/manual-browser-4/cursor-duplicate-sleep-refusal.png - agents/runs/session-readers-cursor/manual-browser-4/cleanup.json - agents/runs/session-readers-common-v2/cursor-root-main-integration-1.log - agents/runs/session-readers-common-v2/cursor-sealed-node-repro-1.log - agents/runs/session-readers-common-v2/cursor-sealed-web-repro-1.log - agents/runs/session-readers-common-v2/cursor-sealed-node-fixed-1.log - agents/runs/session-readers-common-v2/cursor-sealed-web-fixed-1.log - agents/runs/session-readers-cursor/delivery/ci-policy-failure.log - agents/runs/session-readers-common-v2/cursor-ci-layout-policy-1.log - agents/runs/session-readers-common-v2/cursor-ci-layout-rust-1.log - agents/runs/session-readers-cursor/delivery/ci-rust-failure.log - agents/runs/session-readers-common-v2/cursor-ci-root-repro-1.log - agents/runs/session-readers-common-v2/cursor-ci-root-fixed-1.log - Changed paths: 56 (see Files changed) - Delivery: mode pr, branch `feat/session-readers-cursor`, base `main` - Verification JSON SHA256 `6780ac85d900e4993e0913314f89c737eb2745b7f41f703f8a2fd265506eabae`; input fingerprint `5bcc6113b536b656e446e3ebf5c219b80b808469d2c35b645afc316dfbd00361`; both post-verification drift flags false, every command mutatedTree=false. - S1: 3,789 passed/0 failed/23 existing ignored; S2: web141 files/1,311 passed/1 existing skipped, desktop17 files/162 passed/4 existing skipped, both typecheck/lint/build; S3: fmt/workspace all-target Clippy warnings denied. Existing jsdom/React-act/bundle warnings remain despite exit0. - Registry: 36 identities total,33 unchanged qualified manual objects and three automatic command logs replaced by current PASS. S1 SHA256 `df7dd0c42987a9e4825b16bdb44a4750c933b403f492352c4b3949f573c6a5bb`; S2 `469e0998a9260f6330e93929dd62cc11732feff2c12a748ca274c12276b42b6d`; S3 `b8cda8538e555660c38b5c7b7be18933c1d36bc274190d4a2604cb1301f1dd6f`. - Preserved earlier sealed attempts: genuine helper-feature/resume expectation FAIL at `e373ce145`, retained report SHA256 `c8a01473a03d39676ff9139d516259690e95322a3bef95946d170c9c7341d623`; corrected `987e4dd6f` PASS retained at SHA256 `4b5421c8d6844526c223fc2cf201311f18a9d97c4e3f2a6ccb8e265e6516d578`. No skip, suite exclusion, timeout or production guard was relaxed. - First PR CI `37927765454` on `987e4dd6f` completed FAIL: existing single-integration-binary policy plus two Rust fixture failures; all other lanes passed, with one existing planned skip. Actual failed-job logs remain: policy SHA256 `ef544218c620c27fcd7189ff7d46cd314e79340e251882c64c98e72f3a459f1e`; Rust `445f578cd31f451e9824333a83751d172e26d9b71f4dd8834b2019b4329b2240`. - CI corrections: `640567fed` moves the unchanged environment audit into `tests/it`, adjusting only its relative include; independent policy3/Rust audit1 pass. `5a8c9d81` isolates two default-root positives in owned self-children before startup capture, preserving their complete bodies and original5s close assertion. The same private nondefault XDG reproduces FAIL2 before and PASS3 after, including unchanged custom/XDG/duplicate/invalid-root negatives. The actual first CI runner's override value is unconfirmed; this demonstrates fixture sensitivity, not exhaustive runner attribution. Each child retains the existing60s run/drain deadline, up to10s exit-confirmation cleanup and64KiB output/stream, without a universal wall-clock or abrupt-owner guarantee. - Browser provenance: archive body search and native detail screenshot came from the reviewed candidate through `7a723749`; duplicate-root Sleep refusal image came from root-guard source `22328f5f7` before main integration. Both use synthetic native storage, an isolated HOME and private Herdr/hided; screenshots show only the product viewport. Earlier automated browser journeys passed 6/6 and guarded-root regression passed 7/7; original failure logs remain qualified. - Native provenance: installed Cursor `2026.10.01-e373342` accepted first-prompt and exact resume argv under private Herdr but reached login only; --fork was rejected with exit1. Native database bytes stayed unchanged. This is not authenticated continuation acceptance. - Unrun limits: actual later shell execution-root equivalence, authenticated continuation/native-ID reporting, installed packaged desktop, physical phone, current remote/helper replacement, native Windows/Linux execution, idle/driven performance and RSS. Retained24 integration remains explicitly ignored pending actual payload; earlier independent compatibility fixtures retain their original scope. Parent aggregate acceptance waits the remaining reader and final integration. </details>
yansfil
added a commit
that referenced
this pull request
Oct 9, 2026
Related: PRD `agents/prd/agent-hierarchy-screens/prd.md` · 같은 영역의 직전 작업 #861, #862, #869 · 막힘 상태 #890 위에 합침 ## Summary - 하위 어디서 막히든 그 계보의 루트 한 줄이 사이드바와 Sessions의 Needs You에 오르고, 막힌 자손은 따로 오르지 않는다. - 승격 줄과 pane header band는 원인별 동사(승인 · 답변 · 확인 · 초안), 무엇을, 누가 순서로 쓰고, Open은 손댈 pane으로 간다. - 자식은 사이드바, Home, Sessions 어디서나 같은 트리로 보인다. 손자까지 레일로 들여쓰고, 접힌 행은 자손 표시(`! N`, `● N`)를, 행마다 PR 아이콘 하나를 단다. - 트리 팝오버가 증손 이하와 `외 N건`을 열고, 끝나고 읽은 자식은 `끝난 자식 N` 아래로 접힌다. - Sessions는 사이드바와 같은 이름의 그룹(Needs You · Working · Done · Idle · Resolved 24h)으로 바뀌고, Factory 카드도 같은 자손 표시를 쓴다. - #890의 막힘(▲), 멈춤(◐), 대기를 트리에 합쳤다. 막힘은 동사 대신 원인 문장을 두 번째 줄에 남기고, 읽은 막힘은 새로 올라온 ask에 자리를 내준다.  ## Review - **판단해 주세요**: 열린 checkout 행의 목적 줄이 사라졌다(B35). 트리가 그 자리를 쓰기 때문인데, 접힌 checkout에서만 목적을 보는 것으로 충분한지. - **판단해 주세요**: 트리 행은 한 줄이라(B14), 읽은 AI 질문의 요청 줄과 #890의 "대기 · …", "멈춤 · …" 줄은 트리에 남지 않는다. 막힘의 원인 줄만 남긴다(#890 B2). - **판단해 주세요**: 접힌 부모의 자손 표시는 올라온 ask와 일하는 자손만 센다(D-40). #890이 배지에 세던 막힌 자식 수는 트리를 펼쳐야 보인다. - **조심해서 볼 파일**: `herdr-core/src/agent_state/escalation.rs` - snapshot wire(`RaisedAsk.raised_pane_id`)와 승격 판단이 바뀐다. 원인별 동사와 미수신 문구가 여기서 정해진다. - **조심해서 볼 파일**: `herdr-core/src/agent_state/turn.rs` - `demand_verb`가 읽은 AI 질문과 읽은 막힘을 루트의 할 일에서 뺀다. #890과 합친 자리라 행 표시, 마크 색, Needs You 판단이 여기서 갈린다. - **조심해서 볼 파일**: `herdr-core/src/agent_state/tally/scope.rs` - runtime mutex 안에서 checkout마다 사이드바 트리를 만든다. 한 번만 만들도록 중복 호출을 지웠다. - **조심해서 볼 파일**: `web/src/components/agent-tree-popover.tsx`, `web/src/PaneHeaderBand.tsx` - 묻는 행을 `raised_pane_id`로 찾고, 연결 안 된 기기의 Open을 막는다. - **비용 검토**: 승격 lift는 행마다 조상을 다시 걷는다(계보 깊이에 비례). 고빈도 경로의 입력당 작업은 늘지 않고, publish는 상태 전이 때만 일어난다. ## Evidence - **확인한 것**: 결정적 verify(`verify-cargo.sh test`, `lint`)가 #890을 합친 head에서 PASS. herdr-core 1884개, hided 포함 2299개 통과. - **확인한 것**: `verify-web.sh` 웹 1326개(1 skip), desktop unit 162개 통과. `check-design-contract.mjs` 통과. - **확인한 것**: #890을 합친 뒤 blocked-state, sidebar-status, session-panel, projects-sidebar, overview, session-readers, lineage-session e2e 통과. - **확인한 것**: web e2e 전체 249개 중 246개가 #890을 합치기 전 head에서 통과했고, 실패 3개는 고친 뒤 재실행에서 통과. 합친 뒤 전체 실행은 CI가 맡는다. - **확인한 것**: desktop e2e 전체 67개 중 58개 통과, 8개 skip, 1개(session-labels)는 B14에 맞춰 옮긴 뒤 단독 재실행 통과. - **확인한 것**: design review가 pane-header, session-panel, projects-sidebar에서 Pen r2 대비 Light/Dark 모두 PASS(합친 뒤 다시 실행). - **확인한 것**: 승인된 디자인 후속(Dark 팝오버 레일 토큰 강화, Light PR 아이콘에서 빨강과 주황 구분)이 실제 화면 캡처로 확인됨. - **확인하지 못한 것**: 설치된 앱(`/Applications/hide.app`)에서의 실제 계보 확인은 하지 않았다. 지시상 설치와 실행을 하지 않았고, 확인은 gallery, e2e fixture, 격리된 Herdr로 했다. - **확인하지 못한 것**: 로컬 cargo test 중 `bell_intake::the_bell_turn_receives_the_letter_bodies_and_confirms_them`(이 PR이 손대지 않은 crate)이 부하 중 한 번 실패했다. 단독 8회는 모두 통과. - **확인하지 못한 것**: 이 Mac의 전역 commit 서명 때문에 hide-host git 테스트와 `cmdk.spec:215`가 로컬에서만 실패하고, 서명을 끄면 통과한다. CI는 영향 없다. - **생성물**: `design/hide-screens.pen`은 main의 파일에서 합친 생성기로 다시 만들었다. 한쪽만 바꾼 시트는 그쪽과 같다. gallery fixture(`agentScopes.json`, `agentStates.json`)도 diff가 크다. <details><summary>추가 증거</summary>   후속으로 남긴 것: - 다시 뿌리를 옮긴 트리 팝오버에 원래 부모로 돌아가는 길이 없다. - 세 단계보다 깊은 곳에서 올라온 ask는 팝오버에서 손자의 자손 표시로만 보인다(트리는 2단계, D-12). - 여러 PR 목록 hover는 포인터로만 고를 수 있고, 키보드로는 닿지 않는다. - band hover 문구("경로 다음 checkout · N분째 동사 대기")를 단위 테스트가 확인하지 않는다. - 분 단위 문구는 snapshot 사이에 멈춰 있고, `agentScopes.json`에는 옛 sessions/work 모양이 남아 있다. - `lift`는 행마다 조상을 다시 계산한다(`lineage_path_pane_ids`로 줄일 수 있음). 트리 레일의 `border-l-2`는 토큰이 아닌 폭이다. - 자동 Resolve가 `wait`(백그라운드 작업, 답장 대기)를 보지 않는다. 막힘 band의 `+N`은 팝오버를 열지 못한다. 요청 집계(`scope.rs` VERBS)에 `blocked`가 없다(main과 같음). </details> <details><summary>Verification record</summary> - PRD: `agents/prd/agent-hierarchy-screens/prd.md` (sha256 68f370e815271d2cb5a8c6fe4f549a64fd3088a3ac45a7f44129f7981769361f) - Base ec61754 → head 36feb61, verified 2026-10-09T18:49:50.900Z: PASS - Verification report: `agents/runs/agent-hierarchy-screens/verification-report.json` and `agents/runs/agent-hierarchy-screens/verification-report.md`; source fingerprint 9fe3702577bf19b095ae8c67820fbe23cb686760563c2158181227bea553b678 - Suites: - S1: GREEN `bash scripts/verify-cargo.sh test` (exit 0) - S2: GREEN `bash scripts/verify-cargo.sh lint` (exit 0) - Reviews: - Fidelity + Code (first, head 5195edd): Fix now were the e2e selectors to port, Draft asks keyed by the named pane, Home trees, the band's Open while disconnected, the hover path repeat, read-question demand, the B18 finished fold, the multi-PR hover list, the native-question verb, grandchild ArrowRight, the duplicate sidebar tree build and broad store reads. All fixed in e51ba10..ee42827. - Fidelity + Code (follow-up, head ee42827): all 13 prior items fixed (B18 partial). Fix now: a child's own native question claimed its parent had not received it; fixed in 0890706 with a test. Also fixed: the finished fold hiding a raised descendant, a draft's Open checking the wrong device, a vacuous e2e assertion. Follow-ups are listed above. - Merge resolution review (head 5d0b1f2, merge of main with #890): nothing from #890 dropped. Fix now: a read block hid a newer raised ask, and a waiting raised root drew its ask in working blue; both fixed in 36feb61 with a test. Also fixed: a read block's cause in Sessions, ja Idle group word, stale band and Resolved docs. - Evidence: none registered separately. - Changed paths: 95 (see Files changed) - Delivery: mode pr, branch `gen-prd/agent-hierarchy-screens`, base `main` </details>
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.
Related: #860
Summary
256 KiB가 넘는 기록 중 큰 기록 판정이 도구 기록으로 확인하지 못한 것은 세션 읽기를 실패시켰고, 커서가 그 자리에 영구히 멈췄습니다.
그러면 그 세션의 라벨이 굳고, 그 패널로 가는 벨이 모두
session_unread로 보류되다 편지가 undelivered가 됩니다.#860 이후 남은 경우는 스크린샷을 붙인 사람 메시지입니다(wCQ:p1이 2026-10-01 389 KB 메시지에서 멈춰 있음).
이제 그런 기록은 본문을 잃고 읽기는 계속됩니다.
conversation_capacity로 셉니다.본문만 줄 수 있는 turn 기록(사람 메시지, 중단)은 대기를 지우거나 끝낼 뿐 만들지 않습니다. 그래서 잃어도 벨이 메뉴에 들어가지 않고, 보류될 수만 있습니다.
unreadable표시를 접습니다. 다음 turn이 시작되거나 사람이 쓸 때까지 대기는 "모름"이고 벨은 보류됩니다.Review
read.lines_skipped진단에conversation_capacity로 남습니다.awaiting_operator로 보류됩니다. 반대 방향(대기를 놓쳐 메뉴에 벨)은 생기지 않습니다.hide-session/src/conversation_cursor.rs- failure path. 실패하던 자리가 skip으로 바뀌었고, 체크포인트에 직렬화되는 분류기에overflow필드가 생겼습니다(옛 체크포인트는 기본값 0으로 읽힘).hide-session/src/turns.rs- 기기 helper와 오가는 tracker에unreadable필드가 생겼습니다. 옛 core는 이 필드를 무시합니다(question_capacity때와 같은 방식).Evidence
hide-session165개 통과(Grok 중첩 기록 경우 추가).Claude Code·Codex CLI각각 확인합니다. 스크린샷 메시지 뒤 대기는 "없음"으로 읽히고, 모르는 봉투 뒤에는 "모름"이며, 사람 메시지가 오면 풀립니다.labels.json복사)로 실제 12 MB 세션을 읽었습니다. 10번에 파일 끝까지 0.16초 걸렸고, 대화 기록 1개와 도구 기록 5개를 건너뛰었으며, 대기는 "없음"입니다.herdr-core·hide-host·hide-node-link의 label/turn/question/session/doorbell/waiting 테스트 455개 통과(main 병합 후, grok 포함).hide-sessionclippy(-D warnings)와 fmt 통과.OpenCode·Pi·omp의 큰 도구 기록 판정은 범위 밖입니다. 이들의 큰 기록은 모두unreadable이 됩니다(전에는 읽기가 멈춤).