Repository navigation
fix: keep memory ranking tests independent of the date - #2020
Merged
Merged
Conversation
yansfil
added a commit
that referenced
this pull request
Nov 2, 2026
Related: #2011 ## Summary 폰이 기본으로 Hide 중계를 통해 연결되고, 설정의 한 연결 줄에서 연결 상태와 다시 시도·업데이트·상한 거부를 확인합니다. QR은 app.withhide.dev를 열며 5분 뒤 만료됩니다. Tailscale 직접 연결은 고급에서 고릅니다. 방법마다 페어링한 폰을 따로 유지하고, 끄기·해제 시 연결을 닫습니다. 폰 내용은 기기와 폰 사이에서 암호화합니다. 기존 Tailscale 설정은 그대로 이어 쓰고 새 설정은 중계로 시작합니다.  실제 Settings 컴포넌트의 격리 갤러리입니다. 연결 줄, QR 만료 안내, 접힌 고급 영역을 확인해 주세요.  이전 Tailscale 연결을 정리할 CLI가 없어도 중계는 연결되고, 같은 한 줄에 정리 실패가 남습니다. ## Review - **판단해 주세요**: 연결 상태와 암호화 설명의 길이, 고급 Tailscale의 발견성. - **조심해서 볼 파일**: `hided/src/mobile/relay.rs`, `phone.rs` - 암호화 경계, 종료 순서, 취소와 큐 상한. - **조심해서 볼 파일**: `mobile/mod.rs`, `phones.rs`, `store.rs` - 키 저장, 방식 전환과 기존 폰 보존, 재연결 후 요청 기록. - **비용 검토**: 연결 1개, 폰 작업 8개, 폰당 수신 8프레임·공유 송신 32프레임; 상태 전환만 발행하며 core 잠금 안에서 네트워크 작업을 하지 않습니다. ## Evidence - **확인한 것**: 실제 hided 중계 통합 6개가 macOS·Linux·Windows에서 암호화·재연결·방법별 폰 보존·해제·끄기·미인증 제한 시간을 확인합니다. - **확인한 것**: 입력 중단 테스트가 연결을 끊고 같은 요청을 재시도할 때 영구 대기에 남지 않음을 확인합니다. - **확인한 것**: Mobile UI 24개, 직접 연결 브라우저 5개와 격리 갤러리의 한글·영문·큰 글씨·dark/light·QR·고급 상태를 확인했습니다. - **확인한 것**: 최신 커밋에서 로컬 lint·Rust 7,357개·web 2,471개·desktop 307개·빌드·디자인 계약과 GitHub CI가 통과했습니다. - **재시도 이력**: 기존 기기 테스트 #430·#439는 최초 실패 후 로컬 단독 1회와 CI 작업 1회 재실행에서 통과했습니다. CI에는 기존 세션 복원 #419의 자동 재시도도 있습니다. - **확인하지 못한 것**: 실제 폰·native 앱·운영 TLS와 실제 PTY 답장 재전송은 통합·배포 검증에 남아 있습니다. <details><summary>Verification record</summary> Head: `d75b9db7d9ef0287392452ad5fc77bfce605f26c`. Base: `b1b25cde4`, including protocol #2011, Memory correction #2020, relay server #2014 and hosted phone #2019. Scope: mobile-relay B1-B10, hided B24, B28; hided transport, Settings Mobile, owning architecture/UI guides. The architecture merge preserves both the hosted phone WASM initiator and the device responder/admission/authentication contract. Cargo.lock and workspace-hack did not change in that merge; their shared feature union was generated at `92620a992` and passes CI. Caller tests use shared admission/routing types and real Noise sessions without implementing a second relay service. The interrupted-input test uses the real phone/Noise path and node permission boundary; it does not claim an actual PTY write. The original socket handler already detached its input task on disconnect, so the original cancellation premise was not reproduced. The follow-up additionally settles from the blocking operation with an Uncertain drop guard; the caller test verifies disconnect/retry lifetime rather than isolating that guard. Independent re-review passed at `5eeb73668`; the additional live-peer and unreaped-task bound at `744506a3e` was reviewed and accepted. The QR screenshot was captured at `e8fa80774`; the cleanup screenshot was captured at `5eeb73668`; the Settings product changes are unchanged since that follow-up. The five direct-mobile browser journeys passed at `6c2a6e338` without weaker assertions or timeouts. The Cursor fixture now explicitly selects Advanced > Use Tailscale before enabling Mobile. Current-head local verification ran on macOS under the shared mission lock: - `bash scripts/verify-cargo.sh lint`: PASS, 1m 10s. - `bash scripts/verify-cargo.sh test-scoped`: core 3,929 passed, 1 failed, 20 ignored; stopped at the existing own_devices assertion in `herdr-core/src/runtime/tests/own_devices.rs:158`. - The only exact-test rerun on the same SHA passed in 0.27s; the initial Kit/GuardrailPolicy assertion failure remains recorded, matching [#430](with-hide/hide-private#430) and [#439](with-hide/hide-private#439). - `bash scripts/verify-cargo.sh test-scoped --workspace --exclude herdr-core` then ran the crates the initial command had not reached: 3,427 passed, 149 ignored. - Combined Rust coverage: 7,357 passed, 169 ignored, including the one separately rerun test; this is a split completion after an initial failure, not an uninterrupted green run. - `bash scripts/verify-web.sh`: PASS; web 2,471 passed / 3 skipped, desktop 307 passed / 4 skipped; type checks, lint and builds passed. - `node scripts/check-design-contract.mjs`: PASS. [GitHub CI run 41456834038](https://github.com/with-hide/hide/actions/runs/41456834038) passed on attempt 2 after exactly one failed-job rerun: - Attempt 1: Rust 7,338 passed / 1 failed / 166 skipped; own_devices #430/#439 failed both automatic attempts. - Attempt 2: Rust 7,339 passed / 166 skipped; own_devices passed on its first attempt in 0.027s. - Attempt 2 also includes one automatic retry of the existing session-restore test [#419](with-hide/hide-private#419); the first failure remains in its job log. - Linux and Windows each passed all six mobile_relay caller tests on attempt 1; Windows job `125315707247` completed successfully. - Linux browser shards and Windows E2E passed on attempt 1 without flaky results. - Cursor phone passed in shard 6 (`125317575438`, 6.6s); the reopened-tab test tracked by #418 passed in shard 4 (`125317575230`, 3.3s), both on their first attempt. - macOS desktop, protocol and packaging lanes passed; macOS hided mobile evidence is the local run above. Real phone/native-app interaction, production TLS and actual PTY replay remain outside this PR's verified evidence. </details>
yansfil
added a commit
that referenced
this pull request
Nov 3, 2026
…tarts (#2021) ## Summary 새 엔진에서 탭과 분할을 만들 때 홀더 시작을 기다리느라 화면이 늦게 나타나고, 66개 셸 복원이 느렸습니다. 요청한 자리를 먼저 그리고 홀더가 준비되면 연결하며, 기록 저장과 잠금 대기의 비용을 줄였습니다. 시작에 실패한 pane은 이유와 닫기 버튼을 가진 기존 카드로 남습니다. 스크린샷 없음: 화면 코드는 바뀌지 않고 기존 실패 카드를 사용합니다. 성능은 앞선 동일 release 빌드의 격리된 브라우저에서 비교했습니다. ## Review - **저장 경계**: 홀더 기록과 incarnation만 `UntilReboot`를 쓰고 일반 저장은 `sync_all`을 유지합니다. 아래 저장 파일을 확인해 주세요. - **복구 경계**: 부팅 전 손상은 정리하고 이번 부팅의 손상과 모르는 형식은 보존·거절합니다. - **시작 소유권**: 조기 attach, 즉시 읽기의 시작 결과 대기, 닫힌 pane의 뒤늦은 홀더 정리를 확인해 주세요. 아래 엔진·노드 파일이 경계입니다. - **비용과 상한**: 키 입력당 추가 작업은 없습니다. 실행 8개·대기 8개, attach 64를 유지하며 복원은 8개 작업자가 전체 pane을 순서대로 시작합니다. - **저장 비용**: 저장 5회를 3회로 줄이고 용량 상한 미만의 전체 파싱을 없앴습니다. 공용 잠금은 1ms부터 20ms까지 기다리며 timeout·취소 계약은 유지합니다. - **판단 사항**: 새 pane도 기존 “복구하지 못했어요” 문구를 씁니다. 복원 셸 응답의 +87.7ms 미달은 운영자 위임으로 예외 수용했고 c2는 skipped입니다. - **복구 delta**: main에 병합된 #2020의 테스트 날짜 수정만 가져왔습니다. 고정 날짜로 인한 #438을 바로잡으며 성능 코드와 행동 기대값은 그대로입니다. ## Evidence - **최종 검사**: lint PASS, 전체 7,323 PASS·169 ignored. 홀더 최초 실패 1건은 같은 SHA 1회 재실행으로 PASS했고 원인은 미해결입니다. - **독립 검토와 CI**: 최종 delta 재리뷰와 새 policy CI PASS입니다. 전체 실행은 ci-plan이 이전 run을 재사용했고 아래에 구분했습니다. - **탭·분할**: 기존 5쌍의 화면·프레임 p50/p95가 기준 안입니다. 원본 재계산도 일치하며 최종 SHA의 새 측정으로 주장하지 않습니다. - **복원**: 셸 응답 +87.7ms 미달, 탭 -93.2ms·앞 탭 -113.2ms입니다. 미달을 통과로 바꾸지 않았습니다. - **미실행**: 이번 복구에서는 성능 재측정·release 빌드·네이티브 앱 검증을 하지 않았습니다. 최종 SHA의 Linux·Windows 전체 실행은 없으며 이전 CI 재사용으로 판단됐습니다. <details><summary>검토 파일, 후속과 기존 기능 증거</summary> - 저장 파일: `hide-platform/src/fs/atomic.rs`, `hide-holder-protocol/src/record.rs`, `hide-kit/src/panes.rs`. 기록의 내구성과 용량 경계입니다. - 엔진·노드 파일: `herdr-core/src/engine/own/{mod,starts}.rs`, `hide-node/src/terminal/{engine_panes,holder}.rs`. 시작·실패·정리 소유권입니다. - 복구 delta: `herdr-core/src/runtime/memory_analysis.rs`의 테스트 모듈만 변경했습니다. - 노드 attach는 시작 실패를 별도 상태로 기억하지 않아 준비 기한 뒤 일반 오류를 낼 수 있습니다. 화면에는 엔진의 실패 이유가 남고 자동 재시도는 제한됩니다. - 홀더와 kit의 `millis` 중복, 폴더 정리의 버전 이름 재계산은 별도 정리 대상으로 남깁니다. - 읽기와 시작 허가의 대기 한도가 겹치면 `holder_start_timeout`이 먼저 날 수 있으며, 에이전트 resume 복원 경로의 엔진 참조 경합도 남습니다. 기존 독립 재리뷰에서는 사소한 후속으로 분류했습니다. - 기존 최종 성능 코드의 128 pane 복원·저장 재개방 시험, 홀더 통합 67/67, 실제 node→holder 즉시 읽기와 엔진 계약 각 1/1이 통과했습니다. 두 실행의 홀더 17개도 모두 종료됐습니다. - 즉시 읽기 대기 제거와 대기 상한 9 변이는 예상 검사에서 실패했습니다. 조기 attach 소유권과 용량 경계 변이도 각각 예상 검사에서 실패했습니다. | 행 | 화면 p50 / p95 여유 | 프레임 p50 / p95 여유 | 판정 | | --- | --- | --- | --- | | 22 탭 만들기 | -0.26 / -8.10ms | -3.97 / -14.31ms | 통과 | | 23 분할 | -2.43 / -3.13ms | -21.18 / -3.11ms | 통과 | 두 측정은 동일 빌드의 H/P 순서를 교대했습니다. 운영자 결정에 따라 시작 load<12, 최고 load<=15, 빌드 0을 적용했고 제외 실행도 보존했습니다. 여유는 쌍별 `P - (1.1H + 0.5ms)`의 중앙값, 복원은 `P - 1.1H`이며 0 이하면 기준 안입니다. </details> <details><summary>Verification record</summary> - Recovery final head: `4250e5ce37ec92cbe2bead59340e04a833163143`. - Recovery delta: cherry-pick -x `4c051dd12815776664392479b5c425ea1947e32b` from merged #2020. Only the test module in `herdr-core/src/runtime/memory_analysis.rs` changed (+51/-38); the complete file matches main at `c4b89aad35ba641fd7fee393740be11fc2849ce3`, and production code matches the previously reviewed head. - Before the fix, the exact #438 fork-cutoff test failed on its one allowed retry at `6ce4e4d2b` ([3,1] instead of [3,2]). The main fix replaces fixed dates with one relative clock capture; behavior assertions remain unchanged. - Final-head `scripts/verify-cargo.sh lint`: exit0. `scripts/verify-cargo.sh test`: exit101 at holder integration after 15 targets; herdr-core 3,928 passed /0 failed /21 ignored, including #438 and the OMP fork test. - First failure: `hide-holder::it::lifecycle::a_holder_runs_its_shell_and_carries_input_and_output_across_connections`, support.rs:478, `ProgramExited` before `40 100`. This matches the reported signature of with-hide/hide-private#426; its root cause remains unresolved. - Only that failed test was retried once on the same final head through `scripts/verify-cargo.sh test-scoped -p hide-holder --test it lifecycle::a_holder_runs_its_shell_and_carries_input_and_output_across_connections -- --exact`: exit0, 1 passed /66 filtered. - Continued all 23 targets in the 14 packages not reached by fail-fast with `test-scoped --tests --no-fail-fast`; then all 20 workspace documentation targets with `test-scoped --workspace --doc --no-fail-fast`. Both exit0. Cargo metadata, executable dependency sources and result logs account for all 38 test targets plus 20 documentation targets, with no missing or repeated passing target. - Combined first attempts: 7,322 passed /1 failed /169 ignored. With the one failed-test retry: 7,323 passed /0 unresolved failures /169 pre-existing ignored. Mission check recorded PASS with `--rerun`; no test or required gate was newly skipped. - Independent delta review PASS at final head: original patch byte-identical, all 67 tests and 377 assertions retained; no blocker, product change or acceptance weakening. This review covers the delta from `6ce4e4d2b`, whose product review remains recorded below. - C1 original measurements remain pinned to `98770406f`; c2 remains skipped by the operator's delegated exception (+87.7ms). No new performance run, release build or native app verification was performed. - Final-head policy CI: https://github.com/with-hide/hide/actions/runs/41566242903, attempt1 SUCCESS; plan, policy and verify passed. Design contract run 41566242941 also passed. - The CI plan at final head / main `c4b89aad35ba641fd7fee393740be11fc2849ce3` automatically reuses full run `41501891830`, verified head `6ce4e4d2bde84c79aca5c1a91a1b0b0e7c085b38` / base `4b61785aa02a727a2e446b90a32cd83190504324`. The same fixture fix is already on main, so the effective PR change remains identical under the existing ci-plan comparison. Other lanes were skipped by that plan; this is not fresh Linux/Windows full execution at the final head. - Parent will evaluate current merge order and locked premerge checks. After-push merge-order says stay on this branch, do not stack on risky #2017, and merge main once after #2017 lands. - Local log SHA-256: lint `35f4b464852210e9de451fbe821bc80fbe5bee8a29f67a0285355f509e3a291c`, initial test `349457b1a579c84edb8c86b0963de44fb4b536d7ba6c586370f7c8083785451d`, failed-only retry `f2b3b320cd05d45ed562cc50ac459b8fe3df439d94f150e8b7aeb56c5c5c9d1a`, continuation `dbce71e5dc8659e6772e234da41f5f79d15b7adb1f239c8ce7001af99f19319e`, docs `97a7726c2a083e330ced2577eae5b69e891fbc76a10dcba5d2f9b9fdb8f0398e`. - Base: `9305a846b`. - Previous reviewed head: `6ce4e4d2b`. Previous full-run head: `76097c943`. - Previous `76097c943`: `scripts/verify-cargo.sh lint` exit0. Full workspace exit101, 7,320 passed /2 failed /168 ignored; #438 fixed-date and #439 own_devices.rs:158 no engine asked the node. Holder integration67/67. Release exit0. #439 same-head focused follow-up1/1 passed; the first full-run failure remains recorded. - Previous `6ce4e4d2b`: strict final-SHA lint exit0, full workspace exit101: 7,322 passed /1 failed (#438 fork cutoff) /169 ignored. Holder integration67/67. Real holder immediate-read and engine-contract tests each1/1; all17 holder PIDs gone. No new release build or performance measurement. - Earlier same-source full run: 7,320 passed /3 failed /169 ignored. Failures were #438, #426 holder ProgramExited before expected grid output, and guarded process spawn EINVAL22 at process.rs:1897. The guarded-process focused run passed1/1 and the final full run passed that test; neither explains the first failure, which remains preserved. - Default file barrier regression: 7 passed; removing the full-sync barrier failed the expected assertion, then source restored. - Early holder attach: public ownership before registration, real holder first frame and echoed input; ownership removal failed the expected assertion, then source restored. - Holder admission: records suite 16/16; concurrent starts preserve cap128 including unreadable records, ended records preserve room and retention128. Treating all files as live at the boundary failed with Cap130, then source restored. - pairs-3 at `98770406f`: 5 pairs, 20 load-valid runs, 3 discarded, accepted peak13.39, all23 runs left0 processes; new_tab/split20 samples each, no timeouts or no-Herdr errors. Row28 outside this node: echo slack p50+0.2 / p95+1.6ms, preserved for the gate owner. - pairs-4 at `699f322c9`: 5 restore pairs, 10 valid runs, 3 build-contaminated runs discarded, accepted peak11.09, all13 runs exit0 and left0 processes. Release hashes verified before/after. All5 own restores have66 holder starts and no terminal.session_failed/no-Herdr error. | Row30 | Herdr 5 runs (ms) | Own 5 runs (ms) | Median slack | | --- | --- | --- | --- | | Shells | 653, 718, 669, 622, 655 | 806, 1139, 744, 742, 873 | +87.7ms, failed | | Tabs | 660, 725, 676, 630, 662 | 666, 1147, 532, 532, 635 | -93.2ms | | Front | 898, 962, 917, 866, 912 | 920, 1410, 808, 813, 890 | -113.2ms | - Previous adverse evidence retained: pairs-2 row22 screen p50+0.6ms, shells H633-825/P2206-2335ms; pairs-3 shells+60.3ms, front withheld because error text could satisfy its detector. pairs-4 corrected the early attach error; diag-4 was incomplete and supplied no acceptance verdict. - Earlier workspace failures remain recorded: #438; holder lifecycle #426 reproduced once in10 on both branch and base; four mobile socket-open failures at98770406f, a focused16/16 follow-up did not establish their cause. At699f322c9 only#438 failed (7,320 passed /1 failed /168 ignored). - Earlier draft CI aggregate failed with lanes=[] and test jobs skipped. Ready CI at76097c943: https://github.com/with-hide/hide/actions/runs/41496549250 failed the restore-save ordering test on Linux and the old-record fixture on Windows; both are addressed by this follow-up. - Previous-head CI: https://github.com/with-hide/hide/actions/runs/41501891830, attempt2 SUCCESS. Attempt1 failed Windows check (fixture lld-link15890ms), Windows web E2E (fixture clang59999ms), and Windows package window check (fixture lld-link14082ms). Only failed jobs were rerun once. All passed on attempt2; no timeout was raised and no test was weakened. Root cause of the initial fixture failures remains unconfirmed. - Independent previous-head review: PASS at `6ce4e4d2b`; remaining minor follow-ups are listed under Review. </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.
Closes with-hide/hide-private#436
Summary
Review
herdr-core/src/runtime/memory_analysis.rs의 테스트 fixture와 두 fork 시나리오. 변경은 테스트 모듈에만 있습니다.Evidence
Verification record
cbefda718d11bd04e9947bfe9924ec339c9b3e464c051dd12815776664392479b5c425ea1947e32blockf -k /tmp/mission-27-gate.lock아래 동일 worktree의target/를 재사용했습니다.bash scripts/verify-cargo.sh lint: PASS.GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_NOSYSTEM=1 bash scripts/verify-cargo.sh nextest -p herdr-core -p hide-memory --no-fail-fast: 4,133 PASS, 20 ignored, retry 없음.[3, 1]FAIL, -10일 PASS, +365일[1, 3]FAIL.SystemTimeprobe로 31,536,000초 오프셋을 확인했습니다. 시스템 시계는 변경하지 않았습니다.1_79검색으로 찾은 두 고정 epoch를 모두 제거했으며, 남은 독립 transcript fixture는 ranking 기대를 검사하지 않습니다.agents/runs/에만 남겼습니다.