Repository navigation
fix: keep a closed agent registered until Reopen closed brings it back - #2316
Merged
Merged
Conversation
Closing an agent tab and reopening it with Reopen closed brought the screen and the conversation back, but the agent's delivery registration had already ended with its pane, so the reopened pane was no agent: not in the agent list, no letters, no parent watch. A close kept for reopen now holds the registration of each agent its panes ran, the way a sleeping session's is held, for as long as the item can be reopened. While held the agent reads `closed`: not running, no watch reading and so no quiet-child warning, no place under a mission's or a plan's cap, and a letter to it waits with its hour running. A reopen whose conversation resumes moves the registration to the new pane through the delivery store's rebind, so its letters, its watch, its parent and its spawn receipt follow it. An item pushed off the list, a reopen that starts a new conversation, a close that settles without an item, and a restart end it as before. The reopen worker carries the registration with the agent it resumed, so Pi and omp, whose row and engine name the session differently, continue too. A tree close now uses the same hold.
Contributor
Author
|
PASS - 소스 리뷰, head 현재 serious/ordinary/minor 지적 없음. 코드 수정 없이 읽었습니다.
증거의 한계: 리뷰어는 빌드·테스트·앱 조작을 실행하지 않았습니다. 워커의 격리된 가짜 모델 런에서 Claude·Codex 기본/프로필의 같은 등록 복귀, 부모·watch 대상 이동, 지운 프로필 거절을 확인했습니다. 첫 런은 하네스가 편지 id를 잘못 읽고 watch list --json도 거절되어 레터 실제 전달 및 장시간 조용함 경고 검증을 증명하지 못합니다. Pi·omp 단위 테스트는 세션 관찰을 주입하므로 실제 CLI 경계의 증거가 아닙니다. Pi/Grok/omp/OpenCode 라이브, 네이티브 Cmd+Shift+T, 실제 레터 전달, 업데이트 뒤 깨우기, 최종 head 전체 CI는 c1/c2/verify/ci에서 별도로 확인해야 합니다. 이 PASS는 그 완료를 대신하지 않습니다. |
…stration # Conflicts: # contracts/hide-cli.json # docs/delivery.md
Contributor
Author
|
Evidence update after the body was written (head acd78fa, same product code as 1f0104f plus a main merge):
|
HyunjunJeon
pushed a commit
to HyunjunJeon/hide
that referenced
this pull request
Nov 9, 2026
…rs and operator waits (with-hide#2323) Closes with-hide#2301 Closes with-hide#2302 Closes with-hide#2300 Closes with-hide/hide-private#684 Related: with-hide/hide-private#778 (짝 문서 PR, 서로 짝) ## Summary 미션 명령이 틀린 답을 주던 세 가지를 고칩니다. - `hide mission show mission-41`처럼 Hide 편지가 안내하는 미션 id로 보면 그 미션 전체를 보여 줍니다(전에는 `mission_node_unknown`). - Conductor가 띄운 작업자·검사자가 `hide mission show`로 자기 미션을 읽고, 작업자는 `hide mission node <자기 노드> --pr/--no-pr/--branch/--line`을 직접 씁니다(전에는 `mission_none`). 그 밖의 변경과 다른 노드는 계속 Conductor 몫입니다. - `--mission` 없이 쓴 명령은 정해진 순서로 미션을 고릅니다: 내가 지휘하는 열린 미션, 없으면 내가 작업·검사하는 열린 미션 하나, 없으면 마지막에 완료한 내 미션. 열린 미션 둘에 걸쳐 있으면 짐작하지 않고 `mission_ambiguous`로 거절해 `--mission`을 쓰게 합니다. - 20분 무활동 watch와 90분 no-push 경고가 같은 규칙 하나를 읽고, 노드가 운영자 답(raise, `decide --node`)을 기다리는 동안에도 조용합니다. - 지도 N/M(with-hide#684)은 #2200에서 이미 고쳐졌고, 기존 웹 시험이 옛 계산에서 실패함을 확인해 닫습니다. with-hide#2304(검사가 다시 돌기 전 "CI passed" 편지)는 이 PR에서 뺐고, 원인과 뺀 이유는 이슈에 남겼습니다. 스크린샷 없음: 화면 변경 없음, core·CLI 도움말·계약만 바뀝니다. ## Review - **판단해 주세요**: 미션 고르는 순서(위 Summary)와, 열린 미션 둘이면 거절하는 쪽을 택한 것. 첫 번째 것을 고르면 작업자가 엉뚱한 미션의 노드를 바꿀 수 있어서입니다. 도움말(`hided/assets/mission/help.md`)과 짝 문서에 순서를 적었습니다. - **판단해 주세요**: with-hide#2300 사례(start-line)는 이 규칙으로도 경고가 납니다. 그때 CI는 GitHub 504로 실패 상태였고(실패한 CI는 작업자 몫), 운영자 스크린샷 승인은 지도에 `decide --node`로 올라가 있지 않았습니다. 운영자 대기를 조용히 하려면 결정을 노드에 걸어야 합니다(도움말에 적음). - **조심해서 볼 파일**: `hide-core/src/runtime/mission_criteria.rs` - `Caller`는 명령마다 원장 agents를 한 번만 훑어 호출자의 등록과 장부의 미션들이 가리키는 작업자·검사자 등록을 함께 읽고, `mission_meant`가 고르는 순서를 한 곳에 둡니다. show, node, record, skip이 이것으로 미션을 고르고 답(미션 보기, 노드 보기, 두 편지 목록)도 그립니다(`mission_view_for`). - **조심해서 볼 파일**: `hide-core/src/runtime/missions.rs` - `show`와 `show <node>`는 한 번 읽은 등록으로 보기와 편지 목록을 같이 그리고, 작업자의 `node` 답도 그 등록으로 그립니다(작업자 patch는 에이전트를 바꾸지 않음). Conductor 경로는 전과 같이 답을 그릴 때 한 번 읽습니다. - **main 병합(with-hide#2316 뒤)**: `runtime/missions.rs`의 충돌은 #2316의 `worker_life`(닫힌 에이전트를 미션에선 끝남으로 읽음)와 이 PR의 `named_agents`·편지 함수를 둘 다 남겨 풀었습니다. `mission_view_for`도 `sleeping_registrations`의 `closed`를 그대로 받아 닫힌 작업자를 끝남으로 그리고, 미션 고르는 규칙은 바뀌지 않았습니다. `contracts/hide-cli.json`은 병합된 소스로 다시 만들어 main과의 차이는 `mission_ambiguous` 네 곳뿐입니다. - **조심해서 볼 파일**: `hide-core/src/mission_health.rs` - `quiet_waits`가 no-push 경고와 watch(`mission_worker_waits`)의 한 규칙입니다. 전에는 두 곳이 따로 계산해 병합된 PR과 실패한 줄에서 서로 달랐습니다. ## Evidence - **확인한 것**: 새 core 시험(`a_nodes_worker_and_checker_use_the_mission_commands_of_their_own_node`, `a_caller_in_two_open_missions_names_the_one_it_means`, `a_mission_workers_watch_is_quiet_while_its_node_waits_on_the_operator`, `a_node_waiting_on_the_operator_raises_no_quiet_warning`)은 수정을 되돌리면 실패하고 수정으로 통과합니다. 다중 미션 시험은 거절 규칙을 끄면 작업자가 말없이 mission-1을 받아 실패합니다. - **확인한 것**: `hide-core` mission·watch·quiet 시험 357개, `hided` mission·cli_contract·guide 시험 35개(커밋된 `contracts/hide-cli.json` 비교 포함) 통과, `verify-cargo.sh fmt-check`, `clippy -p hide-core -p hided --tests` 경고 없음. - **확인한 것**: 격리 후보 hided(d9dcfa2)에서 실제 `hide` CLI로 미션 id show, 작업자·검사자의 이름 없는 show, 작업자 자기 노드 pr/branch/line 변경이 되고, 권한 밖 변경은 `mission_not_conductor`로 거절됨(verify 검사자 기록, 끝난 뒤 후보 프로세스 0). - **확인한 것**: 웹 `src/missions.test.ts` 59개 통과, with-hide#2200 전 계산으로 바꾸면 `expected '1/2 passed', got '1/3 passed'`로 실패. - **확인하지 못한 것**: 다중 미션 거절(`mission_ambiguous`)은 core 시험으로만 확인했고 격리 후보 CLI로는 돌리지 않았습니다. 전체 verify 레인은 CI에 맡깁니다.
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: with-hide/hide-private#771
Summary
에이전트 탭을 닫았다가 Cmd+Shift+T(닫은 항목 다시 열기)로 되살리면 화면과 대화는 돌아오지만, Hide가 그 칸을 에이전트로 다시 등록하지 않았습니다.
닫는 순간 등록이 칸과 함께 끝나 버려서, 다시 연 칸은 에이전트 목록에 없고 편지도 못 받고 부모의 지켜보기도 끊겼습니다.
이제 다시 열 수 있는 동안(최근 닫은 목록 20칸 안에 있는 동안) 등록을 붙잡아 두고, 다시 열어 같은 대화가 이어지면 새 칸으로 옮깁니다.
붙잡힌 동안 그 에이전트는 새 상태
closed로 읽힙니다: 일하는 중이 아니고, 부모에게 조용함 경고가 가지 않고, 미션·플랜 상한에 세지 않으며, 그 에이전트에게 보낸 편지는 기다렸다가 다시 열린 칸으로 갑니다.목록에서 밀려나거나, 새 대화로 시작하거나, hided가 다시 시작되면 등록은 예전처럼 끝납니다. 트리 닫기도 같은 규칙으로 합쳤습니다.
스크린샷 없음: 화면 변경 없음 (core와 CLI 계약만)
Review
runtime/state에 값closed가 더해집니다(hide ps,hide agent show, 편지 답). 미션 화면은closed를 끝남으로 보여 줍니다.hide-core/src/runtime/closed_registrations.rs- 붙잡기·놓기·이어가기를 한 곳에서 정하는 새 모듈. 잠든 에이전트의take_over_registration을 그대로 씀.hide-core/src/runtime/editor.rs- 닫기 정리(promote_close_reservations)와 다시 열기 결과 처리, 모든 닫기 경로에서 놓기가 빠지지 않는지.hide-core/src/runtime/delivery.rs- 지켜보기 읽기를 붙잡힌 대상에서 건너뜀, 닫힌 대상에게 가는 편지 경로.hide-core/src/recent_closed/reopen.rs- Pi·omp는 행과 엔진이 세션을 다르게 부르므로, 등록을 다시 연 에이전트와 함께 실어 보냄.Evidence
after_registeredNone, 원래 등록 ended:true.runtime::tests::closed_registrations): 다시 열면 같은 등록이 새 칸으로(기록·지켜보기·편지 이동), Pi·omp 세션 형태 차이, 목록 밀림·새 대화·항목 없는 정리·재시작에서 끝남, 붙잡힌 동안 편지가 기다렸다 새 칸으로.closed_panes의 등록을 None으로)에서 새 테스트 3개와 트리 다시 열기 2개가 실패, 되돌리면 통과.-D warnings, fmt 통과.contracts/hide-cli.json재생성, hidedcli_contract::tests::the_committed_contract_is_the_exported_one통과.closed, watch 유지(경고 0). 다시 연 뒤 watch 대상이 새 칸. 프로필을 지운 뒤 다시 열면 거절 알림과 함께 등록 종료(B20 그대로).Verification record