Repository navigation
fix(sessions): align the reclamation-memory test with the archive session owner - #147028
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, 8:52 AM ET / 12:52 UTC. ClawSweeper reviewWhat this changesThe PR updates the session-deletion and memory-write regression test to intercept the current worker request owner and await worker shutdown before fixture cleanup. Merge readiness✅ Ready for maintainer review This remains a useful, focused repair: current main retains the broken test interception, and the proposed change preserves its behavioral assertions. No actionable correctness or security findings were found. Priority: P2 Review scores
Verification
How this fits togetherSession reclamation deletes archived session data through a worker while memory indexing shares the agent database. This test checks that overlapping memory writes and guarded deletion both finish without blocking commit authorization. flowchart TD
A[Session deletion request] --> B[Reclamation worker]
B --> C[Mutation request owner]
C --> D[Test overlap checkpoint]
D --> E[Memory cache write]
D --> F[Commit authorization]
E --> G[Verify deletion and retained memory]
F --> G
G --> H[Drain workers before cleanup]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests 0. Total 0 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep the existing overlap regression attached to the shared mutation-request owner and complete native worker drainage before removing its fixtures. Do we have a high-confidence way to reproduce the issue? Yes, source inspection identifies the obsolete interception that prevents the foreground write from starting, consistent with the supplied failing assertion. Tests were not rerun under this read-only review. Is this the best way to solve the issue? Yes, the patch moves the existing checkpoint to the active owner and uses its established drainage contract without weakening assertions or adding production seams. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against df5c530888c4. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
|
Supplemental exact-head verification completed for
Supplemental run, lease |
* temp/pr-145950: (101 commits) refactor(memory-wiki): share freshness result construction (#146935) improve(gateway): use metadata projection for presence (#146817) test(agents): reuse complete Responses model fixtures (#147015) fix(sessions): align the reclamation-memory test with the archive session owner (#147028) refactor(terminal): simplify copy-sensitive token checks (#146934) refactor(media): remove duplicate spaced path fallback (#146933) refactor(cli): reuse command-group names (#146893) improve(plugins): reduce JavaScript generation capture work (#146993) test: align plugin fixtures with current runtime contracts (#147000) refactor(browser): separate session tab tracking from cleanup (#146973) fix(tests): make systemd clock fixtures private (#146990) fix(linux): retire sleep guards when logind disconnects (#146046) refactor(matrix): share draft fallback delivery (#144840) fix(sessions): preserve cross-agent replies after reload (#146799) test(models): cover quota recovery during catalog discovery (#146708) fix(macos): recover browser sign-in when no browser opens (#146787) fix(process): prevent one-shot agents exiting while polling (#144268) fix(status): label the session inventory as stored (#146979) fix: avoid repeated background reads while loading chat (#146953) refactor(ui): narrow Skill Workshop proposal context (#146977) ...
* commit '060e856e5f9df245d63c98990fcb47e18108c6b9': (97 commits) refactor(memory-wiki): share freshness result construction (#146935) improve(gateway): use metadata projection for presence (#146817) test(agents): reuse complete Responses model fixtures (#147015) fix(sessions): align the reclamation-memory test with the archive session owner (#147028) refactor(terminal): simplify copy-sensitive token checks (#146934) refactor(media): remove duplicate spaced path fallback (#146933) refactor(cli): reuse command-group names (#146893) improve(plugins): reduce JavaScript generation capture work (#146993) test: align plugin fixtures with current runtime contracts (#147000) refactor(browser): separate session tab tracking from cleanup (#146973) fix(tests): make systemd clock fixtures private (#146990) fix(linux): retire sleep guards when logind disconnects (#146046) refactor(matrix): share draft fallback delivery (#144840) fix(sessions): preserve cross-agent replies after reload (#146799) test(models): cover quota recovery during catalog discovery (#146708) fix(macos): recover browser sign-in when no browser opens (#146787) fix(process): prevent one-shot agents exiting while polling (#144268) fix(status): label the session inventory as stored (#146979) fix: avoid repeated background reads while loading chat (#146953) refactor(ui): narrow Skill Workshop proposal context (#146977) ...
* temp/pr-137049: (110 commits) improve: reduce GitHub OAuth maintenance work for large agent rosters (#147021) fix(test): avoid settings lock writer startup timeouts (#147029) fix(update): correct backup guidance and cover incident regressions (#147023) refactor(gateway): share connection lifecycle across transports (#145950) refactor(telegram): share HTML text escaping (#146936) perf(build): reduce disk use in UI performance checks (#146687) refactor(memory-wiki): share freshness result construction (#146935) improve(gateway): use metadata projection for presence (#146817) test(agents): reuse complete Responses model fixtures (#147015) fix(sessions): align the reclamation-memory test with the archive session owner (#147028) refactor(terminal): simplify copy-sensitive token checks (#146934) refactor(media): remove duplicate spaced path fallback (#146933) refactor(cli): reuse command-group names (#146893) improve(plugins): reduce JavaScript generation capture work (#146993) test: align plugin fixtures with current runtime contracts (#147000) refactor(browser): separate session tab tracking from cleanup (#146973) fix(tests): make systemd clock fixtures private (#146990) fix(linux): retire sleep guards when logind disconnects (#146046) refactor(matrix): share draft fallback delivery (#144840) fix(sessions): preserve cross-agent replies after reload (#146799) ...
Include the landed reclamation-memory fixture repair from #147028. The 27 owned performance and test-infrastructure files remain identical to the reviewed candidate.
Brings in: - openclaw#146949 (bc6b662) test(agents): coordinate settings lock contention - openclaw#147028 (d4d3d6c) fix(sessions): align the reclamation-memory test with the archive session owner - openclaw#147029 (1311b42) fix(test): avoid settings lock writer startup timeouts Required to clear the 4 failing CI checks on PR openclaw#144507; the PR's WhatsApp voice-note 16 kHz + WhatsApp-vendor fix is preserved intact (main did not touch the changed lines). Co-Authored-By: Claude Code <[email protected]>
Refs #146760
Refs #140897
What Problem This Solves
Fixes the reclamation-memory regression test failing on main after the archive worker refactor, blocking core test types and compact CI.
User Impact
No user-visible behavior changes. Restores coverage that a real borrowed memory-cache write and guarded session deletion both settle without blocking commit authorization.
Why This Change Was Made
The test introduced in e05d8b6 (#146760) intercepted the archive worker helper. After 7ab5077 (#140897), deletion uses the retained reclamation worker and shared mutation-request owner, so the old interception never starts the overlapping memory sync and accesses a callback absent from part of the archive operation union.
Intercept the current mutation request callback with its generic contract, keep the real worker and all original assertions, and await the database owner's asynchronous worker drainage before fixture cleanup. Production code, storage semantics, baselines, and timeouts are unchanged.
Evidence
check-test-types-core-2fails with TS2322/TS2339 at test lines 44 and 50;checks-node-compact-small-1fails at line 164 with[]instead of one fulfilled foreground write, then hits a cleanupENOENT.node scripts/run-vitest.mjs src/config/sessions/session-accessor.sqlite-reclamation-memory.test.tsreproducedAssertionError: expected [] to deeply equal [{ status: 'fulfilled', value: undefined }]at line 164, followed by an unhandled cleanup error.node scripts/run-vitest.mjs src/config/sessions/session-accessor.sqlite-reclamation-memory.test.ts src/config/sessions/session-accessor.sqlite-archive-session.test.ts src/config/sessions/session-accessor.sqlite-reclamation-reuse.test.ts: 3 files, 21 tests passed, no unhandled cleanup errors. Original authorization, deletion, cache-pruning, and retained-memory assertions are unchanged.node scripts/check-changed.mjs: passed, including the affectedstate-loggingcore test graph, targeted lint, formatting, and repository guards.