Skip to content

Show account usage windows with shared sidebar choices - #1030

Merged
yansfil merged 13 commits into
mainfrom
gen-prd/usage-limits
Oct 13, 2026
Merged

yansfil merged 13 commits into
mainfrom
gen-prd/usage-limits

Conversation

@yansfil

@yansfil yansfil commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Related: #1019, #1021

Summary

Account usage now shows five-hour and weekly windows in up to three sidebar chips and a shared popover.
Settings > Usage controls shared pins and visibility, with explicit reasons for unsupported agents.
Long values wrap while switches stay in one column; the expanded navigation fits the minimum window at default text size.
The node keeps credentials private; typed readings drive both the display and background admission decisions.

Five-hour and weekly usage in the isolated Electron renderer, English at maximum text size.

Review

  • Judge the window labels, localized reason lines and chip density in the screenshots.
  • Watch hide-host/src/usage.rs for credential boundaries and herdr-core/src/usage.rs for failure and refresh state.
  • Two bounded readers poll off the runtime lock; visible reads use a five-minute cadence and shutdown cancels/joins them.
  • The core publishes changed readings only; an open popover updates its countdown once per minute.

Evidence

  • Shared pin/hide browser flow, parser states, backoff, late-event rejection and restart persistence passed.
  • Isolated Electron: 720x480, maximum text, English light/Korean dark; footer and Settings reason lines fit; the navigation scrolls at maximum text.
  • Screenshots use an external Claude CLI fixture and signed-out Codex; they capture the renderer, excluding native chrome.
  • Real Codex five-hour output and Windows/Linux native visuals were not observed locally; five-hour data uses a documented fixture.
  • design/hide-ui.lib.pen and regenerated design/hide-screens.pen passed the design contract and export inspection.
Settings screenshots

English maximum text: switches stay aligned while values wrap; navigation remains scrollable.

Korean maximum text: aligned switches and readable refusal copy.

Breaking change

Node protocol 30 removes credential-returning calls; core and device helpers must use compatible builds.

Verification record
  • PRD: agents/prd/usage-limits/prd.md (sha256 8cfe5dc081853e73a09563660509648a18a8a68db94e10d9660510b17416c604)
  • Base 441e46b → head 613e371, verified 2026-10-13T01:12:26.851Z: PASS
  • Verification report: agents/runs/usage-limits/verification-report.json and agents/runs/usage-limits/verification-report.md; source fingerprint 6fa101ddf764c36241f59d20d62ec72824c1665f2b9153eae37cabe50973365b
  • Suites:
    • S1: GREEN bash scripts/verify-cargo.sh test (exit 0)
    • S2: GREEN bash scripts/verify-cargo.sh lint (exit 0)
  • Fidelity review: 613e371; all 22 requirements covered and current findings closed, including switch alignment and minimum-window navigation.
  • Code review: 613e371; prior complete review plus navigation spacing, preserved row targets and updated tab-order/keyboard regression coverage.
  • Security review: 613e371; no blocking findings. Existing redirect account-header handling and concurrent-growth tail bounds remain follow-ups.
  • Fixes: queued reads after Hide/backoff, invisible pins including delayed events, unreadable responses, narrow switch alignment, and the 23 px minimum-window Settings navigation overflow.
  • Checks: Rust full suite 4413 passed/96 ignored; web unit 1478 passed/1 skipped; desktop unit 184 passed/4 skipped; Settings browser suite 3 passed; targeted usage browser and Electron geometry flows passed.
  • Electron geometry covers four switch right edges and first-label-line centers in EN/KO maximum text, including unavailable/refused-fourth-pin rows; navigation fit without scrolling is checked at default text.
  • Previous CI found navigation overflow and obsolete tab-order expectations; both were reproduced or identified and corrected. An unrelated project-row focus test passed its retry and remains a flaky follow-up.
  • Earlier credential request fixtures were updated to the current protocol; this report supersedes earlier heads and source-moved verification.
  • Delivery follows the approved prerequisite rebase; current-main merge-tree was conflict-free before PR creation.
  • CI: 613e371 passed all 19 applicable checks, including required verify; 2 planned skips. Run.
  • Evidence: 32 registered (12 log, 10 screenshot, 10 file); paths are local to the run directory
    • agents/runs/usage-limits/usage-e2e.log
    • agents/runs/usage-limits/web-suite.log
    • agents/runs/usage-limits/review-fixes-tests.log
    • agents/runs/usage-limits/pin-reconcile-test.log
    • agents/runs/usage-limits/host-reproduction.log
    • agents/runs/usage-limits/design-contract-final.log
    • agents/runs/usage-limits/late-pin-test.log
    • agents/runs/usage-limits/web-switch-tests.log
    • agents/runs/usage-limits/usage-footer-en-electron.png
    • agents/runs/usage-limits/usage-footer-en-electron.json
    • agents/runs/usage-limits/usage-footer-ko-electron.png
    • agents/runs/usage-limits/usage-footer-ko-electron.json
    • agents/runs/usage-limits/usage-popover-en-electron.png
    • agents/runs/usage-limits/usage-popover-en-electron.json
    • agents/runs/usage-limits/usage-popover-ko-electron.png
    • agents/runs/usage-limits/usage-popover-ko-electron.json
    • agents/runs/usage-limits/usage-settings-bottom-en-electron.png
    • agents/runs/usage-limits/usage-settings-bottom-en-electron.json
    • agents/runs/usage-limits/usage-settings-bottom-ko-electron.png
    • agents/runs/usage-limits/usage-settings-bottom-ko-electron.json
    • agents/runs/usage-limits/usage-settings-en-electron.png
    • agents/runs/usage-limits/usage-settings-en-electron.json
    • agents/runs/usage-limits/usage-settings-ko-electron.png
    • agents/runs/usage-limits/usage-settings-ko-electron.json
    • agents/runs/usage-limits/usage-settings-unsupported-en-electron.png
    • agents/runs/usage-limits/usage-settings-unsupported-en-electron.json
    • agents/runs/usage-limits/usage-settings-unsupported-ko-electron.png
    • agents/runs/usage-limits/usage-settings-unsupported-ko-electron.json
    • agents/runs/usage-limits/native-usage-renderer.log
    • agents/runs/usage-limits/settings-nav-repro.log
    • agents/runs/usage-limits/settings-nav-fixed.log
    • agents/runs/usage-limits/nav-design-contract.log
  • Changed paths: 78 (see Files changed)
  • Delivery: mode pr, branch gen-prd/usage-limits, base main

@yansfil
yansfil merged commit f8b9960 into main Oct 13, 2026
21 checks passed
@yansfil
yansfil deleted the gen-prd/usage-limits branch October 13, 2026 01:43
yansfil added a commit that referenced this pull request Oct 13, 2026
Related: #1030

## Summary

- At maximum Interface text in the smallest window, #1030 left Mobile,
GitHub and About below the visible Settings list.
- The grouped pages now scroll in their own bounded region; About stays
fixed at the foot of the navigation.
- Existing row sizes and the single keyboard navigation order are
preserved, with the page content scrolling independently.

![English, 720x480 at maximum text: About stays visible below the
scrolling page
list.](https://github.com/yansfil/pr-assets/blob/main/hide/settings-list-large-text/c8e79c2/usage-settings-en-electron.png?raw=true)

## Review

- **Visual judgment**: Does the fixed About row make the large-text list
comfortable to use in the minimum window?
- **Files to inspect**: `web/src/SettingsSheet.tsx` keeps all ten tabs
in one Radix collection while bounding only the grouped pages.

## Evidence

- Settings browser suite: all three tests passed, including EN/KO
maximum-text keyboard reachability and independent scrolling.
- Isolated Electron: EN light and KO dark at 720x480 and maximum text
passed; About remained fully visible.
- Web and desktop typecheck, lint, unit tests and build; scoped Rust
checks; policy checks; design contract passed.
- Native captures cover the Electron renderer; native window chrome and
foreground OS keyboard routing were not tested locally. The full macOS
desktop CI lane passed.
- `design/hide-screens.pen` was regenerated from the updated Settings
builder.

<details><summary>Additional evidence</summary>

![Korean dark, 720x480 at maximum text: 정보 remains fixed below the page
list.](https://github.com/yansfil/pr-assets/blob/main/hide/settings-list-large-text/c8e79c2/usage-settings-ko-electron.png?raw=true)

</details>

<details><summary>Verification record</summary>

- Head: `c8e79c2e42d16b40cfd761391fb91600cdc6f38a`.
- Base: `14feee442b053cc93bc1bd68f6a6c1ed6b0cb950`; only the six-file
navigation fallback follows #1030.
- The approved usage-limits run was retired after #1030 merged head
`613e37125` as `f8b99601c`, before this fallback was delivered.
- This follow-up is delivered manually under recorded Observer
authority; the old run state is unchanged and no current Sasu
verification PASS is claimed.
- `bash scripts/verify-web.sh`: web 1482 passed / 1 skipped; desktop 184
passed / 4 skipped; types, lint and builds passed.
- `bash scripts/verify-web.sh web e2e e2e/settings-general.spec.ts`: 3
passed.
- `bash scripts/verify-web.sh desktop e2e e2e/usage.spec.ts`: 1 passed,
fresh EN/KO renderer captures.
- `bash scripts/verify-cargo.sh hakari`, `fmt-check`, `clippy -p
herdr-core --all-targets -- -D warnings`, and `test-scoped -p
herdr-core`: passed; 2125 tests passed / 7 ignored.
- Policy suite: 325 passed with `LC_ALL=en_US.UTF-8`; structural policy
checks passed. The initial run had one stderr assertion failure caused
by inherited unsupported macOS `LC_ALL=C.UTF-8`.
- `node scripts/check-design-contract.mjs` and `git diff --check`:
passed.
- The extra local browser sweep was stopped by recorded Observer
instruction once full CI coverage passed: 116 passed, one interrupted,
152 not run. The extra local desktop sweep was not started; the macOS
desktop CI lane passed.
- Fidelity and Code reviews: PASS at the exact head, no Fix now findings
or new follow-up requests.
- CI: [verify run
38335780618](https://github.com/modakbul-gongbang/hide/actions/runs/38335780618)
passed, including all four browser shards (269 passed) and macOS desktop
E2E (69 passed, 9 planned skips), with no flaky tests reported; [design
contract](https://github.com/modakbul-gongbang/hide/actions/runs/38335780390)
passed. Twelve checks succeeded and seven unrelated lanes were skipped
by the plan. Merge remains an operator decision.

</details>
yansfil added a commit that referenced this pull request Oct 13, 2026
Related: #1030

Fixes #885

## Summary

- Add daily new-token history below usage limits and in Overview > Usage
for all six supported runtimes.
- Exclude cache reads from intensity; show token breakdowns, shares and
API-rate costs on hover.
- Retain 45-day receipts and 400-day daily totals with replay-safe
restart and durable capacity warnings.
- Send sparse calendar days in an independent usage revision; keep
confirmed Issue source menus in sync.
- Fetch the public [MIT-licensed LiteLLM
dataset](https://github.com/BerriAI/litellm/blob/main/LICENSE) on the
own node.

![Earlier private native fixture: history and hover cost, English at 720
x
480.](https://github.com/yansfil/pr-assets/blob/main/hide/usage-ledger/56b19df/usage-history-en-default.png?raw=true)

## Review

- **Human judgment**: reserved detail space, cost wording and Korean
readability at minimum window size.
- **Watch** readers and ledger store: accounting, privacy, replay and
retention; SQLite source files remain read-only.
- **Watch** worker and snapshot code: off-lock work, independent usage
revision, sparse days with inclusive bounds.
- **Resident cost**: no work per input; one 1 MiB/10 ms read budget and
20 ms rest; reads pause without a window.
- **Bounds**: 10k files/agent, 1M receipts/device, 100k daily rows, 512
MiB store; joined workers and coalesced hints.
- **Watch** state migration and node shutdown: bounded lock acquisition,
caller wakeup and resource release.
- **Delivery decision**: the operator chose “CI 초록이면 머지”; the Observer
merges only after final CI and premerge-check pass.

## Evidence

- Empty usage shrank 310,904 to 8,266 bytes; full fixture snapshots
shrank 322,612 to 37,607 bytes.
- Final focused isolation test passed; sparse projection 7 and web 1,496
tests passed, with 1 web skip.
- Web build/lint, generated wire and design checks passed; all three
final reviews found no Fix now.
- Two native flows passed before the stop instruction: exact totals,
fixed hover geometry, filters, EN/KO and small-window fit.
- **Incomplete**: matched post-fix local timing hit ENOSPC twice; no
completed comparison or final-head full local seal; tracked in
[#1064](https://github.com/modakbul-gongbang/hide/issues/1064).
- The operator stopped further local runs; CI remains pending. The prior
full local PASS covers an earlier head only.
- Read-only 8.70 GB traversal completed in 26m25s; matched key trials
had median p95 16.50ms in both conditions.
- Tab parity and the 3,573 skips' reason breakdown remain unproven,
accepted with [follow-up
#1045](https://github.com/modakbul-gongbang/hide/issues/1045). The
operator accepted this limitation on 2026-10-13: "한계 기록하고 진행".
- Initial history duplication, delayed Issue source acknowledgement,
migration and shutdown defects were reproduced and repaired.
- OS-compositor/foreground checks and installed-app replacement were not
performed; captures use isolated Electron renderers.
- Generated wire, coverage, tokens and Pen changes preserve all 59
unrelated main sheets; Pen's SVG-mark limit remains.

<details><summary>Additional visual evidence</summary>

![Private browser fixture: the open Issue source dropdown reflects the
confirmed Automatic
choice.](https://github.com/yansfil/pr-assets/blob/main/hide/usage-ledger/acaa075/menu-issue-source.png?raw=true)

![Private native fixture: Korean dark theme at largest text
size.](https://github.com/yansfil/pr-assets/blob/main/hide/usage-ledger/56b19df/usage-history-ko-largest.png?raw=true)

![Browser component fixture: the larger calendar and all six runtime
shares; synthetic
values.](https://github.com/yansfil/pr-assets/blob/main/hide/usage-ledger/99c577a/light-800-reference-x1-rest.png?raw=true)

</details>

<details><summary>Menu echo measurement</summary>

- Before: six ledger-on echoes 61.34–95.29ms, pooled median 74.18ms;
ledger off 13.07–21.65ms, median 18.73ms.
- Independent usage section with the earlier web bundle: on run medians
14.81/19.04/17.42ms, off 16.95/18.82/16.78ms; pooled 15.82/17.68ms.
- That set includes one 23.18ms on sample, explicitly accepted by the
Observer as noise in the matched comparison.
- Freshness confirmation with rebuilt web: on samples
12.82,17.95,16.75,19.99,17.38,17.15ms; off
17.31,14.34,17.86,13.77,17.78,14.52ms.
- Unrelated navigation carries 55–64KB rather than 366–375KB; the
initial full snapshot at that stage still included dense history at
about 366KB. The later sparse-calendar measurement below supersedes that
initial size.
- Measured via the same isolated Issue-source fixture, three runs per
condition, with temporary lock probes removed before delivery.

</details>

<details><summary>Copied helper fixture</summary>

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.

</details>

<details><summary>Migration and shutdown failure verdict</summary>

The first sealed run failed
`connect_build::the_first_connect_moves_the_legacy_state_folder_and_its_daemon_once`
at `hided/tests/it/connect_build.rs:318` because 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_CORE` or 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](https://github.com/modakbul-gongbang/hide/issues/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_address` at
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.

</details>

<details><summary>Sparse calendars and incomplete installation
comparison</summary>

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](https://github.com/modakbul-gongbang/hide/issues/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.

</details>

<details><summary>Verification record</summary>

- Final source head: `ade705f11a9a5b764897160a15c4519425a435e5`; product
sparse change: `a2cf2054afd4eab8290b974d93ed2a7d19c4fa06`.
- Final CI: [run
38404383049](https://github.com/modakbul-gongbang/hide/actions/runs/38404383049),
pending overall at this update; remote job115320923062 passed41/41
without retry in363.283s. No overall CI success is inferred.
- Operator delivery decision relayed in letters5292/5293: “CI 초록이면 머지”;
no more local comparison/native/full-verify runs, no further push unless
CI fails.
- The final-head full local seal was explicitly skipped. Existing report
PASS at `7ffbc7ddd51270b7c83d68e968bff6ad85007c2d` on
`2026-10-13T12:28:58.710Z` is historical and does not attest the final
head.
- That prior seal ran full Rust tests and lint in245.4s and8.1s; its196
registered artifacts remain historical, unchanged evidence.
- Approved contract hash:
`0ad411fa57e4be038d3c9e8aa6788318f3c77d8f57918987e854cda06ddc84c7`;
pinned merge base `51dcf50c4f0c21901f9aed7b6b6315569cdb1a37`.
- Code, Fidelity and Security reviewed the sparse delta at a2cf and
final test-only delta at ade, each with no Fix now; final reports
`review/ci-sparse-{code,fidelity,security}-ade.md`.
- The final delta changes only
`herdr-core/src/runtime/tests/usage_limit.rs`; focused real runtime
isolation test1PASS0.05s. Production binaries are unchanged from a2cf.
- Sparse checks: projection7PASS, full web1496PASS/1skip,
build/lint/generated/designPASS; pending and zero-token mutation probes
each failed as predicted.
- Native product flows:2PASS34.3s before the stop instruction; isolated
Electron renderer captures, not OS-compositor captures. Browser
interaction pass incomplete.
- Main comparator37f4 on ef3c: PR1063 closed without merge;
local41PASS577.350s and Linux41PASS346.861s. Its private worktree was
removed.
- Sparse Linux remote job115311675509:41PASS415.426s. Its a2cf run
failed the obsolete ratio and was superseded; the remote success is not
an overall-CI PASS.
- Failed local attempts retained in `ci-local-core-move-fixed*`; all
owned failed fixture roots and surviving fixture daemons were cleaned.
Both timing runs are invalid.
- Evidence findings and limits: `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.
- Earlier accounting/privacy, lifecycle, menu and copied-helper reviews
remain in the review chain; final delta reviews are not a new
independent read of every earlier file.
- B19 tab parity and skip reason breakdown: operator-accepted
limitation, follow-up #1045. Late backend acquisition versus teardown
remains #1057; hostile namespace replacement remains a follow-up.
- The Observer owns premerge-check and merge. No merge or installed-app
change was performed by this implementation run.

</details>
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant