Skip to content

Release BIMRI v5.1.1: audit checkpoint, exact-current fast path, drift receipts - #6

Merged
EvolutionUnleashed merged 10 commits into
mainfrom
agent/bimri-v5.1.x-performance-seo
Sep 2, 2026
Merged

EvolutionUnleashed merged 10 commits into
mainfrom
agent/bimri-v5.1.x-performance-seo

Conversation

@EvolutionUnleashed

@EvolutionUnleashed EvolutionUnleashed commented Sep 2, 2026

Copy link
Copy Markdown
Owner

The executable change is an engine-only performance patch. The authority format stays v5.1.0 and the readable hot-memory grammar stays v5.0.2, so existing stores update in place with bimri.md and every immutable record byte-identical.

What ships:

  • A compact, engine-managed audit checkpoint (.bimri/audit-witness.json) with the path-and-hash inventory kept as separate evidence. Warm exact-current reads, start, journal and no-proposal close stop enumerating the historical authority tree.
  • A direct current-key path for get --key and recall --key that returns only the accepted current generation. Held candidates and history stay reachable through --history, --query and review.
  • The checkpoint is a derived cache, never authority. Divergence forces the full semantic audit. A passing audit over changes the engine cannot attribute to its own operation first records a sealed, validated drift receipt under .bimri/audit-drift/ (bounded to the newest 200, complete per-path prior and current hashes, oversized deltas pinned in validated attachments) and only then rebaselines. A failing audit refuses into the existing damaged-authority recovery lane. No crash or drift state ever requires hand deletion of derived files.
  • Read-only doctor and warm reads enforce the same legacy-lineage refusals as writable load. An obstruction on the transition-marker path is a hard error on every surface.
  • Derived-index rebuilds removed from the start, commit and resolution hot paths.
  • Checked-in benchmark (tests/benchmark_v511.py) with canonical gates, run by CI on the four-leg matrix, which now also triggers on agent/** pushes.
  • Public README rebuilt around persistent AI agent memory across sessions, the supported Claude Code and OpenAI Codex integrations, project-owned files, provenance, human-governed same-key conflicts and the measured proof. Native runtime memory is credited accurately, the BIMRI/model-provider privacy boundary is explicit, and the Agent in a Box and Starter Engine links go to their exact pages.
  • Upgrade docs now state the required external full-store snapshot and the v5.1.0-to-v5.1.1 one-way proposal boundary. The normative protocol now states that new v5.1.1 proposals stamp v5.1.1 preflight receipts while accepting legacy v5.1.0 receipts. Receipt-less legacy proposals remain valid authority but must be synced and restaged before they can create a new conflict.

Owner-ruled behavior changes (2026-08-27): warm reads defer whole-tree verification to authority-changing writes and explicit audit, review, search and historical-recall boundaries; plain exact recall is current-only. Authority writes measure about 1.3 s on the live-size store, recorded as an accepted deviation from the one-second brief target; incremental manifests are v5.2 work.

Measured on the development store (~500 runs, ~216 revisions, Windows 11):

Operation v5.1.0 v5.1.1
recall --key, warm, CLI end to end ~21.3 s ~0.3 s
start 51.8 s ~0.4 s
journal ~23.4 s ~0.4 s
propose / sync n/a ~1.3 to 1.6 s
Cold full audit to seed or rebuild the checkpoint n/a ~33 s per audit

One-way boundary: the first v5.1.1 proposal stamps a receipt that a v5.1.0 engine rejects permanently. Rollback exists only from the complete pre-update folder snapshot that MIGRATION.md now requires. A store the new engine has only started and closed is still readable by v5.1.0.

Support envelope: a bounded, single-store exact-current performance patch, validated on a store shaped like this project. Ranked or non-ASCII retrieval, large current-state sets, high reader concurrency, fleets and indefinite-lifetime storage are explicitly not claims of this release (README, "Support envelope").

Verification:

  • Full suite green on the exact code tree: 255 tests, 0 failures, 11 platform skips. GitHub Actions four-leg matrix (ubuntu, windows; Python 3.8, 3.12) plus the gated benchmark: success on c467901, on 562a497 (round six: UTF-8 console output, clearer missing-lock message, three stated boundaries), on 4baf61d (round seven: a condemning audit invalidates the checkpoint so start prints the recovery banner, owner-ruled 2026-09-02; round eight: one test's directory-order comparison made deterministic), and exact-head run 33656216072 on 6d24e06.
  • Four independent red-team rounds and five fix rounds on this branch (2026-08-23 to 2026-08-28), every reproduced defect fixed with a regression test.
  • 2026-09-02 pre-merge red team: the code-only update was run against a disposable copy of the live store. Preservation passed, accepted head unchanged, immutable tree byte-identical by an independent hash check, repeat install idempotent, zero drift receipts after a full start, journal, propose, sync, close, doctor and status cycle, and the v5.1.0 engine refused the store after the first v5.1.1 proposal exactly as documented.

EvolutionUnleashed and others added 10 commits August 27, 2026 16:57
The checkpoint is a cache, never an authority record. Divergence from it is
a cache miss that forces the full semantic audit: a pass rebaselines and
preserves an append-only drift receipt under .bimri/audit-drift/ (bounded,
deduplicated, surfaced by doctor); a failure refuses into the existing
damaged-authority recovery lane. No automatic path records a block state.
audit-blocked.json survives only as the owner-approved quarantine repair
baseline, with working exits through restore and doctor.

Retained from the performance work: the warm-read gate (head hash, grammar,
pointers, residency, checkpoint seal), atomic checkpoint transitions, the
fail-closed resolution retry lane, and every measured number. Unknown files
in witnessed roots are never deleted or blocked on.

Also fixes defects the block latch had masked: the warm fast path skipped
the legacy-marker guards and the migration receipt; interrupted close and
touch replays could never finalize (skip_validation_id now honored);
restore's strict comparison now scopes to the whole owner-repair session;
a corrupt transition marker no longer wedges doctor; read-only doctor is
byte-exact and treats a loadable in-flight marker as a warning.

Suite: 236 tests, 0 failures, 11 skipped. Warm recall 250-290 ms CLI
end-to-end and start 360 ms on a copy of the live store; cold first audit
34.5 s once.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…racts

Verified and fixed from the independent red team of 993eb07:
- An obstruction on the audit-transition marker path that cannot be
  preserved and retired is a hard error on every surface; doctor never
  reports health past it and the checkpoint stays untouched.
- The archive crash-window exemption is a proof, not a month allowlist:
  a changed month is transition-explained only when its bytes reduce to
  the prior witnessed content plus appended rows stamped by the
  operation's own scope. Foreign rows are preserved and receipted.
- Drift receipts are sealed and self-contained: a complete per-path
  delta with prior and current hashes (capped with explicit truncation
  counts), monotonic sequence numbers, delta-based deduplication,
  bounded rolling retention, and bounded corrupt-marker blobs.
- Read-only doctor, slow reads and warm exact reads enforce the same
  legacy-lineage refusals as writable load.
- MIGRATION states the real one-way contract (decided proposals keep
  their v5.1.1 receipts as immutable authority; rollback only from the
  pre-update backup), contract-tested against the real v5.1.0 engine.
- The protocol normative drift clause now states the owner-ruled
  receipts contract (ruled 2026-08-27), and the write-path numbers are
  published as an owner-accepted deviation: propose 1.31 s, sync
  1.26 s, authority close 1.24 s on the live-size store.
- Reproducible benchmark with an engine-driven growth generator checked
  in at tests/benchmark_v511.py.

Suite: 241 tests, 0 failures, 11 skipped on this exact tree.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ondition

From the second independent red team of bd94f5b, all six findings fixed:
- The sealed drift receipt is durably recorded before the replacement
  checkpoint may publish, in every lane: audit publication, authority-write
  fallback, retry window, and interrupted-transition recovery. A crash
  between receipt and publication leaves the prior baseline plus the
  receipt; the retry deduplicates and completes.
- A receipt that cannot be recorded refuses instead of passing: doctor
  fails with the reason, writes raise into recovery, and the prior
  checkpoint remains the baseline.
- Every transition-recovery receipt carries its per-path delta computed
  against the marker's prior manifest; the lifecycle state/log receipt
  states explicitly that no inventory delta applies.
- Receipts are validated before being trusted (schema, filename/sequence
  binding, content digest, recomputed seal, delta shape); doctor reports
  damaged evidence and never prints a forged reason.
- The completeness contract is honest and kept: 2,000 entries per section
  with the remainder counted, and a truncated receipt retains its
  referenced complete prior manifest generation while the receipt lives.
- Corrupt-marker blobs cited by retained receipts (structured
  preserved_evidence field) outlive the unreferenced-blob bound, so no
  retained receipt cites pruned bytes.

Also: MIGRATION requires the complete pre-update folder snapshot and
declares the first v5.1.1 proposal an intentional one-way boundary; the
benchmark takes --gate metric=max_ms thresholds; protocol, README and
CHANGELOG state the bounded receipt contract in the words the code
enforces.

Suite green on this exact tree.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Closes the five reproduced receipt-contract defects with one principle
applied at every boundary rather than five patches:
- The writer re-reads and fully validates the receipt it wrote (seal,
  filename binding, attachments, post-prune existence) before reporting
  success, and deduplication only ever reuses a receipt that validates.
  An invalid pre-crash receipt is never reused for publication.
- Oversized deltas and preserved corrupt-marker bytes are
  hash-and-size-pinned attachments, validated with their receipt and
  retained while it is retained: truncation no longer loses the exact
  boundary, and no retained receipt can cite pruned or missing bytes
  without being reported as damaged evidence.
- A checkpoint whose referenced manifest evidence is unavailable is
  damaged evidence: it refuses rebaselining with the repair path named
  instead of adopting new bytes with a null delta.
- The receipt sequence grammar is unbounded and sorted numerically; the
  millionth receipt neither collides nor prunes as oldest, and the
  post-write validation would refuse rather than lose it.
- The benchmark carries committed canonical ceilings (--gate default;
  non-finite values breach, never bypass), CI runs it, and the workflow
  triggers on agent/** pushes so the four-leg matrix runs before a PR.

The README gains an explicit support-envelope section releasing v5.1.1 as
a bounded, single-store exact-current performance patch. Five regression
tests cover exactly the five reproductions; nothing speculative added.

Suite green on this exact tree.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Interrupted-transition recovery refuses when the marker's prior
  manifest evidence cannot be loaded, keeping the marker and prior
  checkpoint in place, instead of accepting a reasons-only receipt and
  rebaselining blind.
- Receipt deduplication is bound to the event: prior witness and
  manifest hashes, head, epoch and transition marker must all match
  before a receipt is reused. Equivalent drift from a different
  baseline writes its own receipt.
- The corrupt transition marker is retired only after its preserved
  bytes verify and the receipt citing them is durable; a death or
  obstruction in between leaves the marker for the next attempt.
- The benchmark cold read fails on command failure instead of timing a
  refusal, and a unit test drives the receipt store across the
  200-receipt pruning window as the sequence crosses one million.

Suite green on this exact tree.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Pre-merge red team on disposable copies of a live-shaped store
(2026-09-02). Two reproduced implementation defects are fixed with
regression tests, and three behaviours the adversarial lane observed
are now stated in the docs.

- Console output is UTF-8 on every host. A piped or redirected stdout
  on Windows defaulted to the ANSI code page, so get, recall and
  search died with a codec error on any entry carrying a character
  outside it (present since v5.1.0, latent on the development store).
  stdout and stderr are reconfigured to UTF-8 at startup; the test
  forces cp1252 through the environment so it runs on every CI leg.
- The missing-lock refusal on read paths names the lifecycle commands
  that recreate the lock file instead of blaming the updater.
- Stated: closed run logs sit outside the witnessed inventory; an
  interrupted authority write whose records the recovery pass cannot
  settle withholds the checkpoint until that run's own sync, with
  doctor listing the unfinished decisions; a killed propose may need
  a second command, or doctor, to finish healing.
- MIGRATION: once a v5.1.1 proposal exists, v5.1.0 refuses status,
  doctor, recall and sync while its start opens only a degraded run;
  a start-and-close-only store stays readable by v5.1.0.

Suite green on this exact tree: 254 tests, 0 failures, 11 skips.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Owner-ruled 2026-09-02. A full audit that condemned authority left the
earlier checkpoint readable, so the next warm start printed a clean
brief and exact reads kept serving a store whose writes were paused,
against BIMRI-PROTOCOL 9.5. The round-one decision to keep a stale
witness after a failed write path had not noticed the collision.

- condemn_audit_checkpoint: when the full semantic audit condemns
  authority, advance the state's audit epoch past the checkpoint and
  save state. The witness bytes stay on disk as the prior baseline for
  drift receipts, quarantine and restore, the same retained-but-invalid
  shape a failed resolution leaves. Quarantine baselines, damaged prior
  evidence and strict restore comparisons keep their own contracts; a
  blocked receipt sink still keeps the prior checkpoint readable.
- The next warm start re-proves the store and prints AUTHORITY
  RECOVERY NEEDED; get and recall --key refuse; exact byte restoration
  lets the next audit pass, receipt the epoch advance and republish.
- The one test that asserted the old clean brief after a failed status
  now asserts the banner. New regression covers condemn, degrade,
  retained baseline, repair and republish.
- CHANGELOG, README and PROTOCOL state the invalidation and the
  retained baseline.

Suite green on this exact tree: 255 tests, 0 failures, 11 skips.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The ubuntu-latest / Python 3.8 leg of the d0b1929 run failed on
test_pending_proposal_does_not_reserve_a_soft_tier_target: it compared
Path.glob output against a two-element list in a fixed order, and
directory order is filesystem-dependent (unsorted on ext4, sorted on
NTFS). Both sides are now sorted. Engine unchanged; the other 254 tests
passed on that leg and every leg passed on 562a497.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The top of the README now answers what BIMRI is and why it matters in
the words people actually search for and use: persistent memory for AI
agents that lasts across sessions, in plain files you own, working with
Claude Code, OpenAI Codex and any local agent. The reader-facing half is
built from the live agentguru.ai/bimri copy (the landlord frame, the one
memory example, what you get, several agents one memory), states speed
and test coverage at measured strength, places BIMRI as the memory layer
of the compounding intelligence engine, and answers the questions people
ask, including whether Claude Code remembers between sessions. The full
technical documentation is unchanged in substance below a Reference
divider; em dashes were removed throughout and every prior anchor still
resolves.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@EvolutionUnleashed
EvolutionUnleashed merged commit 12d92f4 into main Sep 2, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant