Repository navigation
test(core): keep the storage rename journal test content-neutral on Windows - #2129
Merged
Merged
Conversation
…indows test_storage_rename_leaves_one_moved_row failed on every Windows run of main with "too many values to unpack (expected 1)". The test fixtures turn on update_permalinks_on_move, so indexing the rename also rewrote the note's permalink frontmatter. Windows stores that rewrite with CRLF line endings, so the same index run promoted the stored bytes as a new version and journaled an "updated" row after the "moved" row. That is the designed recovery path, not a bug, but it meant the rename was not content-neutral. The test now turns the setting off, so the rename leaves the file's bytes unchanged and must produce exactly one "moved" row carrying the note's existing version and checksum. The frontmatter-rewrite path stays covered in test_project_index_maintenance.py. The full Windows unit suite runs only on main, so the file is added to the Windows platform regression job in test.yml. Pull requests now run it on Windows before merge. Ticket: BMEM-116 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Drew Cain <groksrc@gmail.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
groksrc
commented
Nov 17, 2026
groksrc
left a comment
Member
Author
There was a problem hiding this comment.
Verdict: done — no blocking findings.
Pull request #2129 fixes the Windows-only test setup and adds Windows pull-request coverage. The patch changes no product code.
I checked the two-file diff against base b4b2c226:
test_storage_rename_leaves_one_moved_rowdisablesupdate_permalinks_on_movethrough function-scoped test fixtures. This makes the rename content-neutral on every platform.- The test now proves the
movedjournal row keeps the existing database version and checksum. - The pull-request Windows job includes the changed test file. Its real Windows run passed 116 tests in 59.11 seconds.
- A local run passed all four tests.
ruff check,ruff format --check, andty checkalso passed. - Every current GitHub check passes at head
7819af2c. The patch adds no dependencies, permissions, secrets, or runtime behavior.
Next step: Shipright can advance this pull request. The merger owns the merge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the one test from #2121 that fails on every Windows run of
main. The product code is fine. The test expected a content-neutral rename, but the test config made indexing rewrite the file during the rename. This PR also makes pull requests run the test file on Windows, so this kind of failure shows up before merge.What failed
tests/indexing/test_storage_change_journal.py::test_storage_rename_leaves_one_moved_rowfails on the Windows SQLite unit shard ofmain, most recently in run 44118870413 atb4b2c226:Why
update_permalinks_on_move=True(tests/conftest.py:308). When the rename is indexed, that rewrites the moved note'spermalinkfrontmatter.write_file_atomicwrites text with the platform's newline (src/basic_memory/file_utils.py:138-146), so on Windows the rewrite is stored with CRLF line endings. That behaviour is deliberate.movedrow stays unsettled, and the same index run promotes the stored bytes as a new version, which journals anupdatedrow. This is the designed recovery path from fix(core): journal note changes that arrive through storage #2121, not a bug.moved,updated) where it expected one.What changed
test_storage_rename_leaves_one_moved_rownow turnsupdate_permalinks_on_moveoff, so the rename really leaves the file's bytes unchanged. It also asserts that themovedrow carries the note's existingdb_versionanddb_checksum, which pins down "unchanged content". The rewrite path is already covered bytest_scan_move_keeps_a_rewritten_note_row_unsettled_when_storage_holds_other_bytesand..._when_its_write_failsintests/indexing/test_project_index_maintenance.py.test.ymlruns the full Windows unit suite only onmain. This PR addstests/indexing/test_storage_change_journal.pyto thetest-windows-platformjob's file list, so pull requests run it on Windows.No product code changes.
Verification
All local runs on macOS, from
origin/mainatb4b2c226:write_file_atomicwrite CRLF the way Windows does. The old test failed withValueError: too many values to unpack (expected 1, got 2).tests/indexing/test_storage_change_journal.py,4 passed.4 passed; PostgreSQL (BASIC_MEMORY_TEST_POSTGRES=1, testcontainers)4 passed.ruff check,ruff format --checkandty checkpass on the changed test.test.ymlstill parses as YAML.Out of scope
tests/mcp/test_hook_brief_search.py::test_session_start_never_imports_the_mcp_tool_stackalso fails on some Windows runs ofmain. It comes from #2113 and is not touched here.Ticket: BMEM-116 (Drew's board).
🤖 Generated with Claude Code