Repository navigation
Conversation
Stream indexed rows into the private accumulator under the existing cooperative slice and honor cancellation within a candidate page. Revalidate fresh bytes and stable file identity after any yielding verification pass. Add regression coverage for scheduling, aborts, compatibility, and file mutations.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
✅ Deterministic PR hygiene checks passed. |
|
No description provided. |
Summary
Filtered usage reports already page candidate offsets in groups of 2,000, but decoding and normalizing every row, then folding the whole page into the accumulator, still run synchronously. A page with multi-attempt usage rows can delay other requests and timer-delivered cancellation even though the complete offset set is bounded.
This follows up #816 and the upstream paging fix for the remaining scheduling portion of the Daybreak finding.
Verification
Tested with Bun 1.4.4 against fork
devat1d10758fa6ced80cdd780cb000bc5c4b83f84703.bun run test:changed tests/usage/usage-ledger-scanner.test.ts tests/usage/usage-filter-index.test.ts tests/usage/usage-filter-paging.test.ts tests/usage/usage-aggregate-cache.test.ts tests/server/api-usage.test.ts --timeout 30000— 175 passed, 0 failed, 913 assertions across five files.bun run typecheck— no type errors in 2,533 files.bun run structure:checkandbun run privacy:scan— passed.bun test tests/ci-workflows/file-size-ratchet.test.ts --timeout 30000— 9 passed, 0 failed.git diff --cached --check— passed.The full repository suite and macOS/Windows runs were not executed: the repository-wide provider/platform suites are disproportionate to this two-function read/aggregation change. This draft uses the documented scoped-validation exception; coverage includes real local management API calls, paging/rebuild behavior, and all added regressions. CI results for this PR head remain to be observed. Continuous writes during verification conservatively cause the existing bounded retry instead of publishing uncertain totals.
Checklist
Summary by CodeRabbit