Repository navigation
fix(memory): keep gateway RPCs responsive during startup - #119676
Conversation
8144e5d to
626f53f
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed August 5, 2026, 12:42 PM ET / 16:42 UTC. ClawSweeper reviewWhat this changesThe PR defers memory-core manager warmup for five seconds after gateway readiness and cancels pending or stale warmup generations on stop or restart. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessThis active maintainer PR remains necessary: current main still triggers memory-manager loading directly during gateway startup, while the PR moves the delay and cancellation to the plugin-owned warmup lifecycle. No blocking defect was found; wait for the in-progress exact-head checks before landing. Priority: P1 Review scores
Verification
How this fits togetherThe memory-core plugin warms each configured memory index after the Gateway becomes ready. Health and configuration RPCs arrive during that same startup period, so scheduling the warmup determines whether those operator calls stay responsive. flowchart LR
A[Gateway becomes ready] --> B[Post-ready lifecycle hook]
B --> C[Memory-core warmup owner]
C --> D[Five-second idle window]
D --> E[Memory manager initialization]
A --> F[Health and config RPCs]
F --> G[Responsive Gateway]
H[Gateway stop or restart] --> C
Before merge
Agent review detailsSecurityNone. PR surfaceSource +33, Tests +129. Total +162 across 3 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the owner-local deferred warmup and lifecycle generation guard, then land the exact reviewed head after required checks complete successfully. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main eagerly starts manager loading from the admitted gateway-start hook, and the PR supplies a packaged before/after harness path. This read-only review did not execute that harness. Is this the best way to solve the issue? Yes. Deferring at the existing memory-core warmup owner avoids adding core policy or a competing flow, and the generation guard follows the established Dreaming lifecycle pattern. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b0d8dd3866d0. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
626f53f to
c6c256c
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
…cope * origin/main: (70 commits) fix(clickclack): preserve MIME extension for unnamed uploads (openclaw#119646) fix(memory): keep post-ready RPCs responsive (openclaw#119710) fix(browser): preserve locale, timezone, and device overrides (openclaw#119695) fix(agents): stop messaging dedupe from dropping final replies that quote a short tool send (openclaw#118178) test(agents): batch code mode budget proof (openclaw#119699) fix(memory): keep gateway RPCs responsive during startup (openclaw#119676) improve(ui): trail transient session status beside row actions (openclaw#119560) refactor(msteams): consolidate channel action target resolution (openclaw#119632) fix: tail context answers the current user message (openclaw#117364) fix(whatsapp): exercise descriptor-safe credential persistence (openclaw#119621) fix(diagnostics-otel): route OTLP endpoints by signal (openclaw#101655) refactor(skills): consolidate workshop transcript and record normalization (openclaw#119643) fix(video): harden DashScope task and media lifecycle (openclaw#117303) refactor(transcripts): consolidate persistence and export ownership (openclaw#119634) fix: preserve ClickClack discussion state contracts (openclaw#118851) fix(matrix): retire shared E2EE clients safely (openclaw#119570) refactor(cron): unify catch-up persistence and payload encoding (openclaw#119636) refactor(ui): centralize composer attachment and capability controls (openclaw#119650) refactor(daemon): consolidate managed service lifecycle ownership (openclaw#119647) fix(browser): honor explicit navigation timeouts across browser drivers (openclaw#119654) ...
…9676) * fix(memory): defer startup manager warmup * test(plugins): register memory stop hook contract
What Problem This Solves
Gateway startup with the default
memory-coreplugin could leave immediatehealthandconfig.getRPCs stalled or timed out while the memory manager performed its lazy import and initialization.Why This Change Was Made
The manager warmup ran directly from the post-ready
gateway_starthook. Although it was fire-and-forget, its module loading and initialization still contended with the first operator RPC burst.registerMemoryManagerWarmupnow owns a bounded five-second startup idle window plus lifecycle cancellation. Stop and restart invalidate pending or in-flight generations, so stale gateways cannot synchronize a manager after their lifecycle has ended. The existing Dreaming startup path is unchanged; isolation runs showed it was not causal.Repair summary:
registerMemoryManagerWarmupUser Impact
Startup health and configuration RPCs remain responsive while long-lived gateways still receive automatic memory warmup. Gateways stopped or restarted during the idle window do not run stale synchronization work.
Evidence
f40998d1f196ba09d07d489ede1f39559a661e72.memory-corecompletedhealth10/10 butconfig.get8/10, with two 10-second timeouts. Disabling only manager warmup restored both to 10/10; disabling only Dreaming cleanup left the timeouts.health10/10,config.get10/10, zero timeouts; overall p95 80 ms and max 139 ms.