Skip to content

Commit bf959d5

Browse files
committed
test(cli): 用 n=10 实测区间校准锚定说明
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017uFVNMmTxLpmfQYiuKM1Yx
1 parent f33f2d8 commit bf959d5

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

packages/cli/test/login-json-ndjson.e2e.test.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,21 +90,25 @@ const AUTH_DOCS = resolve(REPO_ROOT, 'content/docs/permissions/authentication.md
9090
* module loading — is process startup, about which #6531 says nothing.
9191
*
9292
* Armed at spawn instead, this budget policed startup rather than the contract.
93-
* Measured on this file (5 runs, probe replicating {@link runDeviceLogin}), of
93+
* Measured on this file (10 runs, probe replicating {@link runDeviceLogin}), of
9494
* the latency from spawn to the record being readable:
9595
*
9696
* | segment | measured |
9797
* |-------------------------------------------------------|--------------|
98-
* | spawn → device-code request (startup) | 6844–8841 ms |
98+
* | spawn → device-code request (startup) | 6844–9587 ms |
9999
* | device-code response → record readable (the contract) | 13–39 ms |
100100
*
101101
* So ~99.7% of the old budget was spent on work the contract does not govern,
102-
* leaving startup needing only a ~2.3x slowdown to exhaust 20 s — ordinary on a
103-
* box running four concurrent worktree builds, or on a merge-queue runner. Its
104-
* cloud sibling, on the identical harness, duly ejected two unrelated PRs
105-
* (#6847 spec-only, #6835 docs-only) before #6855 re-anchored it. Anchored
106-
* here, the budget covers a ~20 ms window with ~500x headroom, and the number
107-
* itself is unchanged: this is a re-anchoring, NOT a widened timeout.
102+
* leaving startup needing only a ~2.1x slowdown to exhaust 20 s. The spread in
103+
* that row is itself the argument: the same probe measured 6844 ms on a quiet
104+
* box and 9587 ms once other worktrees started building, with nothing about
105+
* the contract having changed in between. The cloud sibling, on this identical
106+
* harness, duly ejected two unrelated PRs from the merge queue (#6847
107+
* spec-only, #6835 docs-only) before #6855 re-anchored it.
108+
*
109+
* Anchored here, the budget covers a ~20 ms window with ~500x headroom, and
110+
* the number itself is unchanged: this is a re-anchoring, NOT a widened
111+
* timeout.
108112
*/
109113
const RELEASE_DEADLINE_MS = 20_000;
110114

0 commit comments

Comments
 (0)