Repository navigation
fix(memory): keep the shared -wal when another process closes the memory store (0.11.0 backport of #25852) - #26465
bolichen97 wants to merge 1 commit into
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: this is a clean cherry-pick of #25852 onto the release line, with the same design and tests. The only things it takes away are side-file deletions, and the restore and backup readers already handle a leftover empty [DESIGN-REVIEWED] 3a6c06c Description read[DESCRIPTION-READ] 89ea0e62a9621dd5ecde63f4216ae22644651b016336511f5dcf73381f3b8996 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS This is a clean What this change shipsInventory (6 items) — 6 justifiedIntent: ship the fix on the 0.11.0 release line so that another process closing the memory store can no longer delete the shared
[FIRST-PRINCIPLES-REVIEWED] 3a6c06c Description read[DESCRIPTION-READ] e30bcae7d6cab7962a089ee7bc7f0f45c72db1d683a3be4a2d94a2ef54a218d9 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
|
HOLD at The commit is a faithful — crew-pr-reviewer (r137) |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approved on behalf of the watch holder (bolichen). Design and First Principles pass on this head, UX skipped or pass, no conflict, no open change request.
Problem / Motivation
Goal: Ship #25852 on the 0.11.0 release line, so a 0.11.0 build no longer lets another process's close delete the memory store's shared
-wal.#25852 merged to
mainafterrelease/0.11.0was cut, so no 0.11.0 build has it. Users on 0.10 and 0.11 builds are still reportingdatabase disk image is malformedfrom a splitmemory.db, and a gateway that will not start after it.Why it matters
A split
memory.dbloses the rows written after the split, and every backup taken afterwards carries the damage. The release line is what users install; a fix only onmainreaches them one release late.Not a goal
pysqlite3stays exposed, exactly as onmain; that gap is memory.db still splits on Linux x86_64 because pysqlite3 has no setconfig, and #25852's regression test passes with the fix reverted #26331.What changed (motivation → approach → change)
One commit:
git cherry-pick -xof dc63bb6, the #25852 squash commit onmain. It applied with no conflict. Same change as #25852:src/kiro_crew/sqlite_wal.py: addskeep_wal_on_closeandtruncate_wal_before_close.src/kiro_crew/vector_memory_lifecycle.pyandsrc/kiro_crew/vector_memory.py: the store's write connections keep the-walon close and empty it before closing.src/kiro_crew/diagnose_probes.py: the settings diagnosis probe opensmemory.dbwith the store's driver instead of the stdlibsqlite3..github/black-baseline.txt: drops the row fortest/test_bench_round9.py, which is now black-clean.Backwards compatibility
Compatible: same change as #25852 on
main. A closed store leaves an emptymemory.db-walandmemory.db-shminstead of deleting them; SQLite reads or resets both on the next open.Removes nothing: the change only stops a close from deleting files; no API, key, row or path is removed.
Tests
test/test_vector_memory_wal_split.py,test/test_sqlite_wal.py,test/test_bench_round9.py,test/test_memory_backup.pyon this branch: 99 passed.scripts/local-gate.py --base origin/release/0.11.0: backend related set 6522 passed, 33 skipped; frontend related set 400 files, 11840 tests passed.mypyclean on the four changed modules; flake-pattern ratchet and the repository's semgrep rules pass on the diff.Proof: PROVEN test/test_vector_memory_wal_split.py::test_another_process_close_keeps_the_wal_a_lockless_writer_uses (head 3a6c06c)
Determinism: the tests are #25852's own, unchanged; their repeat and shuffled-order runs are recorded on #25852.
Manual verification
N/A - verified on #25852 itself; this is the same commit on the release branch.
Screenshots / video
Why no screenshot: backend-only change with no visible output.
Related Issues
Part of #25846
Backport of #25852.
Sibling sweep
Siblings: none -- a backport of one main fix; its sibling sweep is on #25852
Pattern harvest
Not generalizable: backport of #25852; its harvest is recorded on that PR.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)