Repository navigation
test(memory): align rebuild notice with monotonic clock - #187454
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Exact candidate: Secretless Docker, Node 24.22.1: Sweep covered ALL of Remaining wall-clock controls are intentional:
Only the four fixtures in this PR required clock-selection changes. No production changes or assertion weakening; this test-only defect is reproduced by running the complete registered test files, not a shipped Gateway. |
|
Codex review: needs maintainer review before merge. What this changesUpdates memory regression fixtures to advance the monotonic clock used by rebuild cooldowns and session scheduling. Example: The detached-rebuild test advances its retry clock by 30,000 milliseconds.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Regression provenanceRegression provenance — verified: source commit Merge readiness✅ Ready for maintainer review This PR is a minimal, correct test-fixture repair with accepted exact-head red/green evidence, successful CI, and no actionable findings. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherMemory Core tests send synthetic transcripts and search requests through the memory manager, then inspect SQLite publication, rebuild disclosure, resumption, and shutdown results. flowchart LR
A[Test clock controls] --> B[Monotonic deadlines]
C[Synthetic transcripts and searches] --> D[Memory manager]
B --> D
D --> E[SQLite index publication]
D --> F[Warnings and lifecycle results]
E --> G[Existing assertions]
F --> G
Technical reviewBest possible solution: Merge the scoped clock-selection repair while preserving the production deadlines and all existing regression assertions. Do we have a high-confidence way to reproduce the issue? The supplied repeated complete-file runs reproduce the warning failure on main and pass on the exact head; inspected clock producers, comparisons, and fixture changes explain the result, and this read-only review ran no tests. Is this the best way to solve the issue? This is the smallest complete repair: control the clocks the existing owners use, retain every assertion, and introduce no production machinery or persisted changes. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d34d855440a7. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests 0. Total 0 across 4 files. Added test files: 0. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReviewed October 29, 2026, 4:07 AM ET / 08:07 UTC (Revision 3). |
|
Maintainer note on proof: this is a test-only fix for fixtures that our #186829 left advancing Date.now() after the cooldown moved to performance.now(). No production code changes, so no shipped entry point can show a difference. I accept the exact-head complete-file Docker proof as the right evidence here: on main the touched files give 25 passes and 1 failure in each of 3 runs, and with this change 26 passes in each of 3 runs. The full clock sweep of memory-core, memory-host-sdk and callers found no other stale fixtures. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
The maintainer proof acceptance now clears all proof requests, and this review identifies no findings. Please reconcile the remaining 3/6 cap with the exact same test-only clock-repair precedent in #187345: #187345 (comment) rated complete-file Docker red/green proof 4/6 explicitly because no Gateway demonstration can discriminate test-only changes. Here all four full files ran three times per ref, production delta is zero, the maintainer override is explicit, and exact-head ci-gate is green. This requests consistent evaluation of the evidence, not weakened assertions or additional production scope. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
) test(memory): advance the monotonic clock in the remaining Memory Core cooldown fixtures openclaw#186829 moved the Memory Core failed-rebuild cooldown to performance.now(), and openclaw#187345 fixed one stale fixture, but others still advanced only Date.now(). The detached-rebuild notice test in extensions/memory-core/src/tools.index-upgrade.test.ts kept its retry inside the cooldown and failed, missing its "provider cost" warning. This fixes that test and the session-delta, reindex-resume and startup-close timer fixtures found in a full sweep of memory-core, memory-host-sdk and the callers of the three changed sites. Production code is unchanged. Fixes openclaw#187396. Evidence: all four touched test files run three times per ref in Docker on Node 24.22.1. Main gave 25 passes and 1 failure each run (the missing warning at line 197); with this change, 26 passes each run. The intentional wall-clock users are listed in openclaw#187454 (comment). Thanks @ruel225. Co-authored-by: Ayaan Zaidi <[email protected]> Upstream-Commit: 933304e
) test(memory): advance the monotonic clock in the remaining Memory Core cooldown fixtures openclaw#186829 moved the Memory Core failed-rebuild cooldown to performance.now(), and openclaw#187345 fixed one stale fixture, but others still advanced only Date.now(). The detached-rebuild notice test in extensions/memory-core/src/tools.index-upgrade.test.ts kept its retry inside the cooldown and failed, missing its "provider cost" warning. This fixes that test and the session-delta, reindex-resume and startup-close timer fixtures found in a full sweep of memory-core, memory-host-sdk and the callers of the three changed sites. Production code is unchanged. Fixes openclaw#187396. Evidence: all four touched test files run three times per ref in Docker on Node 24.22.1. Main gave 25 passes and 1 failure each run (the missing warning at line 197); with this change, 26 passes each run. The intentional wall-clock users are listed in openclaw#187454 (comment). Thanks @ruel225. Co-authored-by: Ayaan Zaidi <[email protected]>
Fixes #187396. Regression from #186829.
What Problem This Solves
The detached full-rebuild warning test advances the wall clock while the failed-rebuild cooldown uses monotonic time, so scheduled validation misses the expected provider-cost warning.
User Impact
No user-visible or production behavior change. Restores meaningful test coverage of detached automatic rebuild disclosure and aligns remaining session-scheduler fixtures with the clock they exercise. No assertions, timeouts, schemas, dependencies, or public contracts change.
Why This Change Was Made
Keep @ruel225's minimal monotonic-clock repair and finish the requested sweep across all of memory-core, memory-host-sdk and direct references to the three owners changed in #186829. Thanks @shannon0430 for reporting.
The detached retry fixture now advances
performance.now(). The session-delta, background reindex-resume and startup-close fixtures also fakeperformancewhen advancing their session scheduler timers. Other Date-only fixtures intentionally exercise calendar timestamps, Date-based provider recovery/cache or worker crash windows; those owners were not migrated by #186829. Existing cooldown/recovery fixtures already control performance.Evidence
Secretless Docker, Node 24.22.1, root Vitest project matrix, complete files (not name filters):
provider costwarning.Detailed repeated-run capture and full sweep classification: #187454 (comment)
The suite exercises the actual memory manager, SQLite publication and provider admission boundaries. This is a test-only repair: a shipped Gateway cannot discriminate a change to the Vitest clock fixture.
Simplification retained only clock-selection edits and every existing assertion. Production delta: 0. Test delta: +7/-7, net 0 lines across four files.
Merge danger: two-way door; a revert fully undoes this test-only repair. Blast radius is the four memory regression fixtures; production behavior and persisted state are unchanged.