Skip to content

v1.95.0 - Verified Delivery and Honest Writes

Choose a tag to compare

@itechmeat itechmeat released this 28 Oct 11:56
88c118a

Open Second Brain v1.95.0 - Verified Delivery and Honest Writes

Open Second Brain v1.95.0 makes delivery verifiable and write surfaces honest end to end. A context pack could hand an agent whatever fit its budget, and the only record of what a session injected sat beside no account of what the answer actually used; now the pack can trim its delivered tail by query-term coverage with every drop and rescue counted, and a reply-presence receipt joins what a session injected to what its reply verifiably used, over the receipt's own lifetime. What leaves the vault honors privacy markers down to the last export lane and names every withheld row; what enters it is recoverable and gateable - a failed extraction write freezes the payload it failed on for one-command recovery, a standalone gate blocks commits for writers no hook reaches, and whole-folder moves rewrite inbound links under the occupancy-checked discipline the file surface set - while the operator surfaces state exactly what they can and cannot measure: a lock the probe could not take reads unknown, never free.

Verified Delivery and Honest Writes

What ships

  • Score-aware tail trim for delivered context-pack evidence. With tail_trim_context_pack: "true" in the machine-local main config or the OPEN_SECOND_BRAIN_TAIL_TRIM_CONTEXT_PACK env override (default off), brain_context_pack - MCP only; the o2b brain context-pack verb never reads the gate - runs one score-aware trim over the unified tier-and-budget walk whenever the call carries a query: the top three delivered items are immune, any later item whose query-term coverage is at least 0.8 of the top delivered score is kept - it restates the question's terms nearly as fully as the top hit - and the rest drop whole with a tail-trim skip reason, never partially re-cut. The freed budget is then offered back to over-budget candidates in priority order, the only path by which a page can cross tiers, never reordering or dropping the synthesized attention item. The response carries a conditional tail_trim block (dropped, kept_by_query_terms, rescued, tokens_saved) only when the trim actually ran, the same four counters ride the context_receipt's budget block and the telemetry record's metadata, each dropped item's skip reason surfaces as the telemetry gap tail_trim, and with the key off packs are byte-identical.
  • Reply-presence receipts join what was injected to what the answer used. The answer-quote-check Stop hook now folds one session-keyed reply_presence continuity record per checked turn, beside the annotation it already wrote: a verdict per injected note - verified when a reply span checked out against it, the strongest miss verdict otherwise, and absent for a note that was injected into context but that no reply span was ever measured against, the row this record exists to surface. Exactly one record per checked turn, written even when every span verified, and only when the turn had injected candidates at all; the payload carries identifiers, the per-note verdicts and a hash binding the verdicts to the exact answer text checked - never the answer text itself. The receipt read surfaces join on it: o2b brain context-receipts show and the MCP brain_context_receipts show match by exact session_id and fold over every presence record the session wrote at or after the receipt's own creation, chronologically, with verified winning across turns and the folded rows restricted to the notes the receipt itself injected; a receipt with no readable record in that window names the unjoined outcome honestly, saying which of the two it was - a receipt that names no session at all, or one whose session wrote no record at or after it. list stays a summary.
  • session_inject receipts carry the session key. The SessionStart active-inject receipt records the payload's real session id as its session_id member - the join key the reply-presence read matches on - and stays absent when the host sent nothing real, never invented. Receipts written before this release carry no key and read as unjoined, which is what they are.
  • Privacy-marker denials are named in every shared export. A preference the privacy deny markers reserve now leaves the o2b brain export json and llms-txt preference dumps and the o2b brain bank-export bundle before their bytes are composed, is blocked by the knowledge pack's selection step beside the existing visibility and owner blocks, and is withheld from the static o2b brain explorer --export HTML too - while the live server, the operator's own view, keeps every node. Every lane names what it held back: the json envelope carries an omitted field and the bundle a preferences_omitted report, the pack names the page in its blocked list, and the stderr notice names each denied row with the frontmatter key that denied it; every field is absent when nothing was denied, so a vault with no reservations produces byte-identical output - a smaller export is never a silent one. bank-export --include-reserved is the one override for the reservation itself, for this verb's documented purpose - the one-file personal backup - carrying the reserved rows whole with an inclusion notice naming each carried row; the default run is unchanged. And the SDK facade carries exportPreferencesLlmsTxtDetailed beside its now-deprecated string-only form, returning the same text beside the omission report, so an in-process caller no longer watches reserved rows leave silently.
  • o2b brain dead-letters: the failed extraction write gets an exit. A multi-artifact extraction write that failed part way already left a durable dead-letter record; the letters were write-only. The dead-letter schema moves to v2 and freezes the failing payload into the letter - each frozen item redacted at freeze time by the same redaction the write path runs, with the raw-text dedup hash stored beside it - so what the write meant to land survives the failure; list --json rows carry only has_payload, so the bulk surface agents and cron logs read never prints a payload, and v1 letters parse unchanged and classify re-extract. The new verb lists every letter with its classification - recover, pending, re-extract, not_recoverable, resolved - and the exact copy-paste command that resolves it; a letter whose every undelivered item the durability gate will never accept classifies not_recoverable before any command promises a re-run. show <id> prints one letter in full, and recover <id> re-runs a schema-2 letter's frozen payload through the extraction commit at CURRENT vault state, dry-run by default, where a topic-delivered item is left out of the plan and the apply entirely, so a re-extract's reworded text is never replayed as a second signal while already-written items still dedup away. NOTHING here deletes a letter: a recovered letter is retained, and removing it stays an operator's hand action on the named file.
  • o2b brain validate: a standalone, commit-blocking validation gate for hook-less writers. A writer with no hook harness had no way to block its own commit - brain lint always exits 0. The new gate runs the exact write-receipt page lint over exactly one caller-named page set - --paths (vault-relative, repeatable, one flag per page) or --dirty (every git-dirty Markdown note) - and nothing else, so it is safe inside any gate. The exit code is the product, byte-for-byte the doctor contract: an error finding exits 1, warnings exit 2 under --strict, a named page the lint could not read exits 1, clean exits 0; a vault outside a git worktree, or ignored by its enclosing repository, refuses --dirty with exit 2 naming --paths as the remedy. Report-only: the fixes stay with brain doctor --repair --apply and brain lint --consolidate --apply, which every finding's next_command names.
  • Whole-folder move and rename on the note-lifecycle surface. o2b brain note-lifecycle move-folder relocates a whole folder under a destination parent and rename-folder renames it within its parent - split so a caller that meant one and spells the other is refused wrong_action rather than moved by accident - and the MCP brain_note_lifecycle tool accepts both through the same action enum. The folder surface mirrors the file envelope rung for rung, and every destination is checked free BEFORE the first rename - the closest thing to atomicity the operation honestly has - so an occupied destination refuses with nothing moved and the source untouched. The move set is the folder's Markdown only, judged by where a file really lives: a symlinked directory or note under the source is excluded and named in the receipt's residue instead of being pulled into the move, a source reached through an alias moves under its real name, and the destination-inside-source guard compares real paths, so an alias of the source is refused as nesting. The move set's inbound path-spelled wikilinks rewrite in one pass to the minimal spelling that still resolves; bare-basename links are untouched, and the receipt names the settled cost of a Markdown-only move - what stayed behind in the source folder and, per moved note, the relative links whose targets stayed behind - so a zero rewrite count never reads as nothing broke. There is no rollback, on purpose and by name: a mid-set failure is named per file in moveFailures. Dry-run is the default.
  • The operator surfaces state what they measure about the store and the clients. o2b brain status gains a store group: the search writer lock's three-state read - held (a live writer holds it, with its age), free (no live holder at the instant of the read), unknown (the probe could not be taken, with the reason) - so a state that could not be measured is never rendered as free; thisCaller: "read-only" states the snapshot's own standing, writerLockOwner is null while a lock is held because the lock record carries no identity - a measurement, not an omission, and the renderer says so - and a held lock is informational, never flipping the snapshot unhealthy. o2b doctor --readiness gains the client_versions probe: each detected agent client is asked its version through its own version argv, one row per target - pass with the raw first stdout line, unknown naming why (a thrown runner, a non-zero exit, a timeout, empty stdout), or skipped when the target has no version command - the ask settles on the child's own exit rather than on stdout closing, a client that outlives the cut is SIGKILLed after the TERM grace, and an all-unknown probe keeps doctor at exit 6, never 1, because a version it cannot read proves nothing broken.

Process wins

  • One source per fact: every What ships claim traces to the 1.95.0 CHANGELOG entry or the merged PR #280 description, and the quality numbers come from the PR's own verification section and the CI run at the merge head, never estimates.
  • Six dev quality cycle rounds ran over the branch and closed at their stop rule - 72 findings fixed red-first, each fix carrying its own failing-run regression pin, 50 declined with reasons - and an operator-handed external review (2 high, 18 medium) was fixed in full with regression tests, including two headline repairs the CHANGELOG carries: the explorer export lane now honors privacy markers, and folder moves are judged by real location so symlink aliases cannot relocate foreign notes. A mutation test audit applied 10 mutations and the suite caught all 10; a security audit over the branch's trust boundaries closed with no open findings; CodeRabbit's 7 findings are fixed with commits named on the threads.
  • Quality record: 20,842 tests / 0 fail across 1,715 test files in the PR's verification section, TypeScript clean, lint at 0 errors, the openclaw bundle rebuilt and byte-identical, and all 20 CI checks green at the pushed head c72f765 (run 40677739735), squash-merged as 88c118a.

Notes

  • Score-aware tail trim ships off by default and on the MCP surface only: the o2b brain context-pack verb never reads the gate, so an operator opts in before a delivered pack changes shape at all.
  • Recovery is honest about its edges: v1 dead letters classify re-extract because their payload was never frozen, a frozen vault refuses recovery, and nothing here deletes a letter - removal stays an operator's hand action on the named file.
  • The writer lock record carries no owner identity, so status reports writerLockOwner as null and the renderer says so - a measurement, not an omission.
  • Two Dependabot bumps ride in the release window - development dependencies (PR #275) and GitHub Actions (PR #276) - merged ahead of the feature PR.
  • The docs moved with the code: docs/cli-reference.md, docs/mcp.md, docs/observability.md, docs/how-it-works.md and the hooks README document every new surface (PR #280).
  • The version bump to 1.95.0 shipped inside the PR (#280), per the project rule in CLAUDE.md.
  • Release image: the canonical terminal style, here as an interaction diagram (animated GIF in this body; static PNG, 2x PNG and the SVG source attached as assets).