Repository navigation
fix: reduce repeated work while polling session pull requests - #147373
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 13, 2026, 4:54 PM ET / 20:54 UTC (Revision 2). ClawSweeper reviewWhat this changesCaches session PR references and reads compact session metadata to reduce repeated transcript searches and saved-prompt decoding during Control UI polling. Merge readiness✅ Ready for maintainer review This remains a useful performance fix: current main still repeats transcript searches during unchanged polling. No blocking correctness or security defect was found in the introduced changes. Priority: P2 Review scores
Verification
How this fits togetherThe Gateway combines PR links from assistant messages with GitHub branch information to populate session PR indicators. This change caches the transcript-derived references while preserving the existing GitHub refresh and subscription lifecycles. flowchart LR
A[Session PR polling] --> B[Compact session metadata]
B --> C[Transcript version check]
C --> D[Cached PR references]
C --> E[Search and read assistant messages]
E --> D
D --> F[GitHub PR lookup and cache]
F --> G[Session PR indicators]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +157, Tests +210. Total +367 across 7 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep transcript-version ownership with the transcript subsystem and reuse bounded subscription-owned caching without changing PR selection or GitHub backoff behavior. Do we have a high-confidence way to reproduce the issue? Yes, from source: repeated PR-loader calls on unchanged sessions still invoke transcript search on current main, even when GitHub facts are cached. Runtime reproduction was not performed in this read-only review. Is this the best way to solve the issue? Yes. The patch reuses existing cache and compact-metadata contracts, with owner-supplied invalidation rather than a time-based freshness guess. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against dad7c9d9e2b9. 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)
|
|
Merged via squash.
|
…1-prep * commit '912ae8d96e5964dfdcdf419b79613fb941cdf0a8': (350 commits) fix: keep workspace preparation responsive during cleanup (openclaw#147358) docs: alphabetize donors and sponsors and add Red Hat logo (openclaw#147302) fix(plugins): retain update authority through doctor effects (openclaw#144316) refactor(qa): share Multipass mount retry lifecycle (openclaw#147084) fix(memory): emit one JSON result for command failures (openclaw#147366) improve(plugins): speed up cold metadata loading (openclaw#147411) fix(sessions): avoid duplicate work after waited child replies (openclaw#147394) fix(agents): retain outstanding child results in parent context (openclaw#112623) test: preserve native workflow loader selection (openclaw#147403) fix: reduce repeated work while polling session pull requests (openclaw#147373) test(qa): preserve task cancellation across process replacement (openclaw#147382) fix: prevent sidebar refresh storms during session activity (openclaw#147400) refactor: simplify skills CLI formatting (openclaw#147368) fix: prevent Git checkout certificate failures behind egress proxy (openclaw#147410) fix(qa): stop live threads after their process leader exits (openclaw#147386) refactor(release): share agent turn retry lifecycle (openclaw#147076) fix(ui): keep uploaded images aligned with their prompts (openclaw#147389) fix(fs): guard skill reads and bound worker bundle staging (openclaw#147336) fix(ci): restore Linux service ownership fixtures (openclaw#147398) fix(plugins): preserve manifest permissions when building plugins (openclaw#147393) ...
…aw#147373) * fix: reduce repeated work while polling session pull requests * test: stabilize session PR reference fixtures * test: verify PR cache listener cleanup against its baseline
What Problem This Solves
Fixes repeated transcript searches and large saved-prompt reads when the Control UI polls unchanged session pull requests, even while its GitHub results are cached.
User Impact
Session PR polling uses less Gateway CPU and memory allocation while preserving the same PR chips, freshness, and GitHub rate-limit behavior. No configuration or migration is required.
Why This Change Was Made
Cache assistant PR references through the existing bounded, watcher-owned cache. The transcript owner supplies a version that includes raw changes, indexing progress, cold archive state, and physical database identity. Concurrent reads share work; failures, unfinished indexing, session changes, and rewrites cannot leave a stale cached result. Metadata reads use the compact session projection and carry the known session ID into canonical message hydration.
Evidence