perf: window review timeline context hydration#67
Open
stainlu wants to merge 2 commits into
Open
Conversation
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.
Summary
Linkheader pagination instead of fetching every timeline page before prompt compaction.dashboard/in the CI sparse checkout sotest/dashboard-worker.test.tscan import the dashboard worker duringpnpm check.Why
collectItemContextcurrently full-paginatesissues/{number}/timeline, then keeps only 80 compacted entries. On large OpenClaw threads that means N GitHub REST calls even though the model receives a small prompt window.With this change, large timeline hydration uses the first page's
Linkheader to jump to the final page range. A 3,000-event timeline goes from 30 timeline API calls to 2 calls for the usual 80-entry prompt window, while keeping the first 40 and latest 40 entries.Verification
pnpm run buildpnpm run test:unitpnpm run format:checkpnpm exec oxfmt --check --threads=1 .github/workflows/ci.yml src/clawsweeper.ts test/clawsweeper.test.tsgit diff --checkpnpm run checkprogressed through active-surface, limits, build:all, lint, and unit tests locally, then failed under local Node 22 in existing repair notifier tests that require the repo's Node >=24 runtime.