Repository navigation
v0.2.0: one index run at a time, fail-closed vault switch, durable cleanup debt - #10
Merged
Merged
Conversation
puretensor
force-pushed
the
fix/codex-audit-2026-10-25
branch
from
October 26, 2026 13:31
ba569e9 to
72d2fa6
Compare
…bt recorded with each write - index_vault holds an fcntl lock on <db>.lock for the whole run; an overlapping run is refused with StoreError instead of writing one model's vectors into an index labelled with another. - A changed vault root clears the old rows and records the new root in one transaction before embedding, so a failed switch cannot leave the old vault's notes labelled as the new one. - purge debt is recorded in the same transaction as each replace/delete and is cleared only after compaction and a successful checkpoint, conditional on the generation, so a failed run or a busy reader no longer loses it. Tests: full suite 710 passed, 18 skipped (Linux). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ex, let watch wait for a running index - A rebuild for a vault at another path (moved, or another vault) now embeds the test passage before clearing the old rows, as a model change already did, so a model that cannot load leaves the index and its recorded root as they were. - `puremind watch` runs wait for a `puremind index` that holds the lock, then check the model again, instead of ending the watch on its first run or dropping the change until the next rescan. `puremind index` is still refused. - The index lock reports a read-only index as read-only before touching the lock file, opens the lock file with O_NOFOLLOW, and turns other open or lock errors into StoreError naming the lock file. - README and CHANGELOG describe both behaviours. Tests: full suite 729 passed, 6 skipped (Linux, Python 3.12); ruff clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
puretensor
force-pushed
the
fix/codex-audit-2026-10-25-b
branch
from
October 26, 2026 14:00
040e759 to
a8e1f35
Compare
Owner
Author
|
Verdict: fix, then merge. What I examined. I read the lock, vault-switch and purge-debt changes against the code. Three independent reviews (correctness, safety, integration) examined the PR, including mutation probes. All three core claims hold:
Stack. #9 merged with its lint fixes. I retargeted this PR to Fixed in a8e1f35:
Dismissed:
Tests:
|
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.
Originally stacked on #9, which is now merged; this branch is rebased onto
mainand holds only its own two commits.index_vaultholds an fcntl lock on<db>.lockfor the whole run. Apuremind indexthat overlaps another run is refused withStoreError(aRuntimeError, which the CLI reports cleanly). Apuremind watchrun waits for the other run to finish and then checks the model again, so a watch on an old model cannot write its vectors into an index rebuilt for another model.--rebuild. The rebuild first has the model embed a test passage, then clears the old rows and records the new root in one transaction before embedding. A model that cannot load leaves the index as it was.O_NOFOLLOW, and turns other open or lock errors into aStoreErrorthat names the lock file.Tests: full suite: 729 passed, 6 skipped (Linux, Python 3.12). ruff 0.17.1 is clean.
🤖 Generated with Claude Code