Repository navigation
fix(usage): yield within indexed row decoding and aggregation - #8800
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. |
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 the indexed paging fix by making the remaining row decoding and aggregation work cooperative.
Verification
Recorded local validation:
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.Posted-head CI 43812029790 passed, including the Typecheck step and test changed job. Catalog checks also passed. This is exact-head hosted evidence; the local results above are retained prior validation and were not rerun for this status change.
A source comparison against dev
c36793a9336b70cfe5bc3b7f6e6f751e730fb6fcfound no duplicate implementation or incompatible contract change requiring a rebase. Maintainer security review and installed/live application validation remain separate; review readiness does not claim merge or release acceptance.Checklist
The security checkbox records implementation review; explicit maintainer security review remains required before merge.
Summary by CodeRabbit