Repository navigation
refactor: centralize account choices and complete profile lifetimes - #2313
Conversation
…e file's presence
|
PASS - 구조 리뷰, head 현재 남은 심각·보통 지적은 없습니다.
검증: 원격 알려진 한계: Ready 이후 결과와 행을 모두 모르면 창 제거까지 삭제를 보수적으로 막습니다. |
|
PASS - PR #2313 증분 구조 리뷰, head
원칙 #2·#7에 따라 기존 wire 목록과 공통 표시 경계를 사용하고 별도 상태 모델을 만들지 않았습니다. Linux e2e 2/6의 최초 실행과 retry 실패는 그대로 보존합니다. 증거 경계: 원격 gh pr diff와 로컬 merge-base→최종 head diff는 바이트 동일하며 워커 작업트리는 clean입니다. |
## Summary
업데이트 뒤 잠든 에이전트를 깨울 때 탭 생성 요청이 거절되는 원인을 고치고 실패 이유를 진단에 남깁니다.
재시작 뒤 깨어난 에이전트에 잠든 표시가 남는 문제도 고칩니다.
## Review
- **판단해 주세요**: 확정된 교체 요청만 정리하고 불명확한 요청은 연결 소유자가 바뀔 때까지 유지하는 경계.
- **조심해서 볼 파일**: `hide-core/src/engine/own/mod.rs`,
`hide-node/src/terminal/holder.rs` - 요청 발급·교체·실패 표시·정리 순서.
- **조심해서 볼 파일**: `hide-core/src/{agent_sleep.rs,runtime/agent_sleep.rs}`
- 엔진 식별자·상태 번호 비교와 과거 저장 기록 처리.
- **조심해서 볼 파일**: `hide-node-link/src/{holders,protocol}.rs` - 필수 요청 필드와
protocol 93 호환 경계.
- **비용 검토**: 교체 확정마다 정리 호출 1회, 세션 반영마다 기존 연결 식별자 복사와 비교 추가.
입력·틱·알림·타이머·큐 추가 없음.
- 미확정 요청은 기존 연결당 128개 상한과 소유자 교체 정리를 사용합니다.
## Evidence
- **수정 전**: 공식 v1.2.4에서 끝난 요청 번호를 재사용해 닫힌 탭 생성을 거절했습니다.
- **회귀 재현**: 재시작 뒤 상태 번호가 같은 경우의 테스트 2개가 수정 전 실패하고 수정 후 통과했습니다.
- **최종 커밋**: 보관·잠들기 Rust 77개와 형식 검사 통과. 마지막 변경은 보관 테스트의 준비 데이터 두 줄뿐입니다.
- **제품 커밋**: 관련 Rust 256개, 실제 holder 교체 통합 테스트 7개와 후보·보조 프로그램 6종 빌드 통과.
- **자체 실행**: Pi·Grok 각각 v1.2.4·v1.2.5 업그레이드와 같은 빌드 재시작 여섯 회가 각 16/16
통과했습니다.
- **독립 실행**: Grok v1.2.4 원순서 3회, Pi v1.2.4 1회, 같은 빌드 Pi·Grok 2회가 각 22/22
통과했습니다.
- 독립 여섯 회에서 Codex 선행 깨우기·같은 대화 응답, Claude 깨우기, holder 4/4 채택과 새 탭 입력
3/3을 확인했습니다.
- 자체 여섯 회와 독립 여덟 시도 모두 소유 프로세스 정리를 확인했습니다.
- **소스 리뷰**: [제품 커밋
PASS](with-hide#2312 (comment)).
테스트 두 줄의 추가 리뷰는 진행 중입니다.
- **CI**: 이전 커밋의 보관 테스트 실패를 재현·보완했습니다. [최종 커밋
CI](https://github.com/with-hide/hide/actions/runs/42632265665)는 진행
중입니다.
- **미실행**: omp는 공식 v1.2.4 잠들기 확인 실패, OpenCode는 공식 빌드 시작 오류로 후보 깨우기에 도달하지
못했습니다.
- **미확인**: 실제 로그인·과금, Electron 화면·물리 입력, 원격 기기와 다른 OS의 실제 업그레이드.
- **최초 실패 경계**: 이전 후보의 Codex 90초 시간 초과 원인은 미확정입니다. 새 원시 상태 번호를 관측하지 못해
이번 수정으로 원인을 단정하지 않습니다.
<details><summary>Verification record</summary>
- Final head: `8b82544392178800b23aa9b95f1fe0074189f422`; product head:
`4b48307d08efdba6dd6d66a37cc347c9b8cd7e93`; merged base: `43e966b46`
(with-hide#2313).
- The final delta changes only
`hide-core/src/runtime/tests/session_archive.rs`: one comment and the
current engine mark in its fixture. Every behavior assertion is
retained. No product, script or contract changed; runtime evidence stays
bound to the pinned product head above.
- The fixture bypassed the runtime sleep entrypoint, which captures a
fallback connection mark. It intends to report the ended agent from the
same engine. Legacy persisted records are loaded with a new engine,
whose saved agents stay unlisted until a program shows. The legacy
reload regression is retained.
- Archive fixture red: 0 passed, 1 failed, 4,304 skipped on the product
head. The validated patch and committed delta match byte for byte.
- Final-head filtered green: 77 passed, 4,228 skipped; formatting
passed. Commands use the mission cargo slot and
`scripts/verify-cargo.sh`.
- Product-head scoped checks: 256 passed, 4,653 skipped; holder renewal
integration 7 passed, 88 skipped; formatting passed. No full local
workspace suite was run.
- The separate sequence-reuse regressions first compiled and failed 2/2
on the former logic, then passed with the fix. They cover stale reports,
unshown starts and stored records without an engine mark.
- Product and helper binaries were pinned by SHA-256. hided/hide report
the full product commit through the existing HIDE_COMMIT input.
Same-build controls retain identical four-product-binary hashes before
and after restart.
- The upgrade harness uses official release digests, private HOME/state,
pinned CLIs and a loopback fake model. It retains the original order:
Codex wake precedes the closed-tab dormant wake.
- Own runtime cases: Grok v1.2.4 `222638`, Pi v1.2.4 `222907`, Grok
v1.2.5 `223132`, Pi v1.2.5 `223355`, same-build Grok `223607`,
same-build Pi `223846`; each 16/16 PASS with cleanup confirmed.
- Independent runtime cases: original-order Grok v1.2.4 `224224`,
`224548`, `224910`; Pi v1.2.4 `225232`; same-build Pi `225520`, Grok
`225824`; each 22/22 PASS with cleanup confirmed. Codex reached awake in
0.218/0.454/0.255/0.216/0.043/0.189 seconds respectively.
- Independent omp/OpenCode attempts each stopped on v1.2.4 preparation
before candidate launch. OpenCode also recorded a start failure with
process-table access errno 1. Both preserve their first failures and are
not candidate passes. Final cleanup audit reports zero owned processes,
short temporary paths or large copied binaries left.
- Product-head CI `42625200954`, attempt 1: 5,926/5,927 Rust tests
passed, two flaky; archive fixture failed both built-in tries. Failed
jobs alone were manually rerun exactly once. Attempt 2 again failed the
same archive fixture, with 5,926/5,927 passed and one flaky. Both
first-failure logs are preserved separately.
- Attempt 2's flaky holder test was
`a_released_sessions_unwritten_keys_keep_the_pane_on_its_holder`:
renewal close timed out as unsettled, then the built-in retry passed.
This is not a clean first pass. No further rerun was issued on that
head.
- Final-head CI `42632265665`: pending. The final test-only delta needs
its short source review; the product source review covers correctness,
fragmentation, simplicity, module boundaries, ownership/limits and
tests.
- Earlier head `45ad58a81` had green CI but one independent 90-second
Codex wake timeout. Later successful runs did not erase or explain it.
Its raw new sequence/mark was not observed. Earlier disk-cancelled runs
and an unstarted run are kept separate from product failures and passing
runs.
- Protocol 92 from the merged base is retained and the pane-request
contract advances it to 93. Local artifacts stay outside Git. No screen
files changed.
</details>
Summary
창의 계정과 시작할 프로필을 한 판단에서 정해, 별칭으로 시작한 부모의 자식도 같은 계정을 이어받습니다.
시작 결과로 보류를 끝내고 마지막 시작의 경고를 유지해 프로필 삭제가 막히거나 오래된 경고가 되살아나는 문제를 고칩니다.
로그인 필수값은 실행기 정의에 두고, 자식 시작은 선택한 계정의 연결 상태로 판단합니다.
연결이 끊긴 기기는 마지막 프로필의 이름과 기본 표시만 흐린 읽기 전용으로 유지합니다.
Review
launch/holds.rs,engine/own/attempt.rs: 실행 결과 인계와 삭제 검사 사이에 보호 공백이 없는지 봐 주세요.runtime/account_reports.rs,agent_hooks/facts.rs: 최신 시작 순번의 수명과 프로필·기기 제거 정리를 봐 주세요.coordination/executor.rs,runtime/start_hook.rs: 한 번 선택한 계정·버전을 시작까지 유지하는 경계를 봐 주세요.runtime/agent_choice.rs,model/rest.rs,web/src/agentProfiles.ts: 같은 자동 선택 결과가 실제 전송 경계를 지나 화면까지 도달하는지 봐 주세요.Evidence
연결된 상태 비교
Verification record
be9b40816; current candidate:735fb10b08d2089676bf1a327b0689a4449d2dc9.c3e389412: 변경 경계 Rust 필터 검사(프로필 78, 계정 8, 훅 판단 6, 정의 14, 모바일 대화 18, 보류 2, 훅 계정 2, 로그인 4), all-targets check/clippy, 웹 39개와 정적 검사 통과. 이 결과가 전송 누락을 잡지 못했으며 새 후보의 전체 검증 결과로 승계하지 않습니다.c2ce1fed1: 전송 누락 수정, snapshot delta 16개, fmt, hide-core all-targets clippy, hided bins build, macOS workspace-cli 1개 통과.735fb10b0: 끊김 상태 숨김, 관련 웹 4파일 40개, typecheck/build/lint/design contract, 8상태 후보 화면 통과.