Skip to content

Ship software-factory-ui - #708

Merged
yansfil merged 38 commits into
mainfrom
prd/software-factory-ui
Oct 7, 2026
Merged

yansfil merged 38 commits into
mainfrom
prd/software-factory-ui

Conversation

@yansfil

@yansfil yansfil commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Related: 1단계 #682 (머지됨, 707ef2c) 위의 2단계 · PRD agents/prd/software-factory-ui/prd.md

Summary

1단계(#682)로 Factory 엔진, 저장소, hide factory CLI가 들어왔지만 운영자는 터미널로만 볼 수 있었습니다.
이 PR은 그 위에 Factory 화면을 얹습니다: 내 차례, 보드, 그래프, Task 페이지, 만들기 시트, 설정, 비서 패널.
코어 스냅샷에 factory와 factory_task 섹션이 생기고, 엔진 스레드가 비교해 달라졌을 때만 내보냅니다.
화면의 모든 행동은 factory_action 이벤트 하나로 1단계 Command를 그대로 실어 보냅니다.
사이드바 배지, 요청 뷰의 Factory 줄, ⇧⌘F 단축키가 Factory로 이어집니다.

리뷰 전에 함께 넣은 것 (마지막 push ceae33e 이후):

  • 코드 리뷰 3회차의 결함 7개를 고침 (설정 검사 추가 중복, 받지 못하는 숫자 복원, Task 페이지 폼별 요청, i32 우선순위 상한, 받아들여진 답 뒤 보내기 비활성 등), 각각 jsdom 테스트와 함께.
  • 흐름 막대의 완료 오늘을 이 기기의 현지 날짜로 셉니다. 전에는 UTC 날짜라 서울 오전 9시 전에 끝난 Task가 빠졌습니다. 엔진 요약을 바꾸는 유일한 변경이며 운영자가 이 PR에 넣도록 허락했습니다 (hide-platform/src/time.rs, hide-factory Clock 포트에 utc_offset_ms).
  • 검증 n/3 수에 "검증 실패" 이름을 붙이고, 완료된 Task의 기준은 충족 체크로 그립니다.
  • '{{answer}}(으)로 보내기' 대신 조사 없는 '보내기: {{answer}}'; Factory 문구 전체에서 한국어 조사 대체 표기를 없앴고 labels.test.ts가 지킵니다.
  • 엔진이 줄인 글의 [cut N bytes] 표시를 결정, 시도 로그, 목표 어디에 있든 "… (줄임)"으로 보여 줍니다.
  • 의존 그래프(Issues Dependencies와 Factory 그래프가 함께 쓰는 D-08 배치)의 배치와 선 경로만 elkjs layered로 바꿨습니다. 카드와 토큰은 그대로이고, 전이 축약은 Factory 그래프에만 남깁니다. elkjs는 그래프를 열 때 동적 import로 불러 Web Worker에서 돌리고, 3초나 카드 400장을 넘으면 열 배치로 남기며 진단 로그를 남깁니다.
  • main(Name the core's own machine by its node id and convert stored state once #664, node id) 병합 뒤 만들기 시트가 "local" 대신 이 기기의 node id로 프로젝트를 고릅니다.
  • main(Move the core's machine work behind the node link (core-host-node 2a) #692 node link, 그 뒤 Pin Herdr v0.9.3 and resync the session replica on events_lost #738 Herdr 0.9.3과 Hold the revert's verify bundle at a FIFO so its first check sees it running #733)을 병합했습니다; Factory 화면 포트는 Factory host 시작 직후 그대로 설치되고, 완료 오늘의 시간대 읽기는 2b가 노드로 옮길 기기 일로 경계 검사에 적었습니다.

라이선스: elkjs 0.12.0은 EPL-2.0 (또는 GPL-3.0-or-later)이고, hide(MIT)는 이를 수정하지 않은 번들 의존성으로 EPL-2.0에 따라 씁니다. 패키지된 앱은 elk-worker.min.js를 그대로 담습니다.

내 차례 (ko, Light): 완료 오늘 9, 보내기: ok

Review

  • 판단해 주세요: 그래프 배치가 elkjs layered로 바뀌어 긴 선이 카드 사이로 돌아갑니다; Issues Dependencies 화면에도 같은 배치가 적용됩니다 (아래 그래프 이미지).
  • 판단해 주세요: 내 차례 맨 위 항목이 펼쳐진 채 답 후보가 바로 보이는 밀도가 적당한지 (위 이미지).
  • 판단해 주세요: 엔진이 쓴 영어 문장(GitHub 읽기/쓰기, gh 로그아웃 다음 행동)과 공지 접두사는 모든 언어에서 그대로 보입니다.
  • 판단해 주세요: 새 번들 의존성 elkjs (EPL-2.0); 저장소에 제3자 고지 파일이 없어 고지 문구를 넣을 자리가 없습니다.
  • 조심해서 볼 파일: herdr-core/src/factory/screen.rs - 엔진 스레드의 비교와 발행, high-frequency path.
  • 조심해서 볼 파일: herdr-core/src/factory.rs - 명령과 틱마다 touched(), 엔진 루프 안의 추가 일, SystemClock의 현지 시차.
  • 조심해서 볼 파일: herdr-core/src/runtime/factory.rs - runtime mutex 안에서 보내는 이벤트와 거절 경로.
  • 조심해서 볼 파일: snapshot_delta.rs, contracts/snapshot-wire-enums.json - snapshot wire에 새 섹션 둘.
  • 조심해서 볼 파일: persistence.rs - core ui_state.factory_secretary_pane, 목록에 나온 pane만 기억.
  • 조심해서 볼 파일: hide-platform/src/time.rs - Unix localtime_r/tm_gmtoff, Windows GetTimeZoneInformation; 읽지 못하면 한 번 로그하고 UTC로 셉니다.
  • 조심해서 볼 파일: hide-factory/src/summary.rs, adapters.rs - 엔진 요약의 날짜 경계 (Clock 포트에 메서드 하나).
  • 조심해서 볼 파일: web/src/dependencyLayout.ts, web/src/TaskBoards.tsx - 공유 그래프 배치, worker 수명, 시간 제한, 구조별 배치 기억.
  • 비용 검토: 유휴 시 2분마다 바깥 읽기 시각이 바뀌어 22 KB factory 프레임 하나; hided CPU 60초당 0.23-0.25초.
  • 비용 검토: 열린 Task 페이지는 명령과 틱마다 다시 읽지만 같으면 버립니다; 우선순위 변경 20번에 프레임 20개.
  • 비용 검토: 그래프 배치는 같은 노드와 선이면 다시 묻지 않고, 거절된 구조는 한 번만 묻고 한 번만 로그합니다.
  • 질문: 아래 "PRD가 말하지 않은 곳의 가정" 중 바꿔야 할 것이 있는지.
PRD가 말하지 않은 곳의 가정
  • One generic factory_action event carries the stage-1 Command (strict decode, whitelisted verbs, one event per action), read as the PRD's "typed UI 이벤트 하나씩".
  • The 내 차례 tab count and the sidebar badge always show the global my_turn, also while the project filter is set.
  • With several Factories the board shows Factory after Factory in the engine's order; the screen re-sorts nothing.
  • The flow bar sums the shown Factories' flows; its read time is the oldest GitHub read among them, stale when any is stale.
  • Done today counts by this machine's local day, the day the operator reads it on; a machine whose offset cannot be read counts in UTC and logs once.
  • The Factory screen is kept out of Recent Panels.
  • 카드 고치기 (edit) opens the secretary, because the PRD has no edit form and the engine's edit is a card re-add.
  • The secretary row shows only while an open Factory exists; its pane is remembered in core ui_state.factory_secretary_pane; it starts with the Factory config's default_runtime; its first prompt is English.
  • The create sheet asks the engine for a new preview on each project or verification change and preselects the first detected candidate; it lists this machine's projects only, because the engine reads local folders.
  • Settings can add a check (the check verb is in the screen whitelist) but not remove one: the engine has no removal verb.
  • The Overview's yellow count keeps its aria name '내 차례', which now overlaps the Factory's 내 차례 (PRD Risks).
  • ⇧⌘F was free and is now Open Factory; the shortcut test and the docs table gained that row.
  • The init preview's GitHub reads and writes are English sentences with no codes; the sheet shows them as given in every language.
  • Refusal reasons have no engine enum; the screen labels all 50, held complete by labels.test.ts reading every refuse/Refusal::new reason in hide-factory/src and herdr-core/src; an unlisted reason shows its code.
  • A stop's free-text detail (stop_detail in the engine's item text) is not shown in 내 차례; only the coded reason is.
  • The graph's placement and edge routes come from elkjs's layered algorithm for both Issues Dependencies and the Factory graph (D-08 still shares one layout); only the Factory graph drops transitive edges. Over 400 cards or 3 seconds the columns layout stays and a diagnostic is logged.
  • An engine notice's text is shown as the engine wrote it, so the stage-1 prefix 무관한 발견: stays Korean in every interface language.
  • The Task page's chain lists the stored dependencies, including those the graph leaves out as redundant (L-1 lists L-5, which also waits on L-2 and L-4).
  • B9 puts the time left on the line under the open item; the approved picture puts the time cue at the item's right, where every item has it, and the screen follows the picture.
  • A failed project check is init_failed with a stage; the engine tells a logged-out gh apart only in its English next action, so the sheet shows that sentence as written in every language. A code for that signal in stage 1 would let the screen label it.
  • With no required checks a GitHub repository still lists CI first; the sheet's own first pick moves to the detected commands when the engine refuses CI with ci_checks_required.
  • Text the engine shortened shows a muted "… (줄임)" where each [cut N bytes] mark was, in decisions, attempt logs and the goal.

Evidence

  • 확인한 것: 푸시한 머리 a9370ae(main Pin Herdr v0.9.3 and resync the session replica on events_lost #738 병합)에서 sasu verify PASS (S1, S2), CI 통과, build, 집중 테스트 865개, 코어 경계 검사, verify-web, Factory와 Overview e2e 9/9 (Herdr 0.9.3), 그 전 머리 563c1a59에서도 sasu verify PASS (S1 verify-cargo.sh test, S2 lint), verify-cargo.sh build --workspace, 코어 경계 검사, herdr-core/hide-factory/hide-platform 집중 테스트 865개, verify-web, design contract, Factory와 Overview e2e 9/9.
  • 확인한 것: 9ed33d70에서 web e2e 19/19: factory.spec.ts (그래프가 layered로 열림, 만들기 시트에서 fixture 프로젝트 선택), overview.spec.ts, s2.spec.ts.
  • 확인한 것: 새 테스트: 서울 오전 9시 전에 끝난 Task가 그날의 완료로 세어짐 (Rust); 긴 L-1>L-5 선의 경로가 어떤 카드 상자와도 겹치지 않음, 카드 수 상한, 시간 제한 뒤 worker 종료, 같은 구조 재구성 때 배치 유지, 거절된 구조 한 번만 묻기 (vitest); 조사 대체 표기 없음, 줄임 표시, 충족 기준, 검증 실패 이름, 열 배치 대체 (jsdom).
  • 확인한 것: 격리된 후보 앱 네이티브 QA (9ed33d7, Move the core's machine work behind the node link (core-host-node 2a) #692 병합 전, 1단계 Factory 사본, ko/en x Light/Dark): 완료 오늘 9, 보내기: ok, 그래프 layered 선 10개, T-3 줄임 표시, 만들기 시트 프로젝트 calc와 fixture; Name the core's own machine by its node id and convert stored state once #664 이전에 쓴 상태 폴더도 그대로 열림.
  • 확인한 것: B25 그래프 열기: 탭 클릭부터 layered 배치까지 23-302 ms (302 ms는 worker를 처음 불러오는 첫 열기), 네 번 모두 main thread long task 0개; 1.6 MB worker 파일은 한 번만 불러옴.
  • 확인한 것: 이전 B25, 50-Task Factory: 입력 echo p50 2.1 대 2.2 ms, p95 9.8 대 11.5 ms, 탭 전환 잡음 범위.
  • 확인하지 못한 것: B25는 debug 빌드, 통제되지 않은 부하; release, 스크롤, 실행 중 Task, 400장 넘는 그래프나 worker 시간 초과의 네이티브 확인 (단위 테스트만).
  • 확인하지 못한 것: GitHub를 쓰는 만들기 시트 전체 흐름 (실제 저장소에 Factory를 돌리지 않음), CI 대체 선택의 테스트, 비서 시작 hook의 단위 테스트, Pen 프레임 렌더.
  • 확인하지 못한 것: 부하 30-60에서 S1이 이 PR 밖 테스트로 실패했다가 단독 또는 재실행에서 PASS: github gh 시간 초과, codex_trust 자식 pid (두 번), ssh_hosts 주소 None, worktrees stale; 563c1a59의 첫 실행은 디스크가 가득 찬 순간 fixture의 git commit이 실패하고 (e2e 3개) 테스트 바이너리 하나가 실행 중 사라져 (S1) 실패, 다시 돌려 PASS.
  • 생성물: design/hide-screens.pen의 Factory 화면은 scripts/pen-screens-factory.mjs가 씁니다.
추가 증거

그래프 (ko, Light): elkjs layered 배치, 긴 선이 카드 사이로 지나감

Graph (en, Dark): layered layout

Task T-3 (ko, Light): 줄임 표시, 검증 실패 0/3, 완료 기준 체크

Create sheet (en, Dark): this machine's projects by node id

후속 개선:

  • 바깥 읽기 시각을 작은 별도 필드나 섹션으로 내보내, 시각 하나 때문에 요약 전체를 다시 보내지 않기; 엔진이 깨어날 때마다 요약을 다시 만드는 일도 함께.
  • 행동 답이 그 행동이 바꾼 요약보다 먼저 옴 (화면마다 보정 중); 요약을 먼저 내보내기, 답은 별도 섹션으로.
  • 큐가 가득 차 버려진 factory_task_open은 다시 묻지 않아 Task 페이지가 로딩에 머묾.
  • 열린 Task 페이지는 프로세스에 하나이고 클라이언트가 떠나도 남음; 클라이언트별 소유로.
  • 공유 그래프 worker: 한 그래프의 시간 초과가 대기 중인 다른 배치까지 끝냄 (각자 기한에 열 배치로 남음); 배치마다 시작 시각부터 재는 순차 큐로.
  • summary::build에 0이 아닌 시차를 넣는 Rust 테스트 (지금은 local_day만 고정).
  • 제목과 문장 속에 끼워 넣은 질문 글의 [cut N bytes]도 줄임 표시로.
  • elkjs EPL-2.0 고지를 담을 제3자 고지 파일 체계.
  • 그래프 확대/이동과 미니맵.
  • CI 대체 선택 때 경고가 잠깐 보임; 무응답 뒤 다시 시도 버튼이 켜져 있음.
  • 비서 시작 hook에 테스트 추가; 비서 pane id는 목록에 있는지만 확인하므로 Herdr가 재시작 뒤 id를 다시 쓴다면 신원 확인 추가.
  • 1단계가 gh 로그아웃을 코드로 알리면 화면이 그 다음 행동을 번역할 수 있음.
  • 설정 거절이 모든 칸의 입력을 되돌림; 거절된 칸만 되돌리기.
  • 대기 중 add가 루프 끝 발행을 건너뜀 (이 PR 전부터).
Verification record
  • PRD: agents/prd/software-factory-ui/prd.md (sha256 4102547e0dfc5f17ab8554209dd17eab92e83036646f14b414ed2369f19dd73b)
  • Base e515726 → head a9370ae, verified 2026-10-07T11:00:50.045Z: PASS
  • a9370ae is the merge of main fffb3c0 (Pin Herdr v0.9.3 and resync the session replica on events_lost #738 Herdr 0.9.3, Hold the revert's verify bundle at a FIFO so its first check sees it running #733) on 563c1a5; sasu implement verify passed on both heads (the first run on a9370ae was stopped by the disk floor and rerun).
  • Verification report: agents/runs/software-factory-ui/verification-report.json and agents/runs/software-factory-ui/verification-report.md; source fingerprint bdf303ba6f2a0342e79a3de079ccceb9fff0e4f17a70ea7f4ec6dbe67e91359b
  • Suites:
    • S1: GREEN bash scripts/verify-cargo.sh test (exit 0)
    • S2: GREEN bash scripts/verify-cargo.sh lint (exit 0)
  • Reviews:
    • Fidelity (b6084f0): B5 init_failed 다음 행동, B22 Close 조건, B13 범위, B25 증거 범위 지적; 앞의 셋은 35f02bef에서 고침, B25는 아래 확인하지 못한 것에 남김
    • Code (b6084f0): Medium 5건(secretary 기억 재시도, config 무응답 deadline, factory_busy 라벨, 늦은 답 유실, Task 페이지 재읽기) 모두 f3fc7d0, 35f02be, 0847812a에서 고침
    • 병합 뒤 후속 리뷰 (0847812, 5d5eb89): Fix now 없음; Follow-up은 아래 목록
    • 두 번째 main 병합 뒤 후속 리뷰 (4bdaa80): Fix now 없음; Factory task 상태 landed와 CheckoutSnapshot.landed가 이름만 겹침 (Follow-up)
    • PR 코드 리뷰 1회차 (4bdaa80): 10건; 5건을 0c9a4a1c에서 고침 (자세히 위 Enter, 한글 조합 중 Enter, 거절된 설정값 복원과 중복 전송, 설정 위 ⇧⌘F, 보관만 남은 보드); 나머지 5건은 Follow-up 또는 변경 없음
    • 고친 커밋 후속 리뷰 (0c9a4a1): Fix now 없음; 다시 입력한 값 재전송과 문서 문구를 7d87084f에서 반영
    • PR 코드 리뷰 2회차 (7d87084): 8건; 6건을 ceae33e1에서 고침 (check/close 답에 config가 없어 설정 화면이 깨짐, 만들기 시트가 이전 프로젝트 답을 다시 읽음, 비운 숫자가 0으로 감, 폼 입력 유실, 받아들여진 답 재전송, 사라진 Factory의 Task 로딩); 2건 Follow-up
    • PR 코드 리뷰 3회차 (ceae33e): 10건; 7건을 edd3e432에서 고침, init probe는 변경 없음, 2건 Follow-up
    • 977/986 수정 후속 리뷰 (11b2af7): Fix now 2건 (스냅샷마다 그래프 배치가 열 배치로 돌아감, 거절된 배치를 스냅샷마다 다시 물음) 모두 a1965fc, 6c8f90fb에서 테스트와 함께 고침; Follow-up 4건은 위 목록
    • main(Name the core's own machine by its node id and convert stored state once #664) 병합 뒤 후속 리뷰 (9ed33d7): 병합에서 찾은 만들기 시트의 "local" 필터를 9ed33d70에서 고침; 그 밖의 결함 없음
    • main(Move the core's machine work behind the node link (core-host-node 2a) #692, node link) 병합 뒤 후속 리뷰 (7e018cc, 563c1a5, 마지막): 결함 없음; Factory 시계의 시간대 읽기를 2b가 옮길 기기 일로 경계 검사와 ARCHITECTURE에 적음 (563c1a5)
  • Evidence: 41 registered (11 file, 22 screenshot, 8 log); paths are local to the run directory
    • agents/runs/software-factory-ui/qa/native/RECORD.md
    • agents/runs/software-factory-ui/qa/native/ko-light-graph.png
    • agents/runs/software-factory-ui/qa/native/ko-light-graph-right.png
    • agents/runs/software-factory-ui/qa/native/ko-dark-board.png
    • agents/runs/software-factory-ui/qa/native/en-light-turn.png
    • agents/runs/software-factory-ui/qa/native/en-dark-settings.png
    • agents/runs/software-factory-ui/qa/native/ko-dark-settings.png
    • agents/runs/software-factory-ui/qa/native/ko-light-task-T-9.png
    • agents/runs/software-factory-ui/qa/native/en-dark-task-T-1.png
    • agents/runs/software-factory-ui/qa/native/status.json
    • agents/runs/software-factory-ui/qa/native/facts.json
    • agents/runs/software-factory-ui/qa/design-review/states/light-1440-long-x1.png
    • agents/runs/software-factory-ui/qa/design-review/states/dark-1440-long-x1.png
    • agents/runs/software-factory-ui/qa/design-review/report.md
    • agents/runs/software-factory-ui/qa/native/CORRECTION.md
    • agents/runs/software-factory-ui/qa/b25/RECORD.md
    • agents/runs/software-factory-ui/qa/b25/b25-matched.json
    • agents/runs/software-factory-ui/qa/b25/run1.json
    • agents/runs/software-factory-ui/qa/b25/b25-idle.json
    • agents/runs/software-factory-ui/qa/b25/idle-frames.json
    • agents/runs/software-factory-ui/qa/b25/zz-b25-matched.spec.ts.txt
    • agents/runs/software-factory-ui/qa/b25/zz-b25-idle.spec.ts.txt
    • agents/runs/software-factory-ui/qa/native2/RECORD.md
    • agents/runs/software-factory-ui/qa/native2/CORRECTION.md
    • agents/runs/software-factory-ui/qa/native2/facts.json
    • agents/runs/software-factory-ui/qa/native2/ko-light-graph.png
    • agents/runs/software-factory-ui/qa/native2/en-dark-graph.png
    • agents/runs/software-factory-ui/qa/native2/ko-light-graph-right.png
    • agents/runs/software-factory-ui/qa/native2/ko-light-task-T-3.png
    • agents/runs/software-factory-ui/qa/native2/ko-light-task-T-1.png
    • agents/runs/software-factory-ui/qa/native2/ko-light-turn.png
    • agents/runs/software-factory-ui/qa/native2/en-light-graph.png
    • agents/runs/software-factory-ui/qa/native2/ko-dark-graph.png
    • agents/runs/software-factory-ui/qa/review/merge-664-review.md
    • agents/runs/software-factory-ui/qa/native3/RECORD.md
    • agents/runs/software-factory-ui/qa/native3/facts.json
    • agents/runs/software-factory-ui/qa/native3/ko-light-graph.png
    • agents/runs/software-factory-ui/qa/native3/en-dark-graph.png
    • agents/runs/software-factory-ui/qa/native3/ko-light-turn.png
    • agents/runs/software-factory-ui/qa/native3/en-dark-create-projects.png
    • agents/runs/software-factory-ui/qa/review/merge-692-review.md
  • Changed paths: 634 (see Files changed)

yansfil added 30 commits October 7, 2026 10:09
…endency layout with a transitive reduction step
…heet and settings, with the sidebar place, secretary row, Open Factory command and Overview split
…iew target, and widen the Factory number fields
…the engine's codes, and build the create sheet's GitHub step on the preview
…ns, take screen actions as one strict factory_action event, and remember the secretary pane
…es, with judgments answered by the fixture provider
Each row's help text went through the shared settings row bare, so it took
the page's body size and color and read larger than the row's own label;
it now uses the settings note every other settings tab uses.
The chain's middle node drew a plain circle in the state's tone, so a done
Task showed an open circle between two done neighbours. It now draws the
icon the board, graph and chain cards draw for the same state, and the
Screen / Factory sheet draws the running Task's node the same way.
The page was read again only when the summary moved or the screen acted, so
a worker's decision, a comment from the CLI or a running attempt's growing
log tail stayed off an open page until something else moved the summary.
The engine thread now marks the page after each command and tick; the
publisher still hands over only a page that changed.
…ning column, and finish late answers

From the review of the Factory screens:
- The create sheet shows the stage a failed project check stopped at and the
  engine's next action as written (gh auth login for a logged-out gh); the
  init_failed label no longer points at the origin remote.
- When the engine refuses the sheet's own CI pick because the repository
  requires no checks, the sheet picks the detected commands, or none.
- Factory 닫기 is disabled while the Running column holds any Task, as the
  engine refuses then, not only while one runs.
- A request unanswered after 20 seconds still takes the engine's late answer,
  and its line says the Factory may still finish it.
- A notice's result line shows for its first choice, since it has no
  suggestion.
- The secretary's pane is remembered once a tab lists it; a refused or
  unanswered start ends without starting anything and goes to the log.
- The screen path's busy refusal is spelled out and labelled, so the labels
  test holds the screen to it.
- Unit tests for each, a request view exclusion test for Factory workers, and
  the request view's line back to the Factory in the end-to-end turn test.
An unlisted pane is refused, the listed one is kept, survives a restart,
and a UI-state file written before the field existed loads with none.
…own request, and put back a number the field cannot take
… cue shortened text, and drop the Korean particle fallback
…sk once for a refused one, and cue a shortened goal
@yansfil yansfil changed the title Show the Software Factory in Hide: my turn, board, graph, Task page, create and settings Ship software-factory-ui Oct 7, 2026
@yansfil
yansfil merged commit a612a7d into main Oct 7, 2026
20 checks passed
@yansfil
yansfil deleted the prd/software-factory-ui branch October 7, 2026 15:48
yansfil added a commit that referenced this pull request Oct 7, 2026
Related: PRD `agents/prd/codex-plan-approval-hold/prd.md` (local). The
reviewable contract is below.

## Summary

- Codex CLI가 plan 모드에서 "Implement this plan?"을 띄운 채 기다릴 때, 편지 종이 Enter를
쳐서 첫 항목 "Yes, implement this plan"을 골랐습니다(2026-10-07 실측 3/3). 운영자가 승인하지
않은 계획이 구현되기 시작했습니다.
- 이제 hide는 이미 읽는 Codex 세션 파일(rollout)의 턴 기록(`task_started`의 plan 모드,
Plan 항목, `task_complete`)으로 계획 승인 대기를 알아내고, 그동안 종을 보류 사유
`awaiting_operator`로 치지 않습니다.
- 같은 동안 그 Codex 행은 기존 승인 대기(approval demand)로 Needs You에 남고, 읽어도 빠지지
않으며, 다음 턴이나 사람의 메시지가 오면 빠집니다. wire와 web 변경은 없습니다.
- 판정은 Hide AI 분석이 아닌 결정적 사실이라 요약을 꺼도 같고, 읽은 Herdr `state_change_seq`에 묶여
지금 상태에 대해 읽지 못한 Codex pane은 `session_unread`로 종을 보류합니다. Claude Code
pane은 그대로입니다.
- 문서: `docs/delivery.md`, `status-model.md`, `UI_BEHAVIOR.md`,
`ARCHITECTURE.md`, 성능 ledger.

![Live: a real Codex CLI at "Implement this plan?" (Herdr reads idle)
sits in Needs You with the ! approval
mark](https://github.com/yansfil/pr-assets/blob/main/hide/codex-plan-approval-hold/84e189e/live-needs-you.png?raw=true)

![Playwright e2e on the pinned Herdr: a rollout whose plan turn ended
puts the Codex row in Needs
You](https://github.com/yansfil/pr-assets/blob/main/hide/codex-plan-approval-hold/84e189e/e2e-needs-you.png?raw=true)

## Review

- **판단해 주세요**: Herdr가 Codex의 `task_complete` 기록보다 먼저 정지 상태를 읽으면, 그 상태에서는
종만 보류되고 Needs You는 다음 상태 변화까지 뜨지 않습니다. 재읽기를 더하지 않았습니다(PRD B10).
- **판단해 주세요**: "No, stay in Plan mode"는 세션 파일에 아무것도 쓰지 않아서, 행이 다음 턴까지
Needs You에 남습니다.
- **판단해 주세요**: 세션 파일을 못 찾는 Codex pane(최근 7일 폴더 밖), 그리고 label generator
lock이 없는 daemon(같은 Herdr를 따르는 두 번째 hided, 재시작이 겹친 뒤 최대 30초)에서는 Codex 종이
보류됩니다.
- **조심해서 볼 파일**: `herdr-core/src/delivery/doorbell.rs` `judge` - failure
path. 모름을 "대기 없음"으로 읽지 않습니다.
- **조심해서 볼 파일**: `herdr-core/src/labels/overlay.rs` `waiting`,
`labels/{worker,store}.rs` - seq 묶음과 serde 기본값으로 저장되는 새 필드.
- **조심해서 볼 파일**: `herdr-core/src/session_sync/coordinator.rs` - runtime
mutex. overlay를 lock 밖에서 먼저 만들고 두 경로 모두 `observe_delivery`에 넘깁니다(main
#743과 merge 해결 지점).
- **조심해서 볼 파일**: `hide-session/src/turns.rs` - 대기를 언제 안다고 볼지 정하는 match.
- **비용 검토**: 세션 읽기는 라벨 작업이 이미 하는 상태 변화 시 증분 읽기에 실리고, 새 파일 읽기, 프로세스, lock
안 I/O는 없습니다.

## Evidence

- **확인한 것**: sealed verify S1 `cargo test --workspace`, S2 lint
PASS(merge head 267aad3). 첫 두 시도는 base에서도 실패하던 pane process 테스트 때문이었고,
main의 #743 수정으로 대체됐습니다.
- **확인한 것**: `hide-session` 계약 테스트가 합성 Codex 0.160.1 계획 턴 표본으로 대기 시작, 다음
턴, 사람 메시지, aborted 턴, 질문으로 끝난 plan 턴, 모르는 형식, 증분 읽기와 rescan을 확인합니다.
- **확인한 것**: core 테스트가 seq 묶음(이전 seq의 사실은 보류), 모름은 보류, 끝나지 않은 일반 턴은 울림,
요약 꺼짐, 재시작, 필드 없는 기기 helper, Claude Code 불변을 확인합니다. merge 뒤 focused
herdr-core 298/298을 3회 돌렸습니다.
- **확인한 것**: Playwright `codex-plan-approval.spec.ts`가 고정 Herdr와 hided
위에서 계획 대기 rollout이 행을 Needs You로 넣고, 다음 턴 기록과 상태 변화가 빼는 것을 확인합니다. 심은
결함에서 실패하는 것도 확인했습니다.
- **확인한 것**: 격리 live(private socket의 고정 Herdr 0.9.3, private HOME, 이
브랜치의 hided 1560a90, 로그인된 Codex CLI 0.160.1, hooks 꺼짐): Herdr가 계획 메뉴를
`idle`로 읽는 동안 편지가 `awaiting_operator`로 한 번 기록되고 보류됐으며, 키 입력 0회, 메뉴
그대로였습니다. 승인 뒤 다음 턴이 끝나자 종이 한 번 울렸습니다.
- **확인한 것**: Herdr는 계획 메뉴를 remote Codex manifest 2026.10.01.1에서는
`idle`로, 번들 2026.09.23.1에서는 `unknown`으로 읽습니다(문서에 manifest별로 적음).
- **확인하지 못한 것**: B1 race 경우의 live 재현, 기기 pane live, 계획 대기 중 hided 재시작
live, 운영자의 실제 Codex hook 구성(live는 hooks를 끄고 세션을 직접 보고함).
- **확인하지 못한 것**: live 검증이 `~/.codex/sessions`에 Codex rollout 3개를
남겼습니다(설정 변경 없음).

AI tooling: native review subagents read the diff; their findings and
dispositions are in the record below.

<details><summary>Verification record</summary>

- PRD: `agents/prd/codex-plan-approval-hold/prd.md` (sha256
e67aa258a404f1a493a93eec74933e5324e0fcbccbbf40ab605b23e78d819012)
- Base 9f14487 → head 267aad3, verified 2026-10-07T15:55:58.411Z: PASS
- Verification report:
`agents/runs/codex-plan-approval-hold/verification-report.json` and
`agents/runs/codex-plan-approval-hold/verification-report.md`; source
fingerprint
f5b5d1bca59a1702fd81feceebf3c2c3946c71d2f7d3503bac7eb4d8b6b4cf14
- Suites:
  - S1: GREEN `bash scripts/verify-cargo.sh test` (exit 0)
  - S2: GREEN `bash scripts/verify-cargo.sh lint` (exit 0)
- Reviews:
- Fidelity (1560a90, follow-ups to 6ab4ea3): Fix now - an unknown record
format read as "nothing waits" (fb939cc, 6c96181); fixed.
- Code (1560a90, follow-ups to 6ab4ea3): Fix now - bell kind mapping
disagreed with the session-read kind (5c9342b), approving Enter not
counted as the operator's submit at `unknown` (1bd5647), e2e negative
check proved nothing (c6c9e75); fixed. A re-read of unsettled turns
(8ad7ab8) was reverted (9c0f057) under PRD B10.
  - Security (1560a90, follow-ups to 6ab4ea3): no open Fix now.
- Code, merge resolution only (84e189e): no Fix now. 267aad3 is a
conflict-free merge of main (#708) on top, verified again.
- Observer read of the doorbell verdict, the seq binding and both
coordinator call sites (6ab4ea3): no Fix now.
- Follow-up improvements: per-pane head-of-line letter judging (predates
this diff), Codex sessions outside the seven newest day folders hold
forever, turn_id length cap, phone reply typing Enter on a plan row.
- Evidence: 8 registered (1 log, 3 file, 4 screenshot); paths are local
to the run directory
  - agents/runs/codex-plan-approval-hold/evidence/live/core.jsonl
-
agents/runs/codex-plan-approval-hold/evidence/live/delivery-ledger.json
  - agents/runs/codex-plan-approval-hold/evidence/live/labels.json
-
agents/runs/codex-plan-approval-hold/evidence/live/needs-you-idle-plan-menu.png
-
agents/runs/codex-plan-approval-hold/evidence/live/needs-you-unknown-status.png
  - agents/runs/codex-plan-approval-hold/evidence/live/README.md
-
agents/runs/codex-plan-approval-hold/evidence/e2e/codex-plan-approval-waiting.png
-
agents/runs/codex-plan-approval-hold/evidence/e2e/codex-plan-approval-approved.png
- Changed paths: 29 against main (more against the run start base
9f14487, which includes main merged in)

</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