Repository navigation
fix(codex): keep catalog refreshes fast during older-session discovery - #150517
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 16, 2026, 11:03 PM ET / September 17, 2026, 03:03 UTC (Revision 2). ClawSweeper reviewWhat this changesThe Codex session catalog favors recent listing pages in its existing cache so discovering older sessions does not force unchanged refreshes to repeat native requests. Merge readiness✅ Ready for maintainer review This remains useful work beyond the earlier merged fixes, with no blocking correctness findings. The updated evidence appropriately limits the performance claim to avoided requests, resolving the previous measurement caveat. Priority: P2 Review scores
Verification
How this fits togetherThe Codex plugin supplies OpenClaw's session catalog with native session metadata from local and paired-node app-servers. Its page cache sits between catalog refreshes and native pagination, before visibility filtering and delivery to consumers. flowchart TD
A[Catalog refresh or older discovery] --> B[Visible session page builder]
B --> C[Source-scoped page cache]
C --> D{Fresh or pending page?}
D -->|Reuse| F[Visibility filtering]
D -->|Fetch or refresh| E[Native Codex catalog]
E --> C
F --> G[Sessions and continuation cursor]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +55, Tests +146, Docs +4. Total +205 across 8 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep cache retention within the existing catalog owner, preserving native pagination, visibility checks, and freshness without adding configuration or persistent state. Do we have a high-confidence way to reproduce the issue? Yes, at source level: a 20-page head walk followed by enough older pages exceeds main's ordinary 32-page cache and evicts pages needed by the next refresh. The registered-provider regression covers that sequence; no runtime reproduction was executed here. Is this the best way to solve the issue? Yes. A bounded preference in the existing cache directly addresses the eviction mechanism while preserving native requests, expiry, and public contracts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9ca2d1dfcd16. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Updated the paired-node assertions to check the internal cache hint explicitly: both head-fill steps are favored, and an older continuation is not. All 33 node/discovery tests, the follow-up changed-file checks, and a fresh independent review passed. The PR description now states the acceptance claim precisely: the registered-provider reproduction eliminates 19 redundant native requests per unchanged head refresh, with identical results and cursors and unchanged cache bounds and expiry. Production latency and CPU measurements remain a deployment follow-up. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
openclaw#150517) Keep recent native session catalog refreshes reusable while background discovery visits older sessions. Favor at most 20 head-walk pages within the existing 32-page source cache, preserving its expiration policy, native cursors, visibility checks, and shared pending producers. The registered-provider regression eliminates 19 redundant native requests per unchanged head refresh after deeper discovery, with identical results and continuation. Focused catalog and node tests, full changed-file checks, independent review, and exact-head CI passed. Production latency and CPU measurements remain a deployment follow-up. Related: openclaw#149773, openclaw#149879, openclaw#150112.
What Problem This Solves
Refreshing the native session catalog can repeatedly scan the same hidden sessions while background discovery pages through older sessions.
Related: #149773, #149879, #150112.
User Impact
Recent catalog refreshes reuse their cached pages during older-session discovery. Native ordering, cursors, visibility checks, and the 32-second cache lifetime are preserved.
Why This Change Was Made
A filtered head request can walk 20 native pages. Older discovery walks can then evict that entire prefix from the 32-page source cache, making the next unchanged refresh repeat 19 native requests. Cache admission now favors pages belonging to a head walk, bounded to 20 across all queries within the existing 32-page total. Pending requests remain shared and settle normally.
Evidence
The registered provider regression interleaves a 40-row head request with three deeper discovery walks using the default 50-row limit. Each unchanged head makes 19 extra native requests before the fix and zero afterward, with identical results and continuation cursors. Discovery still reaches a visible session beyond 4,300 managed sessions.
Validation: 92 focused catalog tests passed, followed by a final rerun of all 28 tests in the two changed test files. Full changed-file checks and independent P2 review passed. CI identified two node-listing assertions for the previous helper signature; those now explicitly check head-fill and continuation cache hints. All 33 node/discovery tests and their changed-file checks passed, with a second clean independent review.
Checks cover pending and settled page reuse, cache bounds across query variants, expiration, background refresh, source isolation, cancellation, and native paging. The demonstrated performance claim is eliminating redundant native page requests under this interleaved workload. The synthetic proof does not establish production latency or CPU savings; those require measurement after deployment. The cache size and expiration policy stay unchanged.