Skip to content

fix(memory): correct responsiveness and payload test measurements - #150034

Closed
steipete wants to merge 2 commits into
mainfrom
codex/memory-maintenance-responsive-oracle-20260916
Closed

steipete wants to merge 2 commits into
mainfrom
codex/memory-maintenance-responsive-oracle-20260916

Conversation

@steipete

@steipete steipete commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Two memory test measurements can report failures despite correct results: the responsiveness fixture times the whole maintenance operation, and the forget payload guard misses SQLite result methods and previously cached statements.

User Impact

Test-only repair. Runtime behavior is unchanged. Preserve the existing 1-second responsiveness budget, 100 ms heartbeat, all search/maintenance content assertions, exactly 68 observed payload rows, and the 16 KiB byte ceiling.

Why This Change Was Made

Require search and the heartbeat to finish within the existing budget while the external writer is still held, then release the writer and verify maintenance separately. Cleanup releases the owned writer and joins search and maintenance even on failure. Observe both SQLite all() and iterate() at execution, after warming the real statement cache, and restore both observers during cleanup.

Evidence

The five revised held-writer scenarios passed in both hosted attempts on the original responsiveness head. Those runs failed separately on a full-indexing 3-second bound and then the old payload observer; the initial combined timings do not establish whether search or maintenance was slow.

For the payload fixture, the unchanged ordinary case reproduces zero observed rows on Node 24.21; the warmed-cache repair passes with all data and row/byte assertions intact. Its separate hosted run also passed the repaired case, but failed the old combined responsiveness stopwatch. This PR consolidates that exact reviewed fix from #150090; that PR stays open until verified supersession after landing.

Seven pure responsiveness controls and the ordinary payload proof are retained at their original source. The two candidate files are byte-identical to those reviewed versions. No local held-writer, fault, PID, provider, or container replay was performed. The ordinary runtime proof exercised all(); iterate() was source-reviewed only. Fresh combined P0–P2 review is scoped-clean; affected extension-test types, scoped lint, formatting, and diff checks pass. The combined head passed CI run 35106517244: all five revised responsiveness scenarios and the payload case passed together, with 1,929 passing tests and four skips in the memory shard. Native preparation completed successfully at the same head.

@clawsweeper

clawsweeper Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review September 16, 2026 12:07
@openclaw-barnacle openclaw-barnacle Bot added extensions: memory-core Extension: memory-core size: XS maintainer Maintainer-authored PR labels Sep 16, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 16, 2026
@clawsweeper

clawsweeper Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 16, 2026, 10:36 AM ET / 14:36 UTC (Revision 4).

ClawSweeper review

What this changes

Corrects Memory Core tests to measure search responsiveness separately from maintenance and count SQLite results even when statements are cached.

Merge readiness

⛔ Blocked before merge - 2 items remain

The payload repair and stronger held-writer assertion remain useful. Current main only partially overlaps this work, and no introduced correctness defect was found.

Priority: P3
Reviewed head: 06b5d08aa799a9aadd8b09abbe74b3dfe05f1d14

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Focused measurement repairs preserve meaningful assertions and have successful exact-head CI.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored test-only PR is exempt from contributor runtime proof; exact-head CI supports the revised measurements, with alternate-runtime iterate() execution explicitly unclaimed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored test-only PR is exempt from contributor runtime proof; exact-head CI supports the revised measurements, with alternate-runtime iterate() execution explicitly unclaimed.
Evidence reviewed 9 items Introduced test changes: The verified merge-base delta changes only the two test files. The responsiveness case retains its five scenarios, 100 ms heartbeat, 1000 ms budget, and eventual maintenance assertions; the payload case retains 68 rows and the 16 KiB ceiling.
Payload observer matches the execution owner: OpenClaw's synchronous SQLite adapter selects all() on newer supported Node versions and iterate() otherwise. Its cache retains statements after their second use, supporting execution-time observation after two warm-up previews.
Production query and cleanup contract: The forget planner executes the observed provenance join and substitutes empty text for session bodies. The revised test still checks preview, deletion, surviving rows, and preservation of an unrelated body.
Findings None None.
Security None None.

How this fits together

Memory Core indexes notes and sessions for search and removes selected derived memories. These tests check that searches remain responsive during database maintenance and that forgetting sessions avoids loading unrelated bodies.

flowchart TD
  A[Notes and sessions] --> B[Memory index]
  B --> C[Search during writer contention]
  C --> D[Results and heartbeat timing]
  B --> E[Forget preview and deletion]
  E --> F[SQLite result observation]
  F --> G[Row and payload limits]
Loading

Before merge

  • Resolve merge risk (P1) - The captured GitHub state reports conflicts, while the subsequent lookup returned unknown mergeability; the overlapping main timing repair has no verified combined merge result.
  • Complete next step (P2) - Reconcile the overlapping main timing fix from fix(ci): measure memory search responsiveness independently #150098, preserve the held-writer and payload assertions, and validate the resulting mergeable head.
Agent review details

Security

None.

PR surface

Tests +32. Total +32 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 69 37 +32
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 69 37 +32

Review metrics

Metric Value Why it matters
Preserved regression limits 5 contention scenarios; 1000 ms; 68 rows; less than 16 KiB The repair changes measurement boundaries without relaxing the existing limits.

Root-cause cluster

Relationship: canonical
Canonical: #150034
Summary: This PR consolidates the payload repair and stronger responsiveness measurement; a separate merged PR covers only part of the timing change.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep one responsiveness fixture that checks search under the held writer, alongside execution-time payload accounting that covers cached statements.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep one responsiveness fixture that checks search under the held writer, alongside execution-time payload accounting that covers cached statements.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: the existing payload observer misses all() executions selected by the SQLite adapter on newer Node versions. Tests were not executed during this read-only review.

Is this the best way to solve the issue?

Yes. Observing native result execution and separating search timing from maintenance completion address the measurement defects without changing runtime behavior or weakening limits.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 62334b06ce97.

Labels

Label justifications:

  • P3: This is a bounded test-measurement repair with no production behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored test-only PR is exempt from contributor runtime proof; exact-head CI supports the revised measurements, with alternate-runtime iterate() execution explicitly unclaimed.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (3 earlier review cycles)
  • reviewed 2026-09-16T12:15:38.084Z sha 852fcc7 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-16T12:53:13.975Z sha 852fcc7 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-16T14:15:33.249Z sha 06b5d08 :: needs maintainer review before merge. :: none

@steipete steipete changed the title fix(memory): check search responsiveness while the writer stays held fix(memory): correct responsiveness and payload test measurements Sep 16, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Superseded by two verified changes on main: #150098 (1482bf19a763acc59470faf3425b3cf559018b2c) fixes the responsiveness measurement, and #150090 (b3c8239e6b4736ec1c39260656a2565e77affe6e) fixes cached SQLite payload observation.

The canonical responsiveness fix retains the existing 100 ms writer-release timer. This PR's stronger held-writer alternative was not landed; the implementations are not patch-equivalent. Its original failures and combined-fixture proof remain recorded in this PR and the retained run history. The separate earlier 3-second indexing failure is not claimed fixed by this closure.

Final canonical CI passed the payload case and all five canonical responsiveness scenarios together (1,929 tests passed, four skipped in the memory shard). Closing this PR without merging because both canonical fixes are now on main.

@steipete steipete closed this Sep 16, 2026
@RomneyDa
RomneyDa deleted the codex/memory-maintenance-responsive-oracle-20260916 branch October 22, 2026 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: memory-core Extension: memory-core maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant