Repository navigation
fix: show one pull request list per session on every surface - #1859
Merged
Merged
Conversation
…before GitHub's creation time The creation window compared this machine's clock with GitHub's and allowed only 2 s on the early side; mission-13's #1810 to #1813 were printed 2.6 to 3.2 s before GitHub's createdAt and left their sessions' records. The window is now 30 s either way, one constant shared by the link record and the label worker.
…ants included One list per row (agent_state::work::family) gathers the pull requests the session holds or made and every descendant's: live ones from their rows, ended ones from the link record's summary, which now carries each session's parent and the record's last read of each pull request. A pull request GitHub's 200-newest list no longer holds keeps the record's state as stale instead of leaving the list, and closed ones stay listed. The session record's PR section is laid by the runtime from the same function, so the record and the row show the same list. RowState.pr and own_prs are removed.
The task row, pane header, project tree, Overview task card and session record now read the one list the core lays on each session row, so an ended child's pull requests stay on its parent and a closed one stays listed, dimmed. The web's own family and session gathering is removed.
… on the branch The record now reads the session's one list, which holds the pull request the pane holds on its checkout's branch, as its row's mark does; the e2e fixture opens every pull request on main, so #32 is listed from the start.
…w draws The record cut the parent's list at 200 and then read each child's list again, which put the pull requests past the cap back. It now places only the capped list into groups and carries the same omitted count; a lineage past the 2,000-session walk is logged instead of ending quietly. The same pull request read on several machines takes the fresh, latest read whatever order the reads arrive in, and a fresh read carries no read time, so GitHub answering the same again publishes nothing. The second projection after queueing automatic resolutions runs only when one was saved.
…ess back A tool output that answers gh pr create, a gh api POST to the pulls path or a create_pull_request tool now marks the address it gave back as made by the session, in the link facts and on the label worker's sightings. Each format pairs a call with its output by its own id (Claude tool_use_id, Codex call_id, Pi toolCallId, Grok toolCallId; OpenCode keeps both in one part), and a reader that reads in polls carries the waiting call ids in its checkpoint. agy's results name no call, so its prints stay judged by time.
… s early edge for other prints The earlier change widened the window to 30 s either way, which would also count a session that only listed a new pull request on a skewed clock as its maker. The window goes back to 2 s before and 30 s after GitHub's createdAt, and an address its creating call gave back (session_prs.made, a label sighting's made) is the session's making at any distance. Version 12 of the link record adds the column and reads the last 90 days of files again, so mission-13's #1810 to #1813, printed by their own gh pr create 2.6 s to 3.2 s before GitHub's time, are found.
…ep the walk's cap on an empty list A live row's pull request kept the state and title its request carried even when the read chosen across machines said otherwise, so a merge one machine had read showed as open. It now takes the chosen read and falls back to the request's copy only when no list holds the pull request. A lineage whose pull requests all lay past the 2,000-session walk returned no list and so dropped the fact that it stopped early; the list is now returned empty with the fact, and the row and the record log it.
…ed and has no fallback A shell call joining gh pr create to another command with || runs that command when the create fails, and a failed create prints the pull request already on its branch, so neither proves the session made the address it printed. The shell reader now marks a call holding ||, and each session reader passes its format's failure flag to the output that answers a creating call.
A creating call's print was taken whatever the clocks said, so a call that also viewed an old pull request made it. The store now takes a made print from 10 s before GitHub's createdAt to 30 s after, and any other print from 2 s before as before. This Mac's record held 234 creating prints, the earliest 3.4 s ahead; mission-13's four were 2.6 s to 3.2 s ahead.
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
같은 세션이 태스크 줄, pane 머리, 세션 기록에서 서로 다른 PR 수를 보였습니다(한 Conductor가 기록 15개, 태스크 줄 3개).
화면마다 PR을 따로 모았고, 끝난 자식의 PR은 줄에서 빠졌으며, 닫힌 PR은 버려졌기 때문입니다.
이제 core가 세션마다 PR 목록 하나를 만들고(자기 것 + 살아 있거나 끝난 모든 자손의 것), 모든 화면이 그 목록만 읽습니다.
merge된 PR은 모두, 닫힌 PR은 흐리게 남습니다. GitHub 목록(최근 200개) 밖의 PR은 기록의 마지막 상태로 stale 표시하며 남깁니다.
기록에서 merge된 PR 4개가 빠지던 원인도 고쳤습니다: 각 세션의
gh pr create가 주소를 GitHub 생성 시각보다 2.63.2초 먼저 찍었는데(두 시계 차이), 판정 창이 앞쪽 2초뿐이었습니다.+30초 안이면 그 세션이 만든 PR입니다. 그 밖의 출력은 예전 창(-2초/+30초) 그대로입니다.이제 PR을 만드는 호출(
gh pr create,gh apiPOSTrepos/o/n/pulls,create_pull_request도구)이 성공해 돌려준 주소는 GitHub 생성 시각 -10초사이드바 줄: 리드의 목록에 끝난 자식(P4)의 PR 두 개가 남고, 닫힌 #819는 흐리게 그려집니다(gallery).
Review
tool_use_id, Codexcall_id, Pi·GroktoolCallId, OpenCode는 한 part), 출력에서 줄 하나가 주소뿐인 것 또는 응답 JSON의html_url만 만든 PR로 봅니다(본문에 든 다른 PR 주소는 아님). agy는 결과가 호출을 가리키지 않아 시간 창만 씁니다.session_prs.made열을 더하고 최근 90일 파일을 다시 읽습니다(v10 때와 같은 방식). 그래야 업그레이드 전에 만든 PR도 잡힙니다. 업그레이드 직후 한 번 읽기 부하가 있습니다.||가 없고(앞 명령이 실패해야 도는 명령이 없음), 기록이 실패로 표시하지 않은 호출(Claudeis_error, Codex 종료 코드, PiisError·exitCode, Grokfailed, OpenCode 상태·종료 코드)만입니다. 실패한gh pr create는 브랜치에 이미 있는 PR 주소를 찍기 때문입니다.&&,;, 파이프로 이어진 호출은 인정합니다: test: keep the terminal address whole on Linux and record why the Windows shell never draws #1810~#1813을 만든 호출이 모두cd … && B=…; cat > $B <<EOF … EOF다음gh pr create … | tail -1모양이었습니다.gh pr create && gh pr view 42)을 걸러냅니다.gh pr view) 그 세션도 만든 세션으로 잡힙니다.hide-session/src/links.rs,named_prs.rs,opencode.rs,conversation_cursor.rs,hide-shell/src/lib.rs- 생성 호출 판별(ShellLine::fallback), 형식별 실패 표시, 호출-출력 짝짓기, 아직 출력이 없는 호출 id를 체크포인트에 실어 다음 poll로 넘김(최대 16개).herdr-core/src/runtime/session_state.rs- high-frequency path, 모든 줄을 다루는 교차 패스에 목록 계산을 얹었습니다.herdr-core/src/agent_state/work/family.rs- 새 단일 출처. 줄, 기록 그룹, 200개 창 밖 처리가 모두 여기서 나옵니다. 기록 그룹은 잘린 목록만 나눠 담고 같은omitted(pr_omitted)를 싣습니다. 여러 장비가 같은 PR을 읽으면 fresh > 최근 read > 나쁜 상태 순으로 고르고, 살아 있는 줄의 PR도 고른 read의 상태와 제목을 씁니다(read가 없을 때만 줄이 든 값).herdr-core/src/links/ledger_store.rs,links/store.rs,links/mod.rs- 판정 창 SQL(made면 -10초, 아니면 -2초)과 요약에 부모 간선, 만든 PR의 상태를 싣는 부분.web/src/prMark.ts,components/pr-mark.tsx- snapshot wire:AgentRow.pulls신설,state.pr삭제,pr_groups[].pulls.sync_session_state는 자동 해결을 저장했을 때만 두 번째 projection을 돌립니다.omitted개수와 넘는 순간 진단 한 번. 기록 세션 탐색은 줄당 2000개 상한이고 넘으면 같은 진단에lineage_capped로 남깁니다. 상한 안에서 PR을 하나도 못 찾아도 이 사실은 남습니다.Evidence
links.sqlite3읽기 전용 사본과 원래 transcript 복사본에 새 reader를 돌림(이번 규칙으로 다시). test: keep the terminal address whole on Linux and record why the Windows shell never draws #1810(-2744ms) test: fix the Windows-only flaky tests at their causes #1811(-2968ms) test: let the sleeping-child handoff test decide every delivery pass #1812(-2586ms) fix: remove the causes of the hided core move, remote core and node owner flakes #1813(-3182ms) 모두 자기 세션의 복합gh pr create호출 출력으로 made. 같은 주소를 나중에 찍은 다른 세션 출력은 made 아님.gh pr create --fill || gh pr view 42호출은 Claude·Codex·Grok·Pi·omp·OpenCode 두 스키마 모두 made 아님. 실패한 Claude 생성 호출이 찍은 기존 #42도 made 아님. 하루 전에 만든 #42를||와&&호출이 찍은 세션은 store에서 둘 다 Worked뿐(Created 아님). test: keep the terminal address whole on Linux and record why the Windows shell never draws #1810~#1813의 실제 복합 호출 모양은 -3.2초에 Created, -12초 made 출력은 빠짐.gh pr create출력은 made, agy와bash scripts/ship.sh출력은 아님. 호출과 출력이 다른 poll에 읽혀도 made. 목록에 혼자 있는 주소는 made 아님.gh pr list가 3초 먼저 찍은 PR은 아님. v11 기록이 열과 재읽기로 업그레이드됨. 기록 출력에서 made 3.4초 전은 남고 made 12초 전과 목록 3초 전은 빠짐. label 판정도 같음.lineage_capped이고pulls.capacity진단 한 번, 끝난 자식 100+101개에서 줄 200개 omitted 1과 기록 200개 pr_omitted 1이 같은 URL 집합, 세션 2001개 lineage는lineage_capped, A→B→C에서 B의 줄·기록이 C 진행 중과 끝난 뒤 모두 같음.tsc, eslint 통과.clippy(herdr-core, hide-session, hide-shell, hide-agent-hooks, all-targets) 경고 없음,cargo fmt --check통과.추가 증거
세션 기록 PR 영역을 펼친 상태: 같은 목록에서 그룹을 나누고, 끝난 자식의 닫힌 #1538은 흐리게(gallery).
Verification record
origin/main, head0ca41fd92scripts/verify-cargo.sh nextest -p hide-shell -p hide-session: 365 passedscripts/verify-cargo.sh nextest -p hide-agent-hooks: 395 passedscripts/verify-cargo.sh nextest -p herdr-core -E 'test(/links::|labels::facts|work::family|session_state|request_view|session_record|node_migration|pulls/)': 254 passedscripts/verify-cargo.sh clippy -p herdr-core -p hide-session -p hide-shell -p hide-agent-hooks --all-targets -- -D warnings: clean;check --workspace --all-targets: clean;cargo fmt --check: cleanscripts/verify-web.sh web test(head7d46918d7, no web change since): 262 files, 2283 passed;typecheck,lint: clean