Repository navigation
fix: stabilize Active Memory circuit-breaker tests - #149443
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 17, 2026, 3:41 AM ET / 07:41 UTC (Revision 4). ClawSweeper reviewWhat this changesThe PR makes Active Memory recovery tests control elapsed time and verify transcript-backed results, separates cooldown recovery from successful-recall reset, and removes an unused testing re-export. Merge readiness✅ Ready for maintainer review The PR remains useful: current main and the latest release retain the weaker recovery test. No actionable correctness or security findings were identified, and the maintainer-authored work is protected from automatic closure. Priority: P3 Review scores
Verification
How this fits togetherActive Memory retrieves relevant memories before OpenClaw builds a conversational reply. Its circuit breaker temporarily skips recalls after repeated timeouts, then allows recovery after cooldown or a successful recall. flowchart TD
A[Conversation prompt] --> B[Active Memory hook]
B --> C{Circuit breaker open?}
C -->|Yes| D[Skip recall]
C -->|No| E[Memory recall]
E -->|Timeout| F[Record consecutive failure]
E -->|Success| G[Clear failures and return context]
F --> C
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -2, Tests -9. Total -11 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Retain separate hook-level checks for cooldown recovery and successful-recall reset while preserving the existing production timeout and recovery policy. Do we have a high-confidence way to reproduce the issue? Not applicable to a product defect: this repairs test reliability and coverage. Source confirms the old case conflates the two reset paths; the PR reports a targeted reproduction of its timing failure. Is this the best way to solve the issue? Yes. Testing both recovery paths through the registered hook with usable transcript fixtures is narrower and more meaningful than manipulating breaker state or increasing timeouts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 0f0939570077. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles) |
b67af1f to
9314cd4
Compare
Keep equivalent filesystem assertions within the existing line-cap ratchet while preserving circuit-breaker recovery coverage.
9314cd4 to
c4226ca
Compare
|
Merged via squash.
|
Separate Active Memory circuit-breaker cooldown recovery from success-based reset. Supply usable memory transcript evidence, assert returned context, advance the unchanged 25 ms test deadline deterministically, and join recall cleanup. Remove the unused testing re-export and simplify equivalent filesystem assertions. Validation: baseline timing failure reproduced; success-reset negative and restoration checks verified; 252 owner/sibling tests and complete changed checks passed. Independent P0-P2 review and exact-head ClawSweeper review found no actionable issues. Published-head CI and its aggregate gate passed. Refs openclaw#149443, openclaw#148951.
Related: #148951
What Problem This Solves
Active Memory's circuit-breaker test can fail when its supposed successful recall reads a missing transcript beyond the 25 ms deadline. Its cooldown setup also clears failure history before success, so the old case does not independently prove reset after success.
User Impact
No user-visible behavior change. The tests distinguish cooldown recovery from clearing consecutive failures after a successful recall.
Why This Change Was Made
Provide usable memory-tool transcript evidence and assert the returned context. Advance test time after embedded execution starts, join recall cleanup, and remove the unused testing re-export. Simplify equivalent transcript filesystem assertions to stay within the file-size ratchet. The 25 ms test budget and production recovery policy remain unchanged.
Evidence
Validated prepared revision
c4226ca3f616e7b091527c50e26c919b2edf9271on main91799f175f77371d6cf057d2bce2f211ff0f19a9in the configured Blacksmith proof run. The wrapper verified the source/tree, completed with exit 0, and stopped its lease normally.The first proof attempt failed before test collection because its comparison checkout lacked workspace dependencies; a fresh physical frozen install resolved that setup problem. The earlier file-size CI failure is fixed by the assertion cleanup. Exact published-head CI remains required after publication.