Skip to content

v0.3.1 — Data-integrity fixes

Choose a tag to compare

@2672243194 2672243194 released this 20 Aug 14:00
· 15 commits to main since this release

Bug fixes (data integrity)

Same-case concurrent ingest no longer loses lessons

The most serious issue found this round: when two agents ingested lessons for the same case at the same moment (e.g. TRAE and Claude Code working on the same topic), both drew the identical lesson id (case-x-lesson-01) and the second write silently overwrote the first. Lesson-id allocation now happens inside the vault lock, so parallel ingests always get distinct ids.

confidence: 0.0 round-trips correctly

A classic falsy trap: lessons saved with confidence exactly 0.0 were loaded back as 0.8, hiding low-confidence lessons from lint's LOWCONF check.

lint / distill proposal races

Proposal files were written with plain write_text on second-resolution filenames. Concurrent runs in the same second could clobber or tear each other's files. Proposals are now written atomically under the vault lock with collision-free names.

Smaller fixes

  • Merge proposals now keep the more-used lesson as the keeper (merge direction follows use_count).
  • Duplicate detection pre-tokenizes each lesson once instead of re-tokenizing every pair (O(n²) comparisons, no per-pair tokenization).
  • apply audit-log entries no longer embed | inside the logged object (broke structured log parsing).

Verification

  • 59 tests (5 new regression tests: concurrent same-case ingest, confidence-0 roundtrip, same-second distinct proposals, merge direction, query bump)
  • Smoke-tested against a live vault (lint clean, query hits)

Full changelog: see Changelog section in README.md.