fix: close stale-decision races, honor user edges, normalize --at, refuse truncating exports#11
Merged
Merged
Conversation
…ict scan, normalize --at forms, refuse truncating exports Independent re-audit of the 6.2.8 hardening release (line-by-line + differential-vs-6.2.7 + claims audit). All 6.2.8 headline numbers reproduced exactly; these are the findings still standing — each reproduced red with a regression test before its fix: - the merge keeps a per-node disk-freshness baseline (_loaded_view) and re-validates stale decisions under the lock: a stale dream can no longer prune or weight-dip a concurrently-confirmed memory (GRACE_DAYS holds under concurrency), and a duplicate-remember confidence upgrade merges max-wins as its own field instead of dirtying the whole node over a concurrent confirm - the contradiction scan flags without clobbering user link edges - recall --at normalizes compact/tz-aware forms before the lexicographic compare (a compact same-year date returned wrong-era results on 3.11+) - export refuses (and reports) files whose END guard was hand-deleted instead of silently truncating everything after BEGIN - the duplicate-remember boost is BOOST_PER_ACCESS on every path - prune events journal after the save, only for prunes that landed 220 tests. Mutation kill rate: 42% on the seeded 120-mutant sample.
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.
What & why
Independent re-audit of the v6.2.8 hardening release: one line-by-line auditor over the whole file, one differential regression hunter that first reproduced v6.2.7's defects to validate the 6.2.8 fixes, one claims-and-channels auditor, plus a full maintainer read of every file. All of 6.2.8's headline numbers reproduced exactly (213/213 tests, fuzz 420/420, recall@1/@5 = 1.00, multilang 24/24, discrim 12/12, soak 15/15 & 0/256 & 7/8, mutation 39% = 47/120, published sha256 matches). The fixes below close what was still standing — each was proven red with a regression test before the change:
_loaded_view: last_accessed/access_count as of our last disk read) and re-validates stale decisions against the current disk copy inside the lock: a dream on a stale view can no longer prune a memory another process confirmed meanwhile (GRACE_DAYS holds under concurrency), a stale decayed weight no longermin()s down a fresh confirm, and a duplicate-remember confidence upgrade merges max-wins as its own field instead of marking the node_dirty(6.2.8's way of persisting confidence whole-copied stale counters over a concurrent confirm — reproduced: expected access_count 2, got 1). Prune events journal after the save, only for prunes that actually landed.recall --atnormalization: compact (20260101) and tz-aware forms parsed on 3.11+ but compared lexicographically against dashed stamps ('-' < '0'), returning wrong-era results; all forms now normalize before comparison.Checklist
python3 -m unittest discover -s testspasses (220/220)