Repository navigation
Run project Tasks as a DAG through a local Software Factory (stage 1: engine and hide factory) - #682
Merged
Merged
Conversation
The crate's public values (Factory, Task, card, states, questions, discoveries, config with the D-30 defaults), the SQLite store schema, the dependency graph helpers, the worker/operator role table, the judgment feature ids with their inputs, prompts and schemas, the hide factory command and answer contract, the adapter traits the engine is generic over, and FactorySummary, the value stage 2 draws.
…verification, merge and revert The engine owns every Factory on the machine and moves Tasks on commands, letters and ticks: intake review, issue creation, slot scheduling by priority then age across Factories, worker questions and discoveries, verification with the failure limit, pre-merge checks, human gates, auto and manual merge, main-break revert of the first failing merge, outside work, environment holds and cascades, watch warnings and retention. Recording fakes and an injected clock drive 40 engine tests.
… fields Local git and gh adapters serve every Factory on the machine and choose by source; each write converges on its intent key (issue marker, head branch, merged state, forced label). The verify runner runs one bundle on the machine at a time with a time cap, owns each command's process group and keeps the last 1 MiB of output. The summary gains the full dependency set, worker panes, revive deadlines, archive folds and inbox result lines, and show answers a typed TaskDetail.
The core starts a Factory host thread beside the delivery worker. It owns the engine, ticks it, delivers worker letters through the ledger, and judges with its own provider queue. Each Factory is a code-owned mailbox recipient factory:<id>; only the host sends as it, a pane may only send to it, and a pane or registration under a factory: name is refused. hided forwards hide factory commands over the pane capability socket, and the session guidance names hide factory add.
A worker whose agent has not shown a session yet holds its slot and is asked again every 30 seconds; after ten minutes the person is told to look at its pane. A refused start stops the Task with the runtime's reason instead of retrying every tick, and each retry is a new spawn intent. Before a Codex CLI start the Factory asks the kit to read the machine. A woken worker gets its letters once its agent is back. The worker prompt names the hide program beside the daemon, and the watch no longer repeats what the inbox already shows.
docs/factory.md owns the engine, store, Task states, roles, the mailbox recipient, worker lifecycle, judgments, verification, merge, outside work, environment handling, configuration, the hide factory command and the read model the stage 2 screen draws. delivery.md, ARCHITECTURE.md, AI_PROVIDERS.md, agent-hooks.md and the documentation map point to it.
A commit with no check runs yet is pending rather than passed, the merge is pinned to the commit the last passing attempt verified, a verification time cap covers the whole command bundle, only environment failures of other Tasks clear a Task's own failure, and running checks on a commit are read again after 30 seconds rather than on every tick.
An approved prerequisite proposal makes the proposer depend on the new Task and give its slot back, as an autonomous one already did; cancelling answers the Task's open questions so none reaches the inbox or a deadline; the GitHub merge method prefers a merge commit, then squash, then rebase.
Worktree removal ran git from the folder above the worktree, which is outside the repository, so no finished Task's worktree was ever removed. It now resolves the main checkout and reuses the host's guarded removal. A Task an outside pull request merged frees its worktree too, a Task an outside pull request took is cleaned up after the keep period like a cancelled one, and both lose their local branch then (D-58).
A card or PRD added again while its Task runs rides on the scope change question and becomes the Task's card and next PRD version on approval; the worker gets the new card and the copy's path in the reply, and a newer re-add replaces a pending one. The test repositories no longer inherit the machine's commit signing setting.
A periodic user check reads each running Task's card when the watch interval comes due and only adds questions or marks; one that cannot be queued is logged, as nothing waits on it. Reaching a Task's new-Task cap reads the board like a finished Task or a main break does.
stall_minutes now sets the quiet window of each worker's watch: the host publishes each open Factory with its window and the watch readings carry it, so a change applies at the next reading. no_report_minutes, archive_fold_days, verify_failure_limit and autonomy_diff_limit gain keys. The delivery test fixtures name the new reading field.
Each judgment's input and output and each letter to or from a worker is kept in a records table, cut at 256 KiB and never deleted automatically (D-58). The unused log copy helper goes; a verification run already keeps its own last mebibyte. The guide describes this, the cleanup, re-add and prerequisite changes, cancelled questions and periodic checks.
init reads the path for Claude Code, then Codex CLI, and the first found becomes the default runtime (D-45); the preview shows it.
A runtime whose usage row or bucket shows a used-up window is parked until its reset: new starts go to the other runtime, and a worker that stops without a report while limited waits for a slot rather than stopping (B58). The engine now asks the adapter, which it never did.
An operator's show of a done Task marks it seen, as answering its notice already did; a worker reading it does not.
A worker start waits for Herdr to make the worktree and start the agent, which held every command and worker report behind it for up to ten seconds in the live run; a report must be recorded within a second (B23). Starts now run on a starter thread with a bounded queue: the engine keeps the slot, asks again on the next tick, and a start the engine gave up on while it ran is ended when it arrives.
…ed merge commit or a held issue past the list
…read a pending or broken main at a paced interval
…tes without a recorded approval The init preview names the gh login, the repository and every GitHub read and write the Factory makes; --confirm records that approval in the Factory and its history, and the gh adapter refuses every write to a Factory that carries none.
…instead of raising it
CardView gains waiting_code, waiting_on, env_hold and stop; InboxItem gains result_code, unblocks, gates, stop and remaining_hours; TaskDetail gains gate_codes and stop_code. The environment hold is kept as a code too. Every code enum has an ALL list pinned by its wire value.
…, and say which summary sentences have codes
…ependency and watch references within their Factory
…in when a worker stops
… machine only when a runtime can start, and report a failed revert abort
yansfil
added a commit
that referenced
this pull request
Oct 7, 2026
… link (#687) ## Summary 터미널에서 `PR #682 (https://github.com/o/r/pull/682)이 끝났습니다`처럼 URL 뒤에 닫는 괄호와 한국어 조사가 붙으면, 마우스를 올렸을 때 `)이`까지 링크로 잡혀 클릭하면 `/682)%EC%9D%B4`로 열렸습니다. 닫는 괄호 뒤 조사를 문장으로 읽는 유한 규칙이 경로 후보에만 있었고 URL은 그 단계를 건너뛰었기 때문입니다. 이제 URL도 같은 규칙을 탑니다. URL은 디스크처럼 확인할 수 없으므로 닫는 괄호 뒤 조사는 항상 문장으로 보고, 닫는 괄호 없이 붙은 한글(`.../wiki/서울이`)은 기존대로 자르지 않습니다. 규칙은 `parseToken`에 있어 터미널 링크와 요청 뷰가 함께 고쳐집니다. ``` before: PR #682 (https://github.com/o/r/pull/682)이 끝 -> 링크 https://github.com/o/r/pull/682)이 after: PR #682 (https://github.com/o/r/pull/682)이 끝 -> 링크 https://github.com/o/r/pull/682 ``` ## Review - **판단해 주세요**: URL 끝의 `)이`·`)에서` 같은 조합을 항상 문장으로 읽습니다. 실제로 `)이`로 끝나는 URL은 더 이상 그 꼬리까지 링크되지 않습니다. - **조심해서 볼 파일**: `web/src/terminalLinks.ts` - 링크 후보는 포인터가 행에 올 때마다 계산되는 경로입니다. URL 토큰에서만 정규식 한 번과 `strip` 한 번이 더 돕니다. ## Evidence - **확인한 것**: 스크린샷 문장 그대로의 회귀 테스트가 수정 전 코드에서 실패하고 수정 후 통과합니다. 밑줄 범위가 URL 칸(9-40열)만 덮는 것까지 확인합니다. - **확인한 것**: `scripts/verify-web.sh web typecheck|lint|test` 통과(1165 passed, 1 skipped), `node scripts/check-design-contract.mjs` 통과. - **확인하지 못한 것**: 패키징한 앱에서 실제로 마우스를 올려 보는 확인은 하지 않았습니다. 파서 단위 테스트가 xterm에 넘기는 범위를 직접 검사합니다.
This was referenced Oct 7, 2026
yansfil
added a commit
that referenced
this pull request
Oct 7, 2026
…#692) Related: core-host-node 2a/5 (항상 켜진 노드에서 core 돌리기). #664(병합됨, ed64668) 다음 layer입니다. base는 main입니다. ## Summary core(`herdr-core`)는 결정과 상태만 갖고, 기계를 직접 만지지 않게 했습니다. 파일, 프로세스, Herdr 소켓, 세션 파일은 node의 일이고, core는 계약 하나(`NodeLink`, 새 crate `hide-node-link`)로 node id를 지정해 묻습니다. 이 PR에서는 core 자신의 node(`hide_node::Local`, hided 프로세스 안)가 모든 호출에 답합니다. 화면과 동작은 바뀌지 않습니다. - core가 하던 git, `gh`, hide-ai, 포트, agent sleep, kit, 세션 읽기, clone, worktree, 문서 저장, 첨부, Herdr 연결이 `Call::*`로 node에 갑니다. - 카탈로그는 경로를 직접 읽지 않고, 재빌드 전에 lock 밖에서 node에 한 번 묻습니다(`Call::PathFacts`). 새 프로젝트도 node가 만듭니다(`Call::ProjectCreate`). - 링크 기록의 세션 파일 상태(있음/없음)도 node에 묻습니다(`Call::RealPaths`). node가 답하지 못하면 "알 수 없음"으로 둡니다. - hided의 파일 열기(opener)와 pane 자격 증명의 커널 증거, bootstrap 소켓은 `hide-node`로 옮겼습니다. - 탐색기 감시는 이 Mac과 device를 하나의 감시자로 합쳤습니다. 둘 다 node id로 그 node에 `Call::Stamps`를 묻습니다. - `scripts/check-core-touches-no-machine.py`가 core의 운영 코드에서 기계 접근을 막습니다. 예외 파일마다 허용 개수를 적어 두어, 예외 파일 안에 새로 생긴 접근도 실패시킵니다. policy lane에서 돕니다. ```text core(결정, 상태, 자기 저장소) --NodeLink(node id)--> node(파일, 프로세스, Herdr, 세션) 이 PR: core 자신의 node만, 같은 프로세스 안에서 답함 2b: SSH 위의 같은 계약, device helper가 hided node 역할로 합쳐짐 ``` ## Review - **판단해 주세요**: 탐색기 감시를 "옮기기" 대신 "합치기"로 했습니다. 이 Mac의 핸들 polling을 지우고 device와 같은 stamp 비교로 바꿨습니다. 200 ms poll과 200 ms 묶음 창은 그대로입니다. 이 Mac의 root는 boundary가 등록 때 확인한 identity로 고정합니다(목록 읽기와 같은 identity). 그래서 같은 경로에서 바꿔치기된 root는 목록과 감시 모두 거절합니다. device root는 helper가 바꿔치기를 알리면 다시 열고 감시 폴더를 모두 한 번 알립니다. - **판단해 주세요**: 카탈로그 행의 경로가 node의 비교 형태(실제 경로)입니다. 예전에는 pane에서만 보인 행이 이름 그대로(`/var/...`)였고, 등록 행만 실제 경로였습니다. 이제 둘 다 `/private/var/...`처럼 실제 경로입니다. - **조심해서 볼 파일**: `herdr-core/src/session_sync/coordinator.rs`, `runtime/session.rs` (high-frequency path, runtime mutex). 재빌드 전에 lock 밖에서 `PathFacts`를 묻고, 같은 경로 집합이면 30초 refresh까지 재사용합니다. coordinator가 카탈로그를 한 번 넘긴 runtime은 그 뒤 카탈로그 없이 들어온 session(닫기 상태 읽기 등)에서도 lock 안에서 node를 부르지 않고 마지막 답을 씁니다. coordinator가 없는 runtime(fixture, 첫 Herdr 응답 전)만 lock 안에서 자기 node에 묻습니다. - **조심해서 볼 파일**: `herdr-core/src/live.rs` 프로젝트 생성 (failure path). 폴더와 `git init`은 node가 하고 실제 경로를 답합니다. 등록은 그 경로로 합니다. - **조심해서 볼 파일**: `hide-project/src/lib.rs` (failure path). 저장소 안의 HEAD, ref, 포인터 파일, config를 regular file로만, 링크를 따라가지 않고, pipe에서 막히지 않게 열고 크기 상한(포인터 64 KiB, config 1 MiB)을 둡니다. pane 안의 프로세스가 `.git/config`를 pipe로 바꿔도 카탈로그가 멈추지 않습니다. - **조심해서 볼 파일**: `hided/src/watch.rs` (high-frequency path). 이 Mac 감시는 200 ms마다 in-process `Call::Stamps` 한 번(폴더 최대 64), device는 2초마다 한 번, 실패한 poll은 어느 쪽이든 2초 뒤에 다시 묻습니다. 답한 link는 poll 사이에 재사용해서 매 poll마다 core owner thread를 거치지 않습니다. - **조심해서 볼 파일**: `hided/src/env.rs` (failure path). 상대 경로 `HERDR_SOCKET_PATH`는 시작 때 `HERDR_SOCKET_PATH: invalid`로 거절합니다. 예전에는 연결은 됐지만 pane 증명이 조용히 checkout binding으로 내려갔습니다. - **비용 검토**: 카탈로그 재빌드 1회당 node 호출 1회(경로 4,096개 단위), 경로 집합이 그대로면 30초에 1회. lock 안에서는 node를 부르지 않습니다(테스트가 호출 수 0을 확인). 감시는 대기열 없이 직전 답을 기다린 뒤 다음 poll을 합니다. - **조심해서 볼 파일**: `herdr-core/src/worktrees.rs` Git watch (high-frequency path, failure path). 감시 대상이 바뀌면 새 감시를 시작하되, 새 감시가 `Watching`을 알릴 때까지 옛 감시를 유지해 두 집합에 모두 있는 저장소는 감시가 끊기지 않습니다(main은 저장소마다 watch/unwatch해서 틈이 없었습니다). 감시가 끝나거나 시작하지 못하면 30초 뒤 다시 시작하고, 다시 감시가 시작되면 모든 프로젝트를 한 번 다시 읽습니다. 시작 실패는 매번 다시 묻지 않고 30초 간격으로 다시 시도합니다. - **조심해서 볼 파일**: `hide-node-link/src/protocol.rs` (snapshot wire 아님, node 프로토콜). 2a가 node 호출 38개를 더해서 `PROTOCOL_VERSION`을 22로 올렸습니다(main의 #656이 공유 서버 끄기로 21을 먼저 썼습니다). 이 빌드의 helper를 아직 받지 않은 device는 Hello에서 거절되고, 새 payload의 digest가 달라서 다음 연결에서 새로 설치됩니다. - **B1 예외로 적은 테스트 수정**: 이미 있던 테스트 `a_commit_in_one_project_does_not_rerun_status_in_another`, `moved_remote_ref_refreshes_one_project_once_after_a_burst`, `idle_and_working_tree_edits_do_not_reread_but_manual_refresh_does`와 helper `changes_before_sentinel`을 고쳤습니다. 저장소를 만들 때의 Git 쓰기(`symbolic-ref`)와 sentinel 자신의 늦은 쓰기가 감시 시작 뒤에 도착해 측정에 섞였기 때문입니다. 단언(프로젝트별 `git status` 횟수 1과 0, `behind_upstream`)은 그대로이고, 측정 전에 sentinel로 정리하고 이미 시작된 읽기를 기다립니다. main의 고치지 않은 테스트에도 같은 경쟁이 있는지는 돌려보지 않았습니다(같은 `Repository::new` 구조라서 있을 것으로 추정). - **질문**: hided에 남긴 것은 자격 증명 registry(`pane_auth.rs`, 증명은 이 프로세스에서 `hide_node::pane_proof`로 읽음)와 감시자 스케줄러(`watch.rs`)입니다. registry는 layer 4에서 node 역할 hided가 link로 보내는 증명을 받도록 바꾸려 합니다. 괜찮을까요? - **질문**: 파일 열기의 안전 규칙(`server.rs::openable`, 실행 파일과 handler가 실행하는 파일 거절)은 hided의 open handler 곁에 남았습니다. 그 handler는 main에서 이미 연결되지 않은 코드(`#[allow(dead_code)]`)라서, 연결하는 변경이 규칙을 launcher 곁으로 옮기도록 문서에 적었습니다. - **질문**: core에 남은 기계 접근은 check에 이유와 개수로 적었습니다. SSH 전송(`remote.rs`, `remote/`, `ssh_hosts.rs`)은 2b, terminal attach child(`live.rs`)와 첨부는 layer 3, label generator lock은 layer 4입니다. AI 선택 파일(`hide_ai::settings`)은 core 저장소로 두었습니다. - **알려진 예외**: main이 이 PRD 뒤에 넣은 Software Factory 엔진은 이 PR 뒤에도 core의 기계에서 직접 일합니다. runner(`hide_factory::exec`, 경계 check가 이름으로 금지)가 git, `gh`(issue와 pull request 만들기, merge, rerun, `gh::allowed`가 덮지 않는 호출), 확인 명령(`/bin/sh -c`)을 돌리고, 버리는 Task의 worktree는 node의 확인된 삭제 대신 `hide_host::worktrees::remove_worktree`로 강제 삭제하고 `branch -D`합니다. 남은 디스크와 자기 실행 파일 위치도 직접 읽고, `hide-factory` crate는 프로젝트 파일(guide, `package.json`, `Makefile`)을 스스로 읽습니다(check가 보는 폴더 밖). 모두 main의 동작 그대로이고, `factory.rs`를 LATER_LAYERS에 2b 항목(15)으로 적었습니다. 2b가 이것을 모두 core 자신의 node로 옮기고 항목을 지웁니다(Observer 결정). `docs/ARCHITECTURE.md`에도 적었습니다. 이 PR에서 node로 가는 것은 Factory의 AI 판단(`factory_router`)과 worker pane 닫기입니다. - **main과 달라진 동작**: Factory의 판단 thread는 core가 사라지면(`Weak` upgrade 실패) 끝납니다. main은 홈의 AI 선택을 읽어 판단을 계속했지만, 답을 받을 core가 없고 node도 core가 줍니다. ## Evidence - **확인한 것**: `sasu implement verify` PASS on 98b6440(지금 head). S1 Rust 전체 suite, S2 lint, 격리 HOME과 긴 TMPDIR. - **확인한 것**: CI 전 lane 통과 on 5edb1b8(98b64402는 진행 중)(rust workspace, windows check, os contract 3종, web e2e linux 4/4, windows e2e, desktop e2e, package linux/windows). - **확인한 것**: 로컬 web e2e 205/206(새로 빌드한 hided, load 20 아래). 남은 1건 `agents-tab.spec.ts:46`은 이 Mac에 Homebrew로 설치된 OpenCode가 login shell PATH로 보여 "Installed 5"가 된 환경 차이입니다. 이 PR은 agent 탐지(`hide-kit/src/agents.rs`, `hide_platform::programs`)를 바꾸지 않았고 CI에서는 통과합니다. - **확인한 것**: Rust workspace nextest 2832/2833(load 15에서 19). 남은 1건 `opener_lifecycle acceptance_timeout`은 테스트 안의 경쟁(2초 수락 창과 가짜 helper의 pid 기록)으로, 단독 5/5 통과, 코드는 그대로 옮겼고 #664 tree에서도 같은 실패를 봤습니다. - **확인한 것**: Git watch 테스트의 간헐 실패 2종은 flake로 두지 않고 테스트를 고쳤습니다. sentinel 자신의 늦은 쓰기가 기준선에 섞인 것(d3eb073), 저장소 준비 때의 ref 쓰기(`symbolic-ref`)가 감시 시작 뒤에 도착해 다른 프로젝트 읽기를 먼저 깨운 것(5edb1b8, 측정 전에 sentinel로 정리). 고친 뒤 worktree behavior 테스트 전체 stress 30/30, Git watch 3건 40/40(고치기 전 1/24 실패). main의 `codex_trust` 시간 초과 1건(load 34에서 41)은 이 PR이 바꾸지 않은 테스트입니다. - **확인한 것**: lock 안에서 node를 부르지 않음. `reconciling_with_a_precomputed_catalog_runs_no_git`가 세는 node(`CountingNode`)로, 카탈로그를 받은 뒤 카탈로그 없는 session까지 호출 0을 확인합니다. - **확인한 것**: 링크로 들어간 checkout 아래 중첩 worktree를 구분하는 테스트는 예전 동작으로 되돌리면 실패하고 지금 통과합니다. 바꿔치기된 root 거절(boundary identity), 상대 socket 거절, pipe와 큰 config 거절, 세션 파일 상태(있음, 없음, 알 수 없음)를 단위 테스트합니다. - **확인한 것**: 경계 check가 심어 둔 위반, 예외 파일 안의 새 접근을 잡고, 이유가 사라진 항목을 실패시킵니다(`scripts/tests/test_core_touches_no_machine.py` 7건). clippy `-D warnings`, fmt, design contract 통과. - **확인한 것**: `PathFacts` 비용: 실제 worktree 경로 24개(저장소 1개)에 p50 2.8 ms, p90 3.1 ms, 최대 9.1 ms(debug 빌드, load 21에서 24). - **확인한 것**: 저장소의 `HEAD`와 config가 링크여도 main처럼 따라가 읽습니다(regular file, 비차단, 크기 상한은 유지). `a_linked_head_and_config_are_read_through_the_link`. - **확인한 것**: Git watch 인계와 끊긴 뒤 다시 읽기를 가짜 node로 단위 테스트합니다(`a_git_watch_restarted_after_it_ended_rereads_every_project`, `a_change_while_the_watched_set_changes_is_kept`). - **확인하지 못한 것**: 유휴/구동 측정은 2b에서 옮긴 reader와 함께 냅니다. `moved_remote_ref_refreshes_one_project_once_after_a_burst`가 다른 세션이 빌드하던 중 섞어 돌린 stress에서 1/20 한 번 15초 hang guard에 걸렸습니다. 어느 대기였는지는 남기지 못했고, 그 뒤 섞어서 40/40, 단독 30/30입니다. - **후속(2b)**: `RealPaths`의 상대 경로 하나가 묶음 전체를 실패시키는 것, `LinkAnswer` Debug의 비밀 가리기, stdio serve의 역할별 호출 허용 목록, gh argv 정확 일치, git 인자 검증, `Local::call` timeout, SSH link의 `call_with_progress`(진행과 취소가 있는 호출을 device에 보내기 전), 세션 읽기 호출의 경로 제한과 비차단 열기(main과 같은 동작), `PathFacts` 답 전체 크기 상한, Windows의 root identity 일치 테스트. - **후속(나중)**: 경계 check가 signature 안의 `;`(예: `[u8; 4]`)에서 test 항목을 일찍 끝내는 것(실패가 크게 나므로 숨지 않음), `test_ci_plan.py`의 `EVERY_PACKAGE` 하드코딩. <details><summary>Verification record</summary> - base: f422844 (#664 head, on origin/main 411f34a; `git merge-tree` against origin/main f5a9fe8 clean), head: 0b7a250 - sasu verify: PASS on 0b7a250(S1 Rust 전체 suite 344.9s, S2 lint; round 5 고침이 동작을 바꿔서 전체 verify). 그 전 PASS: 98b6440. 0b7a2506에서 workspace lint 통과, Git watch와 reader 테스트 45/45, kit, protocol, Factory 테스트 92/92, 경계 check 테스트 8/8. - sasu verify: PASS on 98b6440 (test 296.9s, lint 34.8s); earlier PASS on 5edb1b8 - CI on 5edb1b8: all success (package macos skipped on PRs) - local web e2e on 5edb1b8: 205 passed, 1 failed (environment: Homebrew OpenCode on PATH), 38.4m - reviews round 1 (e11296d4): Fidelity, Code, Security. Fix now 12건 처리: watcher를 boundary identity로 고정하고 실패 시 2초로 물러남(11ea411), Windows unix gate 2건(0c6ce78), 중첩 worktree를 최신 index로 읽고 lock 안 node 호출 제거(fc97795), 상대 socket 거절(6b193d2), Git 파일 읽기 상한과 비차단(4ce9d8b), 링크 파일 상태를 node에 묻고 check에 허용 개수(e497247, 2b3d36a), 문서 정정(58c3cce). 2b로 넘긴 것: stdio serve의 역할별 호출 허용 목록, gh argv 정확 일치, git 인자 검증, `Local::call` timeout. - reviews round 2 (6c7e832): Security 새 발견 없음. Fidelity: CI와 e2e 증거 요청, 이번 head에서 채움. Code: policy lane `test_ci_plan`(2b898fe), hide-host gh 테스트 unix gate(586528b), 쓰지 않는 `folder_stamps` 삭제(9664628), boundary identity 테스트가 바꾸기 전에 stamp(df6fbc4), ARCHITECTURE의 저장소 파일 읽기 규칙(ea84dd1), Git watch 테스트 2건(d3eb073, 5edb1b8). - reviews round 3 (5edb1b8): Security Fix now 없음. Fidelity Fix now 1: 고친 기존 테스트를 B1 예외로 기록(Review 절). Code Fix now 1: 측정 전 진행 중 읽기를 기다림(589e937). 받은 follow-up: 링크 HEAD/config(1e0a905), 대기 상한(589e937), 중복 gate 삭제(78356a5). - /code-review 1회차 (5edb1b8), 8건: protocol 21(96b411a), Git watch 인계와 끊긴 뒤 다시 읽기(4508968), 시작 실패 재시도 간격(4508968), doc 위치(78356a5) 고침. 받지 않음: 탐색기 200 ms poll(main도 200 ms poll), SSH 취소(2a에서는 device로 안 보냄, 2b), 경계 check `;`(이전 회차와 같음), 세션 경로 제한(main과 같음, 2b). - reviews round 4 (98b6440): Fix now 3건 처리. Git watch가 어느 감시에서 끊기든 다시 읽기를 한 번 빚지는 하나의 `owes_reread`(3aad696), Git watch 테스트는 읽기와 대기가 모두 끝난 뒤에만 정리(159706c), discovery가 regular HEAD만 받는다는 문서와 그 뒤 링크 읽기 테스트(41c4289). - reviews round 5 (d278df4, round 4 고침과 main #656, #682, #724, #725 위로의 rebase): Fidelity Fix now 1, Code Fix now 3, Security Fix now 1 처리. 옛 Git watch의 overflow도 다시 읽기를 빚게 함(6e39a90, 고치기 전 실패하는 테스트), `join_pending` doc 위치(7b1c446), 판단 thread의 동작 변화를 Review에 적음, Factory가 아직 직접 하는 일을 Review와 ARCHITECTURE에 적음(25e3e24). 받은 follow-up: 이름을 바꾼 runner 호출도 check가 잡음(fd1e21f), 이 기계의 공유 서버 끄기가 자기 node로 가는 테스트(94ce4d9, 막는 결함을 심으면 실패). 2b로: `hide-factory` crate 전체의 기계 접근과 store 개수 분리, Factory `gh` 쓰기와 느슨한 allowlist 정확 일치, search allowlist 테스트 위치, Git watch `collect`의 한 pass 안 경쟁, 발견 뒤 링크가 된 HEAD 테스트. </details>
yansfil
added a commit
that referenced
this pull request
Oct 7, 2026
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(#664, node id) 병합 뒤 만들기 시트가 `"local"` 대신 이 기기의 node id로 프로젝트를 고릅니다. - main(#692 node link, 그 뒤 #738 Herdr 0.9.3과 #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`를 그대로 담습니다.  ## 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가 말하지 않은 곳의 가정" 중 바꿔야 할 것이 있는지. <details><summary>PRD가 말하지 않은 곳의 가정</summary> - 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. </details> ## Evidence - **확인한 것**: 푸시한 머리 a9370ae(main #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, #692 병합 전, 1단계 Factory 사본, ko/en x Light/Dark): 완료 오늘 9, 보내기: ok, 그래프 layered 선 10개, T-3 줄임 표시, 만들기 시트 프로젝트 calc와 fixture; #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`가 씁니다. <details><summary>추가 증거</summary>     후속 개선: - 바깥 읽기 시각을 작은 별도 필드나 섹션으로 내보내, 시각 하나 때문에 요약 전체를 다시 보내지 않기; 엔진이 깨어날 때마다 요약을 다시 만드는 일도 함께. - 행동 답이 그 행동이 바꾼 요약보다 먼저 옴 (화면마다 보정 중); 요약을 먼저 내보내기, 답은 별도 섹션으로. - 큐가 가득 차 버려진 `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 전부터). </details> <details><summary>Verification record</summary> - 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 (#738 Herdr 0.9.3, #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(#664) 병합 뒤 후속 리뷰 (9ed33d7): 병합에서 찾은 만들기 시트의 `"local"` 필터를 9ed33d70에서 고침; 그 밖의 결함 없음 - main(#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) </details>
This was referenced Nov 10, 2026
HyunjunJeon
pushed a commit
to HyunjunJeon/hide
that referenced
this pull request
Nov 12, 2026
…ide#2379) ## Summary Hide가 옛 Herdr 세션을 자기 엔진으로 옮기던 기능(업데이트 때 자동 이동, 이동 질문 창, 기기 Herdr 정리)을 걷어냅니다. 읽기 전용 가져오기(온보딩 카드, 사이드바 줄, 설정 줄, `hide import herdr`)는 그대로 둡니다. v1.1.1 이하에서 올라오는 사용자는 Herdr 서버를 직접 멈춰야 하며, 그 밖의 잃는 것 둘은 `docs/INSTALL.md`의 "업데이트가 잘못됐을 때"에 적었습니다.    ## Review - **판단해 주세요**: 업데이트 때 이동이 사라져서 v1.1.1 이하 사용자가 잃는 것 셋을 운영자가 받아들이는지 (`docs/INSTALL.md`, "업데이트가 잘못됐을 때"). - **조심해서 볼 파일**: `hide-core/src/runtime/herdr_import.rs`, `hide-core/src/herdr_import.rs` (가져오기 기록의 옛 필드 읽기: `committed`, `not_stopped`), `hide-kit/src/record.rs` (옛 `herdr_hooks`와 `herdr:<agent>` 읽기), `hided/src/supervisor.rs`와 `hided/src/lib.rs` (재시작 신호 이름). - **결정**: `ImportAction::Move`는 제거하지 않고 항상 거부합니다. 가져오기 시험이 `act("move")`의 거부를 그대로 확인하기 때문입니다. - **결정**: 재시작 신호는 `ImportRestart`(`import_restart`)로 이름만 바꿨습니다. 가져오기 뒤 코어 역할을 다시 시작하는 데 여전히 필요합니다. - **가져오기 시험 변경(운영자 승인 범위)**: `device.rs`의 기기 가져오기 시험 도우미 `device()`에서 움직임 입력을 뺐습니다. 시험 `a_device_save_hide_never_used_is_only_offered`는 `a_device_save_is_only_offered_until_asked`로 이름을 바꾸고 가져오기 기준으로 다시 썼습니다. `hided`의 `a_save_hide_never_used_is_offered...` 시험은 움직임 시작 줄을 뺐습니다. 나머지 가져오기 시험은 한 줄도 고치지 않았습니다. - **지운 시험(움직임)**: core runtime `a_running_hide_herdr_is_asked...`, `a_herdr_that_could_not_be_stopped...`, `a_device_s_save_is_offered_under_its_name...`; core `a_commit_stands...`(옛 기록 읽기 시험으로 대체); device `a_device_whose_hide_herdr...`, `a_device_move_stops...`, `a_device_herdr_that_would_not_stop...`, `a_device_herdr_started_again...`; hided `a_device_s_asked_move...`, `hide_s_own_stopped_session_moves...`, `an_update_that_fails_after_the_move...`; host `herdr_save` 정지 시험과 스탠드인 도우미; host `kit` 기기 Herdr 사본 시험과 도우미; kit `tests/herdr_cases.rs` 파일 전체; agent-hooks 통합 시험. - **남긴 가져오기 시험(한 줄도 안 고침)**: core runtime `a_save_no_hide_herdr_runs...`, `an_unreadable_save_shows_why...`, `a_move_s_left_out...`, `a_core_without_its_own_engine...`, `waiting_conversations...`, `a_cut_agent...`; host `importable.rs` 전체; hided `a_herdr_started_again...`, `an_unreadable_save_is_shown_with_why`. - **옛 기록 읽기 시험(새로 추가)**: core `an_earlier_records_commit_mark_and_not_stopped_result_still_read`, kit `a_record_with_an_earlier_builds_herdr_hooks_still_loads`, `forgetting_an_earlier_herdr_piece_keeps_the_others`. - **프로토콜**: `PROTOCOL_VERSION` 94 -> 95, `Call::HerdrStop` 제거. - **웹**: 이동 질문 창, "n개 옮기지 않음" 줄, 이동 문구와 `move` kind 제거. 가져오기 줄은 `import` kind만 씁니다. `contracts/snapshot-wire-enums.json`은 이 kind를 고정하지 않아 바뀌지 않았습니다. ## Evidence - **확인한 것 (이 PR의 마지막 두 커밋 기준)**: `cargo check --tests`로 hided, hide-core 통과. 필터된 nextest: hide-core 396건(herdr·device·import), hided 50, hide-kit 121, hide-host 33, hide-node-link 11, hide-agent-hooks 106 전부 통과. `fmt-check` 통과. 웹 `typecheck`, `lint`, `HerdrImport.test.tsx` 6/6 통과. - **캡처**: 사이드바 줄과 설정 줄은 격리 후보 앱(빈 `HIDE_STATE_DIR`, Herdr 픽스처, 가짜가 아닌 실행 중 hided)에서 찍었습니다. 첫 실행 가져오기 카드는 후보 앱에서 재현하지 못해 gallery 장면 캡처이며, 운영자가 장면 캡처를 증거로 받아들이기로 했습니다. - **확인하지 못한 것**: 전체 nextest와 전체 web vitest, 이 PR의 CI 전체 lane(main의 `read-across-restart` 시험은 known flaky with-hide#682), 실제 Herdr 세션을 쓴 가져오기 흐름, 첫 실행 카드의 후보 앱 캡처.
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: stage 2 (the Factory screen) stacks on this branch and reads
FactorySummary, which this PR fixes as its contract.Summary
Stage 1 of the Software Factory: a local engine inside hided that takes Tasks with a card, runs them as a DAG with real Claude Code and Codex CLI workers in their own worktrees, verifies, merges and reverts, and asks a person only where the person decides.
The new
hide-factorycrate holds the engine, the store (SQLite in the state folder), the git,ghand verify adapters, the judgments and the stage 2 summary;herdr-coreruns it on a host thread as the code-owned recipientfactory:<id>.hide factory(init, add, status, show, inbox, answer, ask, block, propose, done, decide, config, priority, dep, pause/resume/retry/merge/cancel/revive, request-changes, check, close) is the stage 1 interface, anddocs/factory.mdis its guide.A GitHub Factory shows the
ghaccount, the repository and every read and write before--confirm, records that approval, and writes nothing to GitHub without it.Every sentence the summary carries has a code beside it, so stage 2 can label in any language.
No screen changes.
Review
ghlogin orfactory.repoaftergh auth switch.dep remove; should cancel release or flag them?herdr-core/src/factory.rs- the host and starter threads; the runtime lock is taken only for owned reads.herdr-core/src/runtime/factory.rs- caller authority from the agent lineage (worker vs operator).hide-factory/src/engine.rs- merge state (unnamed merges, retries, gates) and the failure paths.hide-factory/src/project.rs- everyghand push call; writes gated on the recorded approval.Evidence
verify-cargo.sh testandlintpass on the merged head 3988c4e (the required suite).factory statusround trip idle p50 32 ms max 165 ms; driven p50 33 ms p95 138 ms max 250 ms.ghonly; no real repository.--no-daemon.Commits by scope
hide-factoryinterfaces, the engine (states, DAG, verification, merge, revert), the adapters and the summary.hide factorycommand, slow and refused starts, the watch, caller checkout default.docs/factory.mdand the owning guides.ghaccount, repository and GitHub reads and writes;--confirmrecords the approval.Review dispositions and follow-ups
Five review rounds (fidelity, code, security, then one follow-up); every Fix now item is fixed with a test that fails without it.
Disclosed limits:
Err(starting)can leave its pane and worktree; the agent there can only read.hide agent end; a closed pane's un-ended ancestor lends its pane id until purge.Follow-ups:
--force.premerge_passedsurvives request-changes and rebase; a capped unnamed merge may land later without a record.statusprints the outside read time as raw milliseconds.codex_trust a_codex_that_does_not_answer...andopener_lifecycle acceptance_timeout....Verification record
agents/prd/software-factory/prd.md(sha256 60bb919bf90228f6b45ca73a66806496c0ed9adf7b5018276b94f610f5a7bb2d)agents/runs/software-factory/verification-report.jsonandagents/runs/software-factory/verification-report.md; source fingerprint 2713b30800f283a95de01d10ffe669d1662f3fbd48ea93c60c6b04ae1fb7d38cbash scripts/verify-cargo.sh test(exit 0)bash scripts/verify-cargo.sh lint(exit 0)