Repository navigation
Factory가 pane을 닫으며 잠드는 Pi와 omp 작업자를 재우고 새 pane에 다시 묶지 못한다 - #873
Merged
Merged
Conversation
yansfil
added a commit
that referenced
this pull request
Oct 9, 2026
…output cap (#891) ## Summary CI가 초록인데 Factory Task가 `검증 중`에서 끝나지 않던 원인을 고칩니다 (운영 Factory의 T-1 #872, T-2 #873). check-runs 읽기가 run 전체(하나에 약 3.5 KB)를 받았고, node는 명령 출력을 64 KiB까지만 남깁니다. check run이 20개인 PR은 답이 약 71 KB라 잘렸고, 잘린 JSON은 파싱에 실패했습니다. CI poll은 신호 없는 오류를 `pending`으로 읽었고, 2초 tick마다 다시 물었습니다. - 읽기는 `gh api --paginate ... --jq '.check_runs[] | {name, status, conclusion, html_url}'`로 run마다 한 줄(약 180 B)만 받습니다. - 결정을 못 낸 읽기는 오류를 포함해 30초 간격으로만 다시 묻습니다. - 읽지 못한 답은 새 poll 결과 `Unread`입니다. 아무것도 결정하지 않고 실패로 세지 않으며, 한 run에서 세 번째면 Task에 notice를 남깁니다. - restart가 검증을 다시 시작할 때 앞에 남은 미완료 attempt를 `cancelled`로 닫습니다 (T-2처럼 `running`이 둘 남은 기록). - 작은 결함: `hide factory config`의 답에 `settable`(`disk_floor_gb` 같이 `--set`이 받는 키와 단위)을 더하고, 모르는 키는 그 키와 받는 키 전체를 말하며 거절합니다. ``` commit fc92b0a (#873) 전체 답 71100 B -> 투영 3507 B, 20줄, verify completed/success commit dd0c5c5 (#872) 전체 답 70760 B -> 투영 3507 B, 20줄, verify completed/success ``` ## Review - **판단해 주세요**: 읽지 못한 답이 세 번이면 notice(확인만). Task를 멈추지 않는 것이 맞는지. 다시 읽히면 그대로 끝납니다. - **판단해 주세요**: config 답은 저장 레코드(`config`, ms/bytes)를 그대로 두고 `settable`을 덧붙였습니다. web 설정 화면이 `config.disk_floor_bytes`를 읽어 이름을 바꾸지 않았습니다. - **조심해서 볼 파일**: `hide-factory/src/project.rs` - failure path. 오류도 `ci_pending` 간격을 타므로 main check의 오류 다음 30초는 `Pending`으로 답합니다. - **조심해서 볼 파일**: `hide-node-link/src/factory.rs` - node가 만드는 `gh` 명령 줄. 이전 node가 답한 전체 JSON 한 줄은 run이 아니어서 `Unread`로 읽힙니다 (잘못된 pass가 아님). - **비용 검토**: tick당 일이 줄었습니다. 막힌 Task 하나가 2초마다 71 KB를 받던 것이 30초마다 3.5 KB입니다. run이 100개를 넘으면 한 읽기에 page가 늘어납니다. ## Evidence - **확인한 것**: 운영 기록(읽기 전용)에서 두 Task가 `verify.started` 뒤 `verify.finished` 없이 7시간, 두 PR의 required `verify`는 success. - **확인한 것**: 실제 `gh`로 위 두 commit의 전체 답이 64 KiB를 넘고, 새 명령의 답은 3507 B로 `verify` success를 담는 것. - **확인한 것**: `github::a_commit_with_many_check_runs_passes_on_its_named_check` - node의 64 KiB 자르기를 흉내 낸 fake gh에서 3.5 KB run 20개가 `Passed`. - **확인한 것**: `engine::an_unread_verification_answer_is_asked_again_and_told_to_a_person`, `engine::a_task_stuck_verifying_with_two_unfinished_attempts_concludes_after_a_restart`, `github::an_unreadable_check_answer_is_unread_and_asked_again_at_its_pace`, `engine::config_prints_each_setting_under_the_key_set_takes_and_names_a_refused_key`. - **확인한 것**: `verify-cargo.sh lint`, `hakari`, workspace nextest, `scripts/tests` 319개, `check-core-touches-no-machine`, `check-no-attribution`, `check-no-workstation-identity` 통과. - **확인하지 못한 것**: 격리 HOME과 Herdr, 연습 저장소로 Factory 전체를 돌린 live check는 하지 않았습니다. check run 20개 이상인 연습 GitHub 저장소가 없어서, 실제 `gh` 답과 fake 경로로 나눠 확인했습니다. - **확인하지 못한 것**: 운영 T-1, T-2는 이 build가 설치되어 hided가 다시 시작해야 끝납니다 (restart가 검증을 다시 시작하고 새 읽기가 `Passed`). 설치는 하지 않았습니다. - **확인하지 못한 것**: `contracts/hide-cli.json`에는 factory 명령이 없어 바꿀 것이 없었습니다. - **후속**: 같은 64 KiB 자르기는 다른 읽기에도 걸립니다. JSON 읽기(`LabelledIssues` 200개 본문 등)는 `external.failed`로 드러나지만, `git diff --name-only`(risk path)는 잘려도 조용합니다. 이슈로 따로 남기는 게 좋겠습니다.
yansfil
force-pushed
the
factory/857-factory-pane-pi-omp-pane
branch
from
October 9, 2026 18:15
fc92b0a to
9919849
Compare
…p the Task once when a wake cannot finish
…resh pane keeps its identity, watch and letters The dormant record now carries the Factory's worker, Hide's own close of the pane is not read as an operator close, and the woken pane is found only through the record and registered under the Factory again. Factory sleep follows the sleep the adapter declares, so the rejection guard is removed.
…re it, and drop the tests that assumed a sleepless agent
…ne, leaving Grok, OpenCode and Cursor working through a pause
… and omp in the rollback note
…s in a fresh pane, and gate Factory sleep by the agents it sleeps
yansfil
force-pushed
the
factory/857-factory-pane-pi-omp-pane
branch
from
October 12, 2026 10:26
60e3dce to
4f61eb3
Compare
HyunjunJeon
pushed a commit
to HyunjunJeon/hide
that referenced
this pull request
Nov 12, 2026
…-hide#2456) ## Summary Leaving Hide open all day no longer keeps the phone silent. Phone pushes rest during computer use while a desktop Needs You notification is available. After ten idle minutes, lock, sleep or disconnect, still-waiting questions reach each phone once. Korean Notifications settings: review the switch and both explanation lines across the full panel width.  ## Review - **Decide**: The operator approved the copy; review the final Light/Dark captures before merge. - **Risky files**: `hided/src/mobile/`, `hide-core/src/agent_state/turn.rs`: per-phone consumption and withdrawal. - **Risky files**: `desktop/src/main/computerUse.ts`, `hided/src/server.rs`, wire schema: host observations and disconnect cleanup. - **Known limit**: On re-entry with only older read declarations retained, a single push can name another current declaration instead of the row lead; no missing/duplicate push was observed ([follow-up](with-hide/hide-private#873)). - **Cost**: One host timer; transition-only messages; at most four phone watermarks per current root. Details below. ## Tests - **Layer**: Stood-in powerMonitor; shared follower judge/settle with real encrypted loopback HTTP pushes. - **Layer**: Candidate desktop settings/reload and paired browser flows exercise host, served copy and phone together. - **Catches**: Away releases nine waits once; answered/withdrawn roots send none; all desktop notices off permits pushes. - **Catches**: B/C cancellation preserves current unsent asks, per phone, through settling and overlapping HTTP sends. - **Catches**: Before-fix and planted-boundary failures reproduce lost B, repeated B and premature C. Details below. - **Repeat**: 156 focused Rust tests ×3; 3 host tests ×3; 7 web units ×3; 4 e2e flows ×3, all passed. - **Waits**: Explicit clocks, worker fences, HTTP responses, UI assertions and compositor frames; no fixed sleep. ## Evidence - **Verified**: Loopback push counts/payloads, host/bridge units, scoped static checks and fresh candidate builds. - **Verified**: Isolated Korean Light/Dark native captures, persistent switch and desktop attach bridge. - **Not verified**: Physical idle/lock/suspend on macOS, Windows or Linux; unsupported Wayland gap is in `INSTALL.md`. - **Not verified**: Production relay/APNs or a physical phone; reconnect test covers the app hold/flush boundary. - **Not verified**: Native CPU/RSS and system-event-to-phone latency; cost statements are source-derived bounds. - **Not verified**: Direct delegation with no PRD run; captures uploaded using `screenshots --no-run`. - **Not verified**: Root cause of an earlier settings fixture startup failure; final settings repeats passed 3/3 (details below). <details><summary>Dark settings capture</summary>  </details> <details><summary>Verification record</summary> - Candidate: `206f0af8b84db464394fd9f02623bbe82d5aa0b8`; the private candidate CLI reports that commit. - CI: [required verify workflow passed](https://github.com/with-hide/hide/actions/runs/43054543367), including Rust workspace, Windows checks, Linux/Windows web e2e and Windows desktop e2e. - [Changed-web repeat job passed](https://github.com/with-hide/hide/actions/runs/43054543367/job/130640926206); [design contract passed](https://github.com/with-hide/hide/actions/runs/43054543164). - Independent review of `0f7a26c7d9..206f0af`: PASS; prior serious B/C and ordinary wait annotation findings closed. A supplemental review retained PASS with one minor subject-selection limit, recorded in Review and follow-up with-hide#873. This was source/log review, without an independent test run. - Local Rust: 156 focused core/daemon tests passed three times; scoped Clippy including tests and formatting passed. - Host: 3 powerMonitor tests passed three times; web reconnect/notification bridge: 7 tests passed three times. - Both frontend typechecks/lints, design contract and timed-wait policy passed. - Candidate desktop settings/reload and attach/bridge flows each passed three repeats (6 total); private candidate exited and its state folder was removed. - Final candidate mobile settings and paired list/detail/reply/quick-key/push/revoke flows each passed three repeats (6 total). - An earlier settings run passed twice and failed once during fixture agent startup, before opening settings. The failure was `agent_start.not_saved` at the existing operation-save deadline, outside the notification paths. Its first-failure log and run details were preserved locally; the final committed candidate passed all three settings repeats without a retry. - Caller-observed HTTP cases cover all nine current waits, answered roots, list disappearance grace and queued withdrawal. The next delivered payload retains pending clears; activity/disconnect, Needs You switches and Always mode gate delivery. - After delivered A, separate and coalesced B/C settles cover B retained/C cancelled, C retained/B cancelled, both cancelled and root end. Two phones with different consumed boundaries remain independent. Settled B is delivered before pending C, and a B HTTP completion after C admission consumes only its captured boundary. - Additional actual-projection/HTTP probe: Seen with retained A/B, then Needs You with no new declaration, sends once with B while the row leads A; adding C on entry sends C once. Repeated away passes send nothing further. The temporary probe was removed without changing the candidate. - Before-fix HTTP failures reproduce the lost-B matrix and cancelled-newest coalescing case. Removing old-job consumption repeats B after cancelled C; reading past the settled boundary delivers pending C prematurely. Both mutations failed their predicted HTTP assertions, then the restored implementation passed the repeated scoped tests. Earlier host/bridge/mode/withdrawal/reconnect mutations also failed their predicted tests. - Cost per host: one one-second timer, at most two OS reads per tick, four event subscriptions, no per-input work. Only a transition or connection replay sends one IPC and one typed desktop frame per attached window. There is no runtime dispatch, blocking I/O or added work under `Mutex<Runtime>`. - Activity and demand sets follow the existing eight-client admission bound. Existing current-root entries retain at most four phone consumed watermarks/rested bits and one root-lifetime scalar. Each changed ledger pass adds one counter increment and one previous-age lookup per current declaration ID. The ledger maps its existing current/grace declaration IDs to observation order, with no additional set or history. Existing projection/grace root state has no separate count cap; this change adds fixed scalars to those existing entries. Settling retains one covered boundary per standing root and keeps the existing 64-root pending cap/three-second deadline. - Ordinary follower passes test one debt bit; away scans existing roots and current declarations, rebuilding at most four jobs per root. Jobs use the existing blocking workers, capturing root lifetime and settled boundary before transport. No new root set, payload queue, worker or timer is introduced in hided. - Close, follower reset/end, phone revocation/inactivity expiry and scope change withdraw responsibility. Host quit/disconnect releases timer/listeners/demand; relay-only holds retain eight payloads per phone and sixty-second expiry. - Unsupported idle sources remain in use while a desktop window is attached; suspend still reports away. The system support table records Linux lock polling, the Wayland limitation and what closes it. - Existing `app_closed`/legacy `off` spellings remain compatible; the timeout is one named constant, without a new setting. - Engineering principles 1, 7, 11, 12, 13, 14 and 15: remove the old rule, reuse owners, model consumption, test outcomes and bound state. Design principles 5 and 12: retain the settings pattern and capture Korean wrapping/legibility in both themes. - Full suites run in CI; local Rust/WASM checks use the shared cargo slot and scoped verification entrypoints. </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.
목표
The task you are doing when you want this
Software Factory에서 Pi나 omp를 작업자로 쓰고, Task를 일시정지했다가 다시 이어 갑니다.
What hide does today
Pi와 omp는 잠들 때 원래 pane을 닫고 core에 dormant 기록을 남긴 뒤, 깨어날 때 새 pane에서 같은 대화를 이어 갑니다.
Factory의 작업자 정체, probe, wake, watch, 편지는 원래 pane과 예전 sleep 기록만 봅니다.
그래서 Factory가 Pi나 omp 작업자를 재우면, 깨운 뒤 편지가 이미 닫힌 pane 앞으로 쌓이고, 내부에서 닫은 pane이 운영자가 닫은 것(PaneClosed)으로 읽힐 수 있습니다.
#826(Pi 세션 리더)과 OMP 세션 리더 PR의 리뷰에서 찾았고, Factory runtime에서 재현하지는 않았습니다.
OMP 세션 리더 PR은 이 문제를 막기 위해, pane을 닫으며 잠드는 dialect의 Factory sleep, stop, wake와 새 대화 fallback을 effect 전에 거부합니다.
그래서 지금은 Factory 일시정지 중에도 Pi와 omp 작업자의 pane이 그대로 떠 있습니다.
수동 Sleep과 Wake는 그대로 동작합니다.
What it should do instead
Factory가 Pi와 omp 작업자도 재우고 깨울 수 있습니다.
깨어난 새 pane에 작업자 정체, watch, 편지, coordination 기록이 다시 묶이고, 닫힌 pane 앞으로 편지가 쌓이지 않습니다.
Hide가 잠들면서 닫은 pane은 운영자가 닫은 것으로 읽히지 않습니다.
새 pane은 core의 dormant 기록으로 찾고, label, cwd, 이름, native session id로 추측하지 않습니다.
이 동작이 들어오면 OMP 세션 리더 PR이 넣은 거부 guard는 지워집니다.
Where the authority for it lives
Factory 정책(
hide-factory)과 core의 agent sleep 기록, coordination, 편지 경로입니다.pane을 닫고 새로 여는 것은 Herdr가 하지만, Herdr는 바뀌지 않습니다.
완료 조건
결정 기록
Closes #857