Repository navigation
Add daily usage history and hover cost details - #1044
Merged
Merged
Conversation
yansfil
added a commit
that referenced
this pull request
Oct 15, 2026
## Summary CI는 PR이 바꾼 경로로 돌릴 레인을 고르는데, 규칙에 없는 경로가 하나라도 있으면 모든 레인을 돌립니다. 10-13 이후 머지된 PR 58개 중 13개가 그랬고, 원인은 테스트가 읽는 계약 파일, 레인이 부르는 workflow, 디자인 스크립트, `web/vite.config.ts`였습니다. 이제 이 경로들은 실제로 읽는 레인과 크레이트만 돌립니다. 같은 58개를 다시 계산하면 전체 레인 PR 13 → 1, 잡 855 → 823, macOS 잡 58 → 45입니다. - **계약 5개** (`hided-ws.schema.json`, `snapshot-wire-enums.json`, `agent-adapters.json`, `hide-cli.json`, `usage-coverage.json`): 읽는 테스트의 크레이트만 `rust`로, 웹 테스트가 읽으면 `checks`, 셸이 import하면 `web-e2e`도. - **레인 workflow 4개** (`web-e2e.yml`, `desktop-e2e.yml`, `os-contract.yml`, `remote-mailbox.yml`): 그 workflow를 부르는 레인만. - **`web/vite.config.ts`**: 셸을 빌드하거나 웹 단위 테스트를 돌리는 레인 전부. Rust만 도는 레인은 뺍니다. - **디자인 생성기, 토큰 맵, 디자인 검사**: `policy`만. `design-contract.yml`이 모든 PR에서 따로 검사합니다. - **`Cargo.lock`은 전체 그대로**: 거의 모든 크레이트가 `workspace-hack`에 의존해 lock 변경이 모든 크레이트에 닿습니다. - **따라가다 찾은 누락** (두 번째 커밋): `docs/UI_BEHAVIOR.md`, `docs/AI_PROVIDERS.md`, 에이전트 로고 manifest는 테스트가 읽는데 그 레인을 돌리지 않았습니다. 이제 돌립니다. ## Review - **판단해 주세요**: `agent-adapters.json`은 웹 셸 파일 규칙(`checks`, `web-e2e`)을 따라 데스크톱 e2e를 돌리지 않습니다. `agentAdapters.ts` 변경도 지금 그렇고, 데스크톱에서만 깨지면 nightly가 잡습니다. - **판단해 주세요**: brief 목록 밖인 `web-e2e.yml`, `desktop-e2e.yml`, `os-contract.yml`과 디자인 검사 6개도 같은 규칙이라 넣었습니다. workflow는 테스트가 `pr.yml`의 `uses:`에서 부르는 레인을 읽어 맞춥니다. - **조심해서 볼 파일**: `scripts/ci-plan.py` `classify` - 다른 규칙이 없는 경로는 이제 READERS가 전부 정합니다. 기존 READERS 경로는 다른 규칙이 먼저 잡아 그대로입니다. - **조심해서 볼 파일**: `scripts/ci-plan.py` READERS - 크레이트는 그 크레이트 테스트만 돌립니다. 테스트가 아닌 코드가 계약을 읽게 되면 크레이트 변경 규칙으로 옮겨야 합니다. ## Evidence - **확인한 것**: `python3 -m unittest discover -s scripts/tests -p 'test_*.py'` 343개 통과. - **확인한 것**: 계약 테스트는 기대값을 소스에서 얻습니다. 주석을 뺀 코드에서 파일 이름을 부르는 크레이트와 웹 파일이 계획된 크레이트와 레인과 같아야 합니다. - **확인한 것**: 레인 하나를 빼는 변조 3개(계약, vite 설정, `os-contract.yml`)가 각각 테스트를 실패시킵니다. - **확인한 것**: 재현 스크립트로 PR 58개의 merge commit diff를 변경 전후 planner에 넣었습니다. spec은 merge commit 시점 내용으로 읽었습니다. 표는 아래. - **확인하지 못한 것**: 머지 뒤 실제 PR 런의 잡 수와 대기 시간. 이 PR은 `scripts/ci-plan.py`를 바꿔 자기 런은 전체 레인입니다. - **확인하지 못한 것**: 리더 스캔은 파일 이름 문자열로 찾아, 경로를 조각으로 이어 붙여 읽는 코드는 놓칠 수 있습니다. <details><summary>PR별 전/후 (전체 레인이던 13개)</summary> 잡 수는 `plan`, `verify`와 레인별 잡(`web-e2e` 5, `os-contract` 2, `package` 3, 나머지 1)의 합입니다. Rust 크레이트는 `rust` 레인이 lint와 테스트를 도는 범위입니다(전체 레인이면 workspace 전체). | PR | Unclassified paths before | Full after | Jobs | macOS jobs | Rust crates | Lanes dropped | | --- | --- | --- | --- | --- | --- | --- | | #1108 | `contracts/hided-ws.schema.json` | no | 18 -> 16 | 2 -> 0 | workspace -> 11 of 16 | os-contract-macos, desktop-e2e | | #1085 | `contracts/hide-cli.json` | no | 21 -> 20 | 3 -> 2 | workspace -> 8 of 16 | os-contract-macos | | #1083 | `.github/workflows/remote-mailbox.yml` | no | 21 -> 21 | 3 -> 3 | workspace -> 14 of 16 | - | | #1076 | `scripts/gen-tokens.mjs` | no | 18 -> 10 | 2 -> 0 | workspace -> 1 of 16 | os-contract, os-contract-macos, windows-check, windows-e2e, windows-desktop, remote-mailbox, desktop-e2e | | #1074 | `contracts/hided-ws.schema.json` | no | 18 -> 17 | 2 -> 1 | workspace -> 3 of 16 | os-contract-macos | | #1070 | `scripts/gen-screens.mjs`, `web/vite.config.ts` | no | 18 -> 17 | 2 -> 1 | workspace -> 8 of 16 | os-contract-macos | | #1056 | `contracts/snapshot-wire-enums.json` | no | 21 -> 20 | 3 -> 2 | workspace -> 10 of 16 | os-contract-macos | | #1051 | `contracts/hided-ws.schema.json` | no | 21 -> 20 | 3 -> 2 | workspace -> 3 of 16 | os-contract-macos | | #1049 | `scripts/pen-token-map.json` | no | 18 -> 3 | 2 -> 0 | workspace -> not run | rust, checks, os-contract, os-contract-macos, windows-check, windows-e2e, windows-desktop, web-e2e, remote-mailbox, desktop-e2e | | #1044 | `.github/workflows/remote-mailbox.yml`, `contracts/agent-adapters.json`, `contracts/hided-ws.schema.json`, `contracts/usage-coverage.json` | no | 21 -> 21 | 3 -> 3 | workspace -> 15 of 16 | - | | #1037 | `contracts/hided-ws.schema.json` | no | 18 -> 17 | 2 -> 1 | workspace -> 3 of 16 | os-contract-macos | | #1030 | `Cargo.lock`, `contracts/agent-adapters.json`, `contracts/hided-ws.schema.json`, `contracts/usage-coverage.json` | yes | 18 -> 18 | 2 -> 2 | workspace -> workspace | - | | #1017 | `contracts/snapshot-wire-enums.json` | no | 18 -> 17 | 2 -> 1 | workspace -> 9 of 16 | os-contract-macos | </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.
Related: #1030
Fixes #885
Summary
Review
Evidence
Additional visual evidence
Menu echo measurement
Copied helper fixture
The unchanged private helper test repeatedly timed out before its owner-watch acknowledgement.
A copied executable created as an APFS clone took 5.528s on its first launch and 0.029s on the second; materialized bytes took 1.187s and 0.010s.
The main baseline clone took 1.586s and 0.011s, with materialized bytes at 1.207s and 0.010s.
These measurements identify slow first execution of the candidate clone; they do not establish a specific OS validation mechanism.
Production device installation writes bytes over the link, and no production macOS path clones a helper executable.
The fixture now prepares independent bytes with retained executable permissions, matching that installation behavior; it closes the writable file before launch.
Its protocol assertions, owner-watch behavior and five-second deadline are unchanged, with no warm-up launch.
The original module passed four tests with one intentional owner-fixture ignore; committed-head full Rust tests and lint then passed in245.4s and8.1s. CI applies separately to the final head.
Migration and shutdown failure verdict
The first sealed run failed
connect_build::the_first_connect_moves_the_legacy_state_folder_and_its_daemon_onceathided/tests/it/connect_build.rs:318because the legacy instance lock was still held after stop.This test starts the usage worker, but its whole-folder rename does not execute
MOVES_WITH_COREor the core-transfer copy/reown path.An isolated retry passed, which did not settle the failure.
Private macOS forced-exit trials reproduced six failures in 24: process identity was already unavailable while the instance lock remained held.
The original failure log did not record that branch, so it is not retroactively attributed uniquely to this ordering.
The fix waits at most two seconds for the actual lock after stopping a proven daemon, holds it through rename, and reports timeout without moving the folder; an unproven holder is refused immediately.
The real-lock regression failed before the change, and all nine state-move tests plus the same 24 forced-exit trials passed after it.
Linux and Windows forced-exit trials were not run locally; the legacy-folder migration is Unix-only.
Lifecycle inspection also found pending own-node callers waiting for host answers after close.
They now wake through their existing bounded channels; unfinished host work retains its slot and deadline.
The real blocked-host regression failed before the fix and passed after it, with the command still blocked and a replacement node able to acquire the released label-generator lock.
Teardown-only release requests remain available under the prior cap and timeout.
The older late AI backend creation versus release race on timeout remains a follow-up (#1057); this change does not claim complete fencing of that AI registry.
A later full Rust run exposed an immediate private-daemon restart failure in
mobile::a_moved_core_lets_in_only_the_phones_paired_at_its_addressat line 474.The instance lock still used close-only File ownership; a deterministic inherited-descriptor regression reproduced the same refusal after owner drop.
Instance and both connection locks now use the existing platform explicit-unlock guard, preserving their immediate or blocking acquisition semantics.
The inherited-descriptor regression and original mobile integration pass after the fix; the original full failure did not identify the inheriting child, so that specific attribution remains unproven.
Sparse calendars and incomplete installation comparison
The initial snapshot sent a dense calendar even when no usage existed.
Sending only recorded calls plus calendar bounds reduced empty usage from 310,904 to 8,266 bytes.
The measured full snapshots were 322,612 and 37,607 bytes; their rest sections were 11,215 and 28,768 bytes because fixture topology differed.
The unchanged sparse product also produced an 8,266-byte usage section in the later repeat.
The web fills empty dates only for the mounted calendar, up to 371 cells, while recorded zero-new-token calls retain cache tokens and cost.
Pending and recorded-zero-token mutations each failed their intended regression.
The follow-up test change removes an obsolete payload-size ratio and retains both direct serialized usage-absence assertions.
Fixture reconnect polling, transfer logic and the 30-second deadline are unchanged.
The remote mailbox history includes failures at 99c, 56b, eeb2 and 4561, followed by successful runs at acaa and 7ffb; the sparse product at a2cf also passed the remote lane.
Linux core-move totals were main 346.861s, acaa 408.844s, 7ffb 448.400s and sparse a2cf 415.426s, each with 41 passes in those successful runs.
The final ade705f remote lane also passed all 41 cases without retry in 363.283s.
Different hosted runners prevent attributing those wall-time differences to the product alone.
The valid local pre-sparse candidate and main runs were 536.699s and 577.350s, with different ambient load.
Their last-sampled source CPU medians were 6.4383s and 4.4125s, and physical process-write medians 792,576 and 544,768 bytes; these are not final rusage or fsync counts.
The store was observed checkpointing from a 4,096-byte DB plus 57,712-byte WAL to a 57,344-byte DB and empty WAL, without observed repeated WAL growth.
The two post-fix local attempts hit ENOSPC and are discarded for timing: 28 passes/13 failures, then 11 passes/30 failures including the interrupted case.
A matched post-fix result is therefore not claimed.
Follow-up #1064 preserves the baseline, failed runs, CPU/store evidence and reproduction steps.
The operator's later decision supersedes the additional local comparison, native and final full-verification plan.
Two native flows had already finished successfully in 34.3s before that instruction was read, using the sparse product binaries.
The Aside gallery showed pending dates, but the remaining browser interaction/visual pass was stopped; its tab and server were closed.
Merge authority stays with the Observer and requires green CI on the final head plus the repository premerge check.
Verification record
ade705f11a9a5b764897160a15c4519425a435e5; product sparse change:a2cf2054afd4eab8290b974d93ed2a7d19c4fa06.7ffbc7ddd51270b7c83d68e968bff6ad85007c2don2026-10-13T12:28:58.710Zis historical and does not attest the final head.0ad411fa57e4be038d3c9e8aa6788318f3c77d8f57918987e854cda06ddc84c7; pinned merge base51dcf50c4f0c21901f9aed7b6b6315569cdb1a37.review/ci-sparse-{code,fidelity,security}-ade.md.herdr-core/src/runtime/tests/usage_limit.rs; focused real runtime isolation test1PASS0.05s. Production binaries are unchanged from a2cf.ci-local-core-move-fixed*; all owned failed fixture roots and surviving fixture daemons were cleaned. Both timing runs are invalid.ci-sparse-verdict-a2cf.md; source CPU/store samples, stack samples, snapshot sizes, CI logs, reviews and native captures remain local. New evidence is not claimed covered by the old seal.