Changelog¶
Unreleased¶
- P11 milestone 4: payload GC.
ctx gc <dir>reports what could be collected.--applycollects payloads that nothing needs: not the current state, not the lastkeep_epochsepochs (10,000 by default, at least 100), not a certificate a session or handoff holds, not a snapshot a reader holds.ctx gc <dir> --compact, run with ctxd stopped, reclaims the disk space.- A collected payload reads
unavailable: "collected". Rolling a head back to it needs the bytes again;ctx_supersedesends them. - Git mirrors keep validating over collected history, checked by hash. Kernel state, the op_log and digests are never changed.
- P11 milestone 3: ctxd runs lazy maintenance (on by default;
<data>/ctxd.toml[maintenance] lazy = falseturns it off). - A large cascade is acknowledged after the budget, with
settling: true, and finishes while ctxd is idle or when a read needs it. - Reads that need an unsettled record wait up to
read_settle_ms(50 ms by default) for it to settle. They then answer exactly as eager maintenance would, or fail closed: PENDING(StructuralUnknown) for certified reads,Settling{epoch}for WHY, DIFF and mirror export. - Upgrade note: IPC protocol 9. Install all binaries together and restart ctxd and the agent sessions.
- P11 milestone 2: the store side of lazy maintenance. Off by default; ctxd does not enable it yet.
- op_log format 7 marks a commit acknowledged before its maintenance finished (
settling) and stores exactly that acknowledgement. Existing format-6 segments are kept as they are, with their checksums. - The first commit after the upgrade starts a format-7 segment, so an older binary refuses the store instead of misreading it.
- The store settles pending maintenance before every kernel entry, then writes that epoch's projections.
- P11 milestone 1: lazy maintenance in the core. Not yet used by
ctxd. - Counting and the status walk now run as one pass, interleaved by rank. The pass can stop after a work budget, leaving a frontier for
Db::drain. Once drained, results match eager maintenance exactly. - While a frontier exists, an unsettled node reads
PENDING(StructuralUnknown). - Commits, dry runs and
Kernel::runrefuse a store with an undrained frontier (TxError::Unsettled). - The default budget is 1,000,000 units, about 43–48 ms for a 1M-revision cascade on the baseline machine.
-
Tested by PROP1-lazy at 10,000 seeds (gate).
-
Docs: team exchange day to day. The reference now says which git commands sync a team (a fetch or pull from the team's remote imports; a push to it, by name, publishes; other remotes, bare URLs and dry runs do neither) and that
ctx team syncandlag_checkonly re-read refs already fetched.
0.4.2 — 2026-11-24¶
Fixes to ctx ui for stores in a team. No format or protocol change: install the four binaries together and restart ctxd; no migration.
ctx uishows team records with their real status. The ui replays the log and has no live team position, so every team mirror read asPENDING(ReplicationLag)whilectxd,ctx_readand agents read the same records as CERTIFIED. A mirror now reads as of its branch's last committed catch-up, as a code anchor already reads as of its last committed watermark.ctxd's own reads are unchanged.ctx uidraws the team's dependencies. Mirrors carry no rules: the root's rules live in the team replica (ADR 0018), so the graph showed team records without any edge. The ui now reads each joined team's replica from its log, read-only (an incomplete last frame thatctxdmay be appending is skipped, never cut), and draws the root's rules between the mirror revisions holding the root's contents; the detail panel names them "team rule (at the root)". A rule over a record the branch has not caught up to is left out until it has. The graph also refreshes when a team's log changes.ctx uishows a record and its own team copy once. A store that publishes its records and imports them back held each one twice: the local record and its mirrorteam/<id>/<same key>. A "team copies" control (remembered per browser) now chooses: merged (default) folds a mirror whose content equals the local record with the same key into that record, which carries ateamtag, and moves the mirror's edges onto it; a mirror whose content differs, or with no local record, stays. shown lists everything as stored; hidden lists local records only. Only the page changes; the data andctxd's answers are the same.- P11 G0 passed (2026-11-20). ADR 0019 r0.7 is accepted and its §11 amendments are in SPEC v1.11.0:
- cascade-bounded lazy maintenance: a commit defers propagation past a work budget
Eand reportssettling; settled reads equal eager; unsettled STRICT reads fail closed withPENDING(StructuralUnknown); - op_log format 7, with format-6 and format-7 segments in one log and a version barrier, and protocol 9;
- explicit payload GC (
ctx gc, dry run by default;--apply; offline--compact) with a K1–K5 keep set and a ledger; mirrors over collected bodies are verified by hash instead ofPayloadGone; - a measure-then-adopt layout ablation;
- Postgres moved out of P11.
Nothing is implemented yet. G6 is still to be set by the owner. See the P11 gate.
0.4.1 — 2026-11-20¶
A faster ctx ui graph and fixes after 0.4.0. No format or protocol change: install the four binaries together and restart ctxd (ctx service restart <dir>, or ctx shutdown <dir> and start it again); no migration, and the hooks stay as installed.
ctx ui: the network graph is drawn on a canvas. The SVG network spent most of each frame painting (one element per dot, edge and name): on the largest local store we run (131 nodes) dragging a node delayed input by up to 688 ms, hovering by 216 ms and a click by 176 ms. The canvas draws edges batched by style, then dots and names, only when something changes; every one of those interactions now stays at 60 fps with input delays of at most 24 ms. Selecting, searching, filtering and highlighting redraw the scene instead of rebuilding it; the start layout is computed only for new nodes with no placed neighbour; repulsion uses a Barnes–Hut quadtree (O(n log n)) in the simulation and the start layout. At 3,000 synthetic nodes a click went from 2.1 s to 4 ms and a simulation frame from 47 ms to 15 ms. The dots no longer float at rest (that cost a redraw every frame). The layered layout stays SVG.- Nightly mutation audit: P10 lag code covered. The kernel audit's tests now include
p10_admission, with a test that a mirror read lags until its team is left (TEAM_LEFT), and unit tests that the memory accounting counts a gap row like a watermark row and a replica-origin logical as one origin row. The unusedDb::replication_scopesis removed. ctx migratereports a format 5 → 6 migration. 0.4.0 migrated the log correctly but printed "already at format 6; nothing changed", because that step re-encrypts nothing. It now printsmigrated format 5 -> 6 (N frames); backup …/log.v5.bak.
0.4.0 — 2026-11-18¶
P10 passes its gate: team exchange through the git remote (ctx team), with signed history, per-clone replicas, mirrors on every branch, proposals published from pre-push, and compaction. Teams are optional; a store without one works as before.
Upgrade notes. IPC protocol 8 and op_log format 6.
- Stop ctxd with the old binaries (ctx shutdown <dir>), install all four new binaries together, and run ctx migrate <dir> once. The migration rewrites only the log and keeps the old one as log.v5.bak. Back up the data directory first.
- Clients from 0.3.x cannot talk to a 0.4.0 daemon. Re-run ctx hooks install (or ctx setup), re-trust the hooks in Codex with /hooks, and restart Claude Code and OpenCode sessions.
- To use a team, re-run ctx anchors hooks … install (or ctx setup) so the git hooks become the dispatcher; your own hooks are kept and chained.
- Gate P10 passed (2026-11-18). The owner accepted the gate. Deviations, all by owner decision: G4's
team_docfuzz ran 17.4 h instead of 24 h, G5'sgit commitbudget is measured over a trivial hook, and G6 ran the bare-remote trial only. See the P10 gate; SPEC v1.10.1. - P10 team exchange implemented (see the P10 gate). Knowledge shared through the git remote as a signed chain the remote's ref CAS decides; per-clone replicas, mirrors on every branch, a proposal queue published from
pre-push, an announce fence against stale reads, compaction, and thectx teamcommands (see REFERENCE). Upgrade notes. Op_log format 6 and IPC protocol 7 → 8: stopctxd, install all binaries together, runctx migrate <dir>(log only; the old log is kept aslog.v5.bak). Re-runctx anchors hooks … install(orctx setup) so the git hooks become the dispatcher; your own hooks are kept and chained. - P10 G8 implementation review fixes (thirteen findings, all fixed; dispositions):
- Publish. The pre-push hook reads
--signedand--dras git does. A dependent of a proposal held for the next entry waits for it instead of conflicting, and a proposal no single entry can hold is refused at enqueue (ProposalTooLarge). Publish waits while a Compact is pending. - Lag. An announce is dropped only after a fresh read of the ref.
ctxdreads the announce file before it serves any request. Publish and compaction pushes announce their own ref update. - Idempotency.
client_txn_idcovers team proposals: a retry returns the sameProposed. Reusing the id for another request, or across a proposal and a local commit, isTxnIdReuse. - Trust. A rejected entry decides proposals only when its author signed it. Git reads ignore replace refs and grafts, and each object must hash to its id. A refusal never gives the reason that a hidden proposal caused.
- Shred. A team shred keeps bytes that a local artifact payload, a ValidationRecord's metadata or a resolution note holds.
- Crashes. A checkpoint join writes its Join frame before its anchor. Opening a team puts back the log of an interrupted
ctx team rebuild. - P10 fixes after the second review. Compaction no longer leaves reads over a team lagging for good. The announce records git's pid, not the hook shell's.
ctxdwrites its lease before it reads the announce files. A member's own rejected entry rejects its proposals. Rebuild sets the anchor aside with the log. A team shred spares replaced validation metadata. The dry-run parser follows git's prefix rule for everygit pushoption. - P10 fixes after the owner's review (2026-11-18). A
SetTeamAccessproposal is published in an entry of its own; packed with other proposals, accept refused the whole entry (SoleOpRequired). A rejoin whose chain gives a mirrored record another kind or lane is refused (TeamKeyMismatch), and catch-up never writes past one. A catch-up of more than 65,536 new revisions no longer overflows: it commits them in batches first, none of them base, then heads, bases and the watermark. New:ctx team create|join --orphan-branchkeeps the chain on orphan branches for hosts that refuse custom refs. - P10 G4 (2026-11-18). The 24 h fuzz run found no crash in seven targets.
team_docstopped after 17.4 h at libFuzzer's 4 GB memory limit; ASan's allocator retaining memory caused it, not the target, and the owner accepted the shorter run (G4 note). - P10 G2 additions. G-LAG as a property (T113); catch-up kill points against an uninterrupted run (T114); a push whose command line cannot be read publishes nothing; mirror read redaction through the daemon (T117).
- P10 G0 passed (2026-11-16). ADR 0018 r0.6 is accepted and its §12 amendments are incorporated into SPEC v1.10.0: Git-root team exchange, replicas/mirrors, proposal authorisation and publishing, lag fences, strict history and compaction limits. Ordinary proposals reserve one Compact id; Compact checks its actual size. The previous scale/GC phase moves to P11 and recursion to P12. Implementation, format 6 / protocol 8 and G1–G8 remain pending; see the P10 gate.
0.3.0 — 2026-11-10¶
P7, P8 and P9 pass their gates: semantic validation and conflicts; retrieval, packing and the git mirror; principals, permissions, egress and crypto-shred (optional multi-user mode, ctxd --multi-user, off by default).
Upgrade notes. IPC protocol 7 and op_log format 5.
- Stop ctxd with the old binaries (ctx shutdown <dir>), install all four new binaries together, and run ctx migrate <dir> once. It keeps the old log as log.vN.bak, re-encrypts the payload packs and rebuilds the projections; a store whose migration did not finish refuses to open until it is rerun.
- Clients from 0.2.x cannot talk to a 0.3.0 daemon. Re-run ctx hooks install (or ctx setup), re-trust the hooks in Codex with /hooks, and restart Claude Code and OpenCode sessions.
- Back up the data directory first: after the migration it holds a keys/ log, and losing it loses every payload.
- The bundled SQLite is 3.54.1 (RUSTSEC-2026-0459).
- Docs: a shorter README. Install details and
ctx uimoved todocs/GETTING_STARTED.md, the per-phase reference and crate table todocs/REFERENCE.md, and verification todocs/DEVELOPMENT.md. The README adds CI, docs, Rust and license badges and a "Built on" section with badges linking to the cited papers. The Chinese README is removed. - Gate P9 passed (2026-11-10). G6, the two-user macOS run, was skipped by owner decision; G5 accepts the narrow reader at up to +12.7 % at 10⁵ records (owner). See the P9 gate.
- P9 G8 implementation review fixes:
- Recall. The lane pre-filter no longer changes bm25 order: it restricts by rowid, and lane names are quoted whole. The store owner's agent-channel recall with no scope leaves out other principals' personal lanes (F12). Recall's
dirfilter ignores anchors the principal cannot read. - Redaction.
ctx_conflictsfilters before itslimit, so hidden conflicts take no slot.TxnStatusis redacted with the view of the branch the batch committed on. - Key log. It is no longer rewritten at every open once a blob follows a shred.
- Merges. A non-owner's merge into
mainor an owner branch carries new CodeAnchors as not base (F14). - Tests. T108 has one case per row of ADR 0017 §6.2.7. PROP15's merge generator covers policy, anchors, artifacts, enabled flags and heads. Recall per principal and the lane filter have randomized checks, and PROP16 runs
doctor's oracle check. - G4:
access.tomlis fuzzed. The parser moved into thecontextdb-clilibrary (access_doc), and a new fuzz targetaccess_doccovers it. The 24 h run ofipc_request,ipc_principal,store_recordsandaccess_docfound no crash. - Security: SQLite 3.54.1 (
rusqlite0.41.0,libsqlite3-sys0.39.1) for RUSTSEC-2026-0459: SQLite before 3.54.0 could return uninitialized page-cache memory when a database is opened with a-walfile of a different page size. No code changes; recall on the P8 path is about 45 % faster at 10⁵ records on the remote host. - Fix (G5): the lane filter's rowid check ran one FTS5 query per row. After the MA1 fix, SQLite passed
rowid IN (…)to FTS5 asrowid =, and bm25 recomputed its idf for each row: a reader of 1 % of 10⁵ records had recall p99 ≈ 370 ms. The check is now+rowid IN (…)and runs before any column is read (p99 back to within ±16 % of the P8 path); results are unchanged. - Fix (G5): recall for a principal who reads few lanes. The bm25 ranker skips hidden matches (ADR 0017 §5.3). A principal allowed to read about 1 % of the rows therefore paged, OFFSET by OFFSET, through nearly every match: at 10⁵ records its recall p99 was 2.4 s. Recall now restricts the FTS query to the lanes the principal may read: a
scopecolumn filter, then an exact lane check. This applies only when more than half the logicals lie outside those lanes and the principal owns none there.admitstill decides every hit; PROP14 per principal holds as before. The lane set (AccessState::read_lanes) is a superset ofAuthorized, because grants and denies only narrow it. A member of the default lane, who may read any unlisted lane, gets no filter. ctxd --multi-user(owner decision, 2026-11-08). This is the switch for multi-user mode;ctx service install --multi-userwrites it into the service. Without it, an access document that names other principals maps nobody, as before. With it, the document maps them once the file-system rules of ADR 0017 §3.2 hold. Off by default; deployments are not changed.- P9 milestone 6e:
ctx migrateto format 5 (ADR 0017 §8.5, §10; T104). Every P9 store is fully encrypted; older stores needctx migrateonce, and openers refuse a migration that did not complete. - The procedure, under the store lock, success only at the end:
- pre-checks that change nothing:
personal:<x>lanes with valid names, and free space for one copy of the plaintext packs and the projections; - a
MIGRATING-5marker, synced; - the log, through the existing swap;
- every plaintext pack segment and loose blob file re-encrypted into a new segment (keys first), synced, read back and checked before the old file is unlinked; shredded contents are dropped;
recall,vectors,jobsandcandidatesrebuilt withVACUUM INTOinto a fresh file stampedrebuilt_at_format = 5, so their free pages and-walfiles from before P9 hold no plaintext;- private modes and no ACLs;
- a verification against the disk;
- the marker removed.
- pre-checks that change nothing:
- Rerun. Each step redoes only what its own check finds missing, so a rerun after a kill or power cut at any point completes. A store already complete reports "already at format 5" and changes nothing.
- Refusals.
ctxd,ctxanddoctorrefuse a marked store withMigrationIncomplete{step}and "runctx migrateagain". A format-5 store without the marker is refused too if it holds a plaintext segment or loose blob (step 3) or an unstamped projection (step 4). That covers a lost marker and stores migrated by a milestone-2 build. New projection files are stamped when created. - Fix: a store lock released a moment ago could read as
Locked.flockbelongs to the open file description, and a child process another thread is spawning holds a copy of every descriptor until itsexec. So an immediate relock failed in about 0.3–2% of tries while git children were being spawned (on macOS and Linux, up to ~5 ms on an idle machine).ctxd,doctorandmigratenow retry a held lock for up to 2 s before reportingLocked; a lock another process really holds is still refused. This was the intermittentp8_g4failure (a_truncated_log_is_stale_not_modified) on CI. - Nightly gates repaired. They had failed since P9's earlier milestones for three reasons:
- the three tests that switch the peer uid are ignored in release builds, where the hook is compiled out;
- the
mcp_jsonfuzz target is updated forEnvelope.redaction, andscripts/check.shnow type-checks the fuzz crate; scripts/mutation-p4.shscales the test timeout with the unmutated baseline (at least 120 s), instead of a fixed 120 s that the baseline itself outgrew on a 2-core runner.- P9 milestone 6d: the mirror after a shred (ADR 0017 §8.4 item 5; T103). Protocol 7:
MirrorAction::Exportgainsrebuild. MirrorStale{PayloadGone}.ctx mirror exportrefuses a ref whose history holds a shredded payload, even with--force, because the backup--forcekeeps would hold it too. The check hashes the body (and the whole text) of every blob reachable from the tip. A history found clean is cached inmirror.sqlitewith the last shred it was checked against, so only the first export after a shred scans. A deleted ref is not recreated on a cached commit that holds a shredded payload; the export starts a fresh history instead.ctx mirror export --rebuildreplaces the ref with one parentless commit of the current render, whatever the ref held (hand edits included), and deletes everyrefs/contextdb-backup/ref. Git keeps the old objects untilgit reflog expire --expire=now --all && git gc --prune=now. ContextDB prints that command but does not run it, because running it rewrites the user's repository.- P9 milestone 6c: the purge after a shred (ADR 0017 §8.2, §8.4; T103). After a shred commits, the daemon removes the payload from every file it controls, and
ctx shredreportspurgedonly once all of it is done. - The key log is rewritten on the writer thread without the shredded keys: a new generation is written and synced, renamed into place, the directory synced, every older segment unlinked, and the directory synced again. A rewrite interrupted at any point runs again when the store opens.
-
The projections:
recall.sqlitere-indexes the affected records with empty text and merges its FTS segments;vectors.sqlitedeletes their vectors, even when no embedder runs now;jobs.sqlitemarks jobs that read the payloadskippedand deletes their stored output;candidates.sqlitemarks pairs with such a side skipped and deletes their output.
Each projection now opens with
secure_delete, records its ownpurged_through, and truncates its WAL after a purge. - Races closed. Indexer and embedder writes drop text that was shredded after they read it. A validator or judge call in flight at shred time has its output dropped (Skipped). - Status and recovery.ctx statuslists shred epochs whose purge is pending, andctxdpurges them at start. The session log and the outbox stay outside the guarantee, asctx shredsays. - P9 milestone 6b:ShredContent(ADR 0017 §8.3; T59, PROP16). op_log format 5 gains op tag 21; protocol 7 gainsShredandContentShredded. -ctx shred <dir> <key>[@rev] [--with-reviews] [--yes](admin). It lists every revision on every branch that shares the payload; with--with-reviewsit also lists review payloads, validation metadata and resolution notes on those revisions. It refuses CodeAnchor descriptors and prints what a shred cannot reach.--yescommits the shred. - No effect on derivation. Topology, bases, heads, rules, statuses and digests are unchanged. The kernel records the shredded set globally and carries it in snapshots; older snapshots are ignored and replay starts earlier. - Reads answerPayload::Unavailable(Shredded), checked before the blob store.ctx_readreturns no body andunavailable: "shredded". - Refusals. A later op naming the hash (content,meta,payload_hash,note) isContentShredded, and re-sending the bytes cannot store a new copy. A non-owner sending the bytes learnsContentShredded(F13); without them it getsMissingBlob, even for a hash on a revision it reads. - The key and the projection rows are not purged yet: the shred reportscommitted, purge pendinguntil milestone 6c. - P9 milestone 6a: encrypted packs and the key log (ADR 0017 §8.1, §8.2). New payloads are stored asCXBErecords, encrypted with XChaCha20-Poly1305 under one random key per content hash. The content hash stays BLAKE3 of the plaintext, so addresses, dedup and the op_log do not change. Segments written since P9 start with aCXPHheader. -<data>/keys/holds the key log (keylog-NNNNNNNN), which is truth like the packs: it cannot be rebuilt, and backups must include it, or every payload is lost. A key record is written with an ordered sync before its pack record, so the commit's full sync makes both durable. - A record whose key is missing is unreadable and the payload counts as absent. PlaintextCXBPrecords from before P9 stay readable untilctx migrate(milestone 6e) re-encrypts them. - New dependencies incontextdb-store:chacha20poly13050.11 (RustCrypto, Apache-2.0/MIT) andgetrandom0.3. - P9 milestone 5: egress (ADR 0017 §7; T105). Once an access document exists, the bodies of a lane whoseegressis off (personal lanes by default, F6) stay on the machine. Without an access document nothing changes. - Validators and the judge. A rule job or candidate pair reading such a lane goes only to a validator markedlocal = trueinvalidators.toml. The flag is the owner's statement that the command keeps data on the machine; aclaudevalidator cannot carry it. Other work is skipped with no attempt counted: a job stays queued and runs once the lane's egress turns on or a local validator is added; a pair is postponed and woken by the nextSetAccessor reload. The check is repeated on the snapshot the task is built from.ctx validators statusshowsskipped_egressandpair_skipped_egress. - The embedder receives a body only if a head in an egress lane carries it, re-checked before each batch. Vector ranking and embedding candidates skip heads in non-egress lanes, so a vector shared through equal content is never used for one. - The git mirror renders only egress lanes; once the document maps another principal, only those every principal reads (members*members, no grants, no denies). A commit that drops a lane's files for this reason carriesCtx-Egress-Removed: <lanes>; the bodies stay in older commits. In that modectx mirror exportrefuses a repository whose.gitis group- or world-readable (MirrorReadable) unless--readable-ok. The tip check still replays the render at the tip's epoch, access document included. - P9 milestone 4: writes (ADR 0017 §6; T60, T102, T107, T108; PROP15 write half). Protocol 7:ctx_what_ifandImpactBatchnow carry payload bodies (blobs) for proof of possession. - Write checks in the kernel, right after an op's refs resolve, against the access document and the batch's principal.ctx_what_if,ImpactBatchand the commit therefore give one answer. Every logical an op names needsRead. Creating or changing a record needs a writer of its lane, and a base (adopt_as_base,AssertBase,RetractBase) needs a curator. A rule needsReadon its conclusion and every premise, andWriteon the conclusion's lane; an artifact needsReadandWriteon its target. A refusal isUnauthorized{op_index, reference, need}, wherereferenceis the ref as the op wrote it. A ref to a hidden logical is refused whether or not the revisions it names exist. The store owner passes every check. -personal:<name>for a name the access document does not list isInvalidLane, for everyone. - Proof of possession. A content hash sent by a principal other than the store owner needs its bytes, unless it already belongs to a record that principal reads. Otherwise the answer isMissingBlob, the same as for a hash nobody has, in dry runs as in commits. - Branches belong to their creator. Only the creator and the store owner commit on, merge into or archive a branch another principal created.mainand the store owner's branches take every writer's commits, and only the store owner archives them. Sessions auto-bind only to branches of their own principal or the store owner. The refusal isBranchOfAnotherPrincipal. - Merges intomainor an owner branch apply only changes the merging principal could make directly there. Validation records and code anchors are carried as they are; any other failing change refuses the whole merge withMergeUnauthorized{count}, naming nothing. A merge into one's own branch is not checked. -ctx_recordandctx_supersederefuse a dep, or a carried rule, that names a hidden logical, without naming it. Non-owners now see the details ofUnauthorized,HeadConflict,ReadSetConflictandMissingBlob. - Snapshots record each branch's creator. Older format-5 snapshots are ignored, and replay starts earlier. - P9 milestone 3: reads (ADR 0017 §5; T17, T17b, T100, T101, S13-rows-e2e UNAVAILABLE; PROP15 read half). Protocol 7 gains the redacted shapes; clients andctxdupgrade together. - One redaction point. Every response to a principal other than the store owner passes through it. A response names only logicals that principal may read, with their revisions and rules. Hidden entries are dropped, or counted in the envelope's newredactionrecord:redacted, IMPACT'sredacted_references, per-node WHY / WHY_NOT counts, and each certificate'svector_size. The store owner's responses are unchanged and carry noredaction. - Reads. A hidden logical read by key (or WHY, WHY_NOT, IMPACT of one) answersUnavailable{target}with the target as sent, no payload, no ledger entry and no certificate. Recall skips hidden matches before they take a slot, so it returnsmin(limit, readable eligible)items; a scope naming a lane the principal cannot read returns nothing. - Inside readable items, a witness rule with a hidden premise readsRedacted, and a hidden pinned premise inSupersededPinnedPremisereadsSupersededPinnedPremiseRedacted. - Diff-shaped responses (commit results, WhatIf, Diff,ctx_changes,context_update, merge reports, certificate diffs) drop hidden entries and count them.TxnStatusanswers a non-owner only for its own transactions.ctx_conflictslists a pair only if both sides are readable. Error details are withheld from non-owners (the code stays). - Certificates. Issuance refuses an entry the principal cannot read (UNAVAILABLE). Validation re-checks every entry under the current access document, so a revocation makes earlier certificates and ledger readsDenied. A non-owner never receives a certificate's vector. - Handoffs copy only the reads the acceptor may read; the rest are counted indropped_unauthorized. -ctx uineeds a launch token while the access document maps other principals: it printshttp://127.0.0.1:<port>/#token=…, the page keeps the token insessionStorageand sends it as a bearer header, and a foreignOriginis refused. Once an access document exists, abstracts are no longer read fromrecall.sqlite. Single-user stores see no change. -ctx-mcprenders a hidden read as{key, status: "UNAVAILABLE"}and adds the counts underredacted. - Still no multi-user deployment:ctxddoes not enable it until writes are authorised (milestone 4). - P9 milestone 2: the access document (ADR 0017 §3.1, §4). op_log format 5: existing stores needctx migrate <dir>(a header-only rewrite; batches and frame checksums stay byte-identical, so certificates keep their log links). -SetAccesscommits the access document: admin only, the sole op of its batch, onmain, global to every branch, never in a dry run. The kernel refuses a document breaking ADR 0017 §4.2 withInvalidAccess{reason}; the daemon also requires the owner entry to carry its own uid. - Principal ids are assigned from 16 upwards in order of first appearance and never reused; a name keeps its first id, the owner's entry maps to 0, and a name cannot switch between owner and principal. -ctx access apply <dir> [--file .contextdb/access.toml],ctx access show <dir>andctx access check <dir> <principal> <key> [--branch B](admin).checkprintsAuthorizedand the step that decided it (owner, logical owner, membership, role, ACL); dir grants depend on the branch'sdirs. -Authorized(p, l, b)is implemented in the kernel and as an independent decision table in the oracle; they agree on random documents and logicals. - No deployment enters multi-user mode yet. A committed document maps other OS users only when the daemon is started with multi-user mode enabled, which only tests do until reads and writes are authorised (milestones 3–4).ctx access showsays whether the mapping is in effect. - Snapshots of format 5 carry the document; older snapshots are ignored and replay starts earlier. EventLog v3 carriesSetAccess(tag 20). - P9 milestone 1: principals and the transport (ADR 0017 §3; T58, T98, T99). Protocol 7; clients andctxdupgrade together. - The socket layout changes. The agent socket is now inrun/shared/and the observer and admin sockets inrun/private/. A publicrun/shared/endpointrecord holds only the protocol, the socket name and the owner's uid. Clients find sockets through the lease as before. - Files in the data directory are private. The store and the outbox create directories 0700 and files 0600;ctxd,ctx,ctx-hookandctx-mcpsetumask 077;ctx service installwritesUmask077 into the launchd plist and the systemd unit. -ctx doctor <dir> --fix-modesremoves group and other permission bits and every ACL in the data directory. It never changes an owner. - Groundwork for other OS users. Another OS user can be mapped to its own principal, on the agent socket only. Before that the daemon checks the data directory: owner, modes and ACLs (deny-only ACLs included), ancestors writable by others without the sticky bit, and whether each mapped user can reach the socket. A connection whose user is unmapped getsAccessRevoked. - Such a principal may send only the requestsctx-mcpuses; everything else isChannelRestricted. - It cannot bind another principal's session, and its harness keys are its own. -ctx_handoff_begin{to}addresses a handoff to a principal; the accept reportsreads_dropped_unauthorized. -ctx-mcp --data <dir>(orCTXDB_DATA) for a data directory the user does not own connects through the endpoint and refuses a server that is not the owner (ServerNotOwner). - Mapping comes from the access document in milestone 2; until reads and writes are authorised (milestones 3–4) no deployment enters multi-user mode. - P9 G0 (ADR 0017 r0.5, SPEC v1.9.0): the design for principals, permissions and security was accepted after independent review rounds and three owner reviews. No code changes yet. - P8 milestone 7: verification fixes (ADR 0016 §10; found by G4 and G5). - Fix: the text ranker no longer scores every match. bm25 ranks matches in windows of 2,048 rows, by row id (latest created logical first); paging walks every window, so every match is still reached. A query with at most 2,048 matches keeps the plain bm25 order. Row ids are now(logical << 16) | branch, so windows and results are the same after a rebuild; an olderrecall.sqliteis rebuilt on open. Before, a query on a term most records hold took time linear in the store (at 10⁵ records, 152 ms idle p99 and up to 370 ms under a commit stream), and lexical candidate generation became quadratic in a backfill. - Fix: recall pages agree with each other. One recall reads every bm25 page in one read snapshot, on its own read-only connection torecall.sqlite(WAL), so a concurrent index write can neither delay recall nor shift a row past a page boundary. - Fix: a long candidate pass no longer holds the text index back. The pass lets the index catch up every 50 ms (incremental updates only; a full rebuild waits for the pass to end), so after a burst of commits recall sees new records within the bounded wait. - Fix: a mirror export after a log truncation isMirrorStale. The cache-hit fast path accepted a cached tip without checking that the log still matched it, and a new commit would follow history the log no longer had. If the ref was also deleted, the export now starts fresh instead of recreating it on that commit. - Fix: a failed ref update isMirrorRacedonly when the ref moved. A held.lockfile or another git error isMirrorFailed, and the export can be retried. -ctx uiredesign. - A new Records tab is the default. It lists every head grouped by key path, with its status, kind, stored abstract (read-only fromrecall.sqlite), changed Summary premises, and the latest head moves. Search covers keys and abstracts. - Graph can show only the records within 1–3 hops of the selection, and nodes show the full last key segment. - The header shows only the statuses that occur ("all heads certified" instead of a row of zeros), the number of superseded revisions, and a filter for Summaries with changed premises. - The detail panel shows the body as abstract, outline or full. - P8 milestone 6: the git mirror (ADR 0016 §8; T57, T91, T92, T96, T97). -ctx mirror export <dir> [--branch B] [--project <repo>] [--force] [--adopt](admin) renders the branch's live heads intorefs/contextdb/b<branch id>of the project repository. The project defaults to the git work tree holding the data directory. - Each record is a file<lane>/<kind>/<key>.md: front matter (key, logical, rev, kind, label, rev_epoch, premises), then the full body. A rootREADME.mdsays the ref is generated. - Path segments are percent-encoded, so paths are injective and never.,..or.git. - One commit covers an epoch range, withCtx-*trailers. An unchanged tree makes no commit. - The ref moves only by compare-and-swap; a concurrent export getsMirrorRaced. - A tip ContextDB did not write isMirrorModified, and export changes nothing. A tip from another log isMirrorStale. A lostmirror.sqliteor a crash before the cache write is not mistaken for an edit: the tip is validated by re-rendering. -ctx mirror proposalslists hand edits as supersede proposals, withbase_revfrom the valid render, and applies nothing.--forcemoves the ref after a backup underrefs/contextdb-backup/.ctx mirror statusandctx mirror prune --older-than <days>dmanage the refs and backups. - ContextDB never pushes the mirror. It holds every live record's full body, andgit push --mirroror backup tools would send it. - P8 milestone 5b: embeddings (ADR 0016 §7; T89). - Optional embedder:<data>/embeddings.tomlconfigures an external command (JSON lines in and out), off by default. The command runs in its own process group with a deadline, a minimal environment and an empty private working directory. A wrong dimension, a non-finite value, a missing or repeated id, or output over 4 MiB fails the batch. - Vector projection:vectors.sqlitemaps(content, model)to a unitf32vector, with an in-memory cache bounded bymax_cache_mb. A background thread, separate from the writer and the text indexer, fills it and retries failed batches with back-off.ctx statusandctx_recallreportvectorsas Ready, Lagging, Rebuilding, Failed or Disabled.ctx reindex --vectorsprunes other models and fills in what is missing. - Vector ranker: the query is embedded once (cached for 10 minutes; a failure is held for 30 s, and the query waits at most 2 s), and visible heads are ranked by cosine through the same eligibility as keys and bm25, then fused by RRF. - Embedding candidates: new Decision, Plan and Fact heads are paired with their nearest neighbours on the branch in the same scope lane (cosine ≥min_cosine, default 0.82, at mostper_head). A pair found by both sources is one row, listed as "lexical and embedding similarity".candidates.sqlitegainssourceandcosinecolumns on open. - P8 milestone 5a: P7 follow-ups m4, m6, m7 (ADR 0016 §7.1, §7.3). - Fix (m7): one open Conflict per pair. Opening a pair that already has an open two-sided Conflict returns it (already_open: truein MCP,already openinctx conflicts open), whatever the reason or evidence. Concurrent opens give one Conflict. A one-sided Conflict on a side does not block the pair (T93). - Fix (m4): a pair review's commit expects both sides as heads, so a side that moves during the validator call supersedes the pair instead of reviewing an old revision. A pair no validator takes is postponed without a claim, so it never counts an attempt (T93). - Fix (m6): a validator process that leaves its group and keeps a pipe open no longer hangs a worker; the call fails after a 500 ms grace. Output over the cap fails at once as malformed instead of timing out. -
P8 milestone 4: Summary pending counts (ADR 0016 §6).
- A Summary item now carries
premises: {moved, total}: how many of its witness rule's Sem premises have moved since the nearest Verified vector. MCP addsnote: "summary; 2 of 7 premises changed"when any have moved. - The SessionStart briefing lists Summaries with changed premises.
- Re-recording identical text, or reverting a premise to validated content, reuses the existing revision. The validated verdict applies again, no validator job is queued, and no record is written (T90).
-
The identical-content
ctx_supersedereply is now specified:Committed, naming the head itself, with an empty delta. -
P8 milestone 3: read levels and packing (ADR 0016 §4–§5). Session log format 4.
ctx_recall{level?, budget_tokens?}renders items asheader,abstract,outlineorfull.- With a budget, items are packed greedily in rank order with a
bytes/4token estimate (estimate: "bytes/4 v1"). Each item gets the highest level that fits. - Packing stops when an item's header no longer fits. The rest are counted in
omittedand get no handle, certificate or ledger entry. - Labels and order are the same as without a budget (T55).
- Without
levelandbudget_tokens, responses keep the header-only shape.
- With a budget, items are packed greedily in rank order with a
ctx_read{level?}(defaultfull) returns a rendering recomputed from the payload; belowfullthere is nobody. Every rendered item says itsleveland whether it wascut.- Every expansion is a read event with its level. The ledger keeps the highest level read of a revision, and it survives a restart (T88).
-
Session log format 4. A full read is encoded as before; a read below
fullneeds format 4. A format-3 tail rolls to a new segment. Downgrading needs the session log removed. -
P8 milestone 2: ranking (ADR 0016 §3).
- Fix: a certified recall can no longer come back empty because uncertified matches filled the page. Recall used to cut to
limitfirst and sort uncertified items intowithheldafterwards. Eligibility (current head, scope, certification) is now decided inside each ranker before any cut. Withheld entries are capped atlimitand never take an item slot. A page holds fewer thanlimititems only when every ranker ran out (T54). - The text ranker pages through bm25 hits (the AND query, then the OR query) until it holds
limiteligible candidates. - Key and text candidates are fused with reciprocal rank fusion (k = 60). An exact key match is always first; ties break by key rank, then logical id (T85). A key match no longer always outranks a text hit.
ctx_recall{scope}accepts{lane?, kinds?, dir?}as well as a lane string.diris a path prefix that must cover one of the logical'sdirsentries, one of the revision's anchors, or (for an anchor) its own path.-
limitabove 100 is clamped and the response sayslimit_clamped: true. The old clamp was 1,000 (T95). -
P8 milestone 1: projection health (ADR 0016 §2, §4.1). Protocol 6.
- Every
ctx_recallresponse andctx statusnow report the index state:Ready{watermark},Lagging{watermark, head_epoch},Rebuilding{done, total},Failed{error}orDisabled(vectors, until an embedder exists). A lagging index can only miss newer records. It never returns a non-current revision (T86). ctx_recall{index_wait_ms}(default 200, at most 2000) waits for the index to catch up. The wait wakes on indexer progress.- New admin command
ctx reindex <dir> [--fts|--vectors|--all]rebuilds the projection in chunks. Results and labels are the same after a reindex and after deletingrecall.sqlite(T56). -
New pure read levels
abstractandoutline(contextdb-model::levels,LEVELS_VERSION = 1). They are stored in the recall projection, which is rebuilt when its levels version changes, and they equal a recomputation from the payload (T87). -
P8 G0 (ADR 0016 r0.3, SPEC v1.8.0): the design for retrieval, packing and the git mirror was accepted after three independent review rounds. No code changes yet.
-
Gate P7 passed (2026-11-03). G5: the busy/idle commit budget was restated by owner decision D4 (realistic premise-move rate, pooled p50 ≤ 1.10× and p99 ≤ 1.25×);
p7_benchmeasures it that way. Remote G4 rerun: 0 violations. G7: PASS. - P7 milestone 9, second part: independent implementation review (Gate P7 §3). No blocker.
- Fix: jobs no validator takes no longer block the queue. A claim looked only at the 256 oldest claimable rows, and rows outside every validator's
branches/kinds/scopesfilter stay queued. Once 256 of them existed, no job ran. Claims now page through every row. - Fix: a store error while judging a candidate pair no longer uses an attempt, as for rule jobs.
- Fix: a validator call ends with its claim's lease, so a second worker cannot claim the same job while the first call runs.
- Fix: an oversized task fails before it takes an LLM call permit.
- Fix:
ctx_handoff_acceptrefuses a session that has ended. -
Docs: G2 test map; README P7 section; T77 corrected (the 3 → 4 migration keeps frame checksums, so earlier certificates stay valid; SPEC v1.7.1).
-
P7 milestone 9 (verification), first part (ADR 0015 §11; Gate P7 §2).
- Fix: store failures no longer use a job's attempts. A full disk or a poisoned store used to fail the validator job. A poisoned daemon then burnt all attempts in a row and left the job
Failedacross the restart, so the rule stayed Pending untilctx validators retry --failed. Such a job is now requeued without using an attempt.ctx validators statuscounts these asstore_errors. - Fix: candidate generation per new head went from p99 204 ms to 9.7 ms at 10⁴ records:
- The recall index keeps an indexed row map, so replacing or counting a logical's rows no longer scans the FTS table. An older
recall.sqliteis dropped and rebuilt on first start. - The candidate sweep uses its indexes.
- The recall index keeps an indexed row map, so replacing or counting a logical's rows no longer scans the FTS table. An older
- Fix: discovery queues one pass in one transaction (10⁵ Pending rules: 20 s → 0.5 s).
- New G3 properties (PROP1 with artifacts,
metaandif_absent; PROP7 for metadata and notes through merges),ctxd-validate-stress, crash points at each job step (CTX_JOB_CRASH, debug builds only), disk-full tests,p7_benchand thep7_g6evaluation harness. -
The real
claude -psmoke check passed. -
P7 milestone 8:
ctx_changes(ADR 0015 §8). - New MCP tool
ctx_changes{since_epoch, scope?, branch?, max_items?, wait_ms?}and admin commandctx changes <dir> [--since E] [--branch B] [--scope S] [--max N] [--follow]. - It returns what changed status on a branch after
since_epoch, epoch by epoch: one item per revision in that epoch's status diff, with its new summary. It reads the durablediff_logprojection, so nothing is lost across restarts and nothing is held in memory. - Pages end on epoch boundaries. Pass
reachedas the nextsince_epoch, and continue whilemoreis true. An epoch with more rows than a page is returned whole. A scope filter drops items, never epochs. The concatenated pages equal the replay's per-epoch status diffs (T76). - With
wait_ms(at most 30 s) and nothing new, the call waits for the next published epoch and wakes on it. The waiting request holds no snapshot. At most 64 requests wait at once; more getBusy.ctx changes --followloops on it. Truncated{earliest}is returned only when the epochs aftersince_epochcannot be served: a reader ahead of the log (the history was cut), or a projection that does not cover the tail. The client re-reads withctx_checkand follows fromearliest.- Claude Code: the PreToolUse claim matches
ctx_changes. Runctx hooks install --harness claudeagain. - P7 milestone 7: handoff between sessions (ADR 0015 §7).
- New MCP tools
ctx_handoff_begin{summary, to_agent?}andctx_handoff_accept{id?}. - Begin issues the caller's session certificate as
ctx_checkwould and refuses unless it is Valid or ValidRecertified (an empty read set is refused too). It replies with the handoff id once theHandoffBeginevent is durable. The summary is at most 8 KiB. - Accept claims a handoff once, under one lock, and replies only after the
HandoffAcceptevent is durable. Another accept getsHandoffTaken, while the winner's retry gets its own claim back.to_agentmust match the acceptor's agent (HandoffNotAddressed), and the acceptor's session must be on the handoff's branch (BranchMismatch). Without an id, accept lists the open handoffs the caller may accept. - The accept copies the certificate's reads into the acceptor's ledger at their original revisions, skipping logicals it already reads. The acceptor's next
ctx_checkis then Invalid exactly when a handed-over read changed (T79). The reply carries the certificate's verdict now, the summary, and the copied and skipped counts. - If a handoff event cannot be made durable,
ctxdrefuses every handoff operation until it restarts. On restart the first durable accept decides, so two accepts never both succeed, even across a crash (T52, T83). - A handoff is not a lock and does not expire.
- Session log format 3: it adds the two handoff events. The first new event rolls a fresh segment, and a build that knows only format 2 refuses to open the log, so install all binaries together.
- Claude Code: the PreToolUse claim matches the two new tools. Run
ctx hooks install --harness claudeagain (orctx setup). - P7 milestone 6b: validators judge candidate pairs (ADR 0015 §5).
- A validator with
pairs = trueinvalidators.tomlalso judges contradiction candidates; it is off by default. Its filters match the pair's newer side, and workers take pairs only when no rule job waits. - A pair task shows both records and accepts only
conflictornone.claude -pgets its own pair prompt, with its ownprompt_sha256, under the same sandbox (T82). The command protocol receives{"task": "pair", "a", "b"}. conflictopens a non-gating PendingReview on the newer side,suggestion: Reject, naming both sides.nonecommits nothing. Neither opens a Conflict: an agent or the admin confirms a pair withctx_conflicts open.- Judging state lives in
candidates.sqlite: lease, attempts with backoff, label and validator. A pair whose side moved is skipped without a call, and the hourly LLM cap defers without counting an attempt. Oneclient_txn_idper pair means a review committed before a crash is not judged again. ctx_conflicts listmarks a judged pair (judged conflict by <validator> (review N)).ctx validators statusadds pair counters, andcheckalso runs a fixed pair probe forpairsvalidators.- P7 milestone 6: lexical contradiction candidates (ADR 0015 §5).
- The recall index now has one row per
(branch, logical):main's head, plus another branch's head where it differs frommain's. Each row names the revision it indexes. A session on a branch finds text only that branch's head has, and no longer gets hits frommaintext the branch has replaced. An olderrecall.sqliteis dropped and rebuilt on first start. - When an epoch moves a head of kind Decision, Plan or Fact,
ctxdtakes the head's rarest shared terms (at most 12) and runs a bm25-ranked OR query over the rows visible on that branch, in the same scope lane. It drops the head's own logical, its direct premises and dependents, other kinds, and rows that are not the branch's head, and keeps at most 5 pairs scoring at leastmin_score. This runs on the indexer thread, never the writer. - Pairs are stored in
<data>/candidates.sqlite, per branch and unordered pair. A pair is markedgoneonce a side is no longer the head on its branch. The first start backfills from every head; a restart does not query again. ctx_conflicts listshows candidate pairs not yet acted on, each with its id and score.open{from_candidate}(CLI--from-candidate ID) opens the gating pair from one, filling in the other side, and marks it opened. A candidate never gates by itself. Candidates never pair a revision invisible on the branch (T84).validators.tomlgains[candidates] min_score(default 1.0, an initial value calibrated in G6) andper_head(default 5, 0 turns new pairs off).ctx validators statusreports the candidate counters.- A stopped daemon now also stops its indexer thread.
- Validators judging candidate pairs came with milestone 6b.
- P7 milestone 5:
ctx_conflictsandctx_resolve(ADR 0015 §2, §6; SD20). ctx_conflicts openlets an agent (through its session) or the admin assert that two records cannot both hold. Both sides get an open Conflict sharing oneConflictDoc, and both read CONFLICTED until the pair is resolved or a side is superseded; the new head of a superseded side is not gated. Withfrom_review, the same commit resolves that review.openrefuses a pair of one revision, a side not visible on the branch, a pair already open, and an empty reason.ctx_conflicts listshows the branch's open Conflict pairs and validator reviews, with each review's suggestion, rationale and model. It marks a pairside supersededwhen one side is no longer the head, and a reviewstale curvecwhen the rule's premises moved on. Candidate pairs came with milestone 6.ctx_resolvecloses Conflicts and PendingReviews only, with a note stored as a blob.AnchorBrokenstays observer-only.- Everything acts on the caller's branch. Admin gets
ctx conflicts list|open|resolve <dir>. - Claude Code: the PreToolUse claim now matches the two new tools. Run
ctx hooks install --harness claudeagain (orctx setup) so their calls bind to the session. - P7 milestone 4: validator jobs (ADR 0015 §4.2–§4.4).
ctxdkeeps a durable job table,<data>/jobs.sqlite, with one row per(branch, rule, curvec). Claiming a row is one SQLite update, so of several workers exactly one gets it (T53).- Discovery follows the op_log: head moves of Sem premises, new and re-enabled rules, recorded validations, and a rescan on branch ops and at start-up. The same rule pending on two branches is two jobs (T84).
- Workers commit on the admin channel with one
client_txn_idper job generation:- after a crash, a job whose commit already happened is marked done without calling the validator again;
- a late result after its lease expired commits nothing more;
- a vector that moved during validation supersedes the job, and the new vector becomes a new job (T49).
- Trusted validators record a verdict (
if_absent). LLM validators only open a non-gating PendingReview, and a batch from the LLM principal that carries aRecordValidationis refused before it is sent (T50, 10,000-case property). An open review for the same key is not repeated, unless a manual retry asks for it. - No validator is configured by default, so nothing is called until
<data>/validators.tomllists one. It sets the limits (2 workers, 120 s lease, 3 attempts, 200 LLM calls per hour) and theclaudeorcommandvalidators, each with optional branch, kind and scope filters. - New admin command
ctx validators status|reload|check <dir>, andctx validators retry <dir> <job-key>|--failed.checkruns each validator once on a fixed probe task. - P7 milestone 3: validator adapters (new crate
contextdb-validate, ADR 0015 §4.1). - The
Validatortrait judges one task: a Sem rule's conclusion with each premise's asserted and current revision. - Every outcome passes the same checks. Evidence may only cite handles shown in the task. The rationale is capped at 2 KiB. Tasks over 256 KiB fail rather than being judged on truncated bodies.
- Adapters:
Mock, for tests;Command, an external program speaking JSON. It counts as an LLM unless configuredtrusted.ClaudeCli, which runsclaude -psandboxed: no tools, no MCP servers, no settings sources (so no hooks), an empty private working directory, a minimal environment, an optional isolated login directory, untrusted bodies inside nonce fences, and its own process group killed at the deadline. Only a one-turn reply holding exactly one outcome object is accepted (T82).
- P7 milestone 2: admin validation with metadata; protocol 5 (ADR 0015 §4.2, §4.3).
- An agent batch carrying a
RecordValidation(Commit,WhatIf, so MCPctx_commit, orRaw) is refused withChannelRestricted(T80). Before this, an agent'sctx_commitcould record any verdict, includingRejected. ctx validatetakes--label,--rationale,--evidence key@rev(repeatable) and--from-review ID. The daemon stores aValidationMetablob (kind Admin) and names it in the record.--from-reviewconverts an open PendingReview and resolves it in the same batch.- IPC protocol 5: install all four binaries together.
- P7 milestone 1: op_log format 4 (ADR 0015 §3, §9; SPEC v1.7.0).
RecordValidationgainsmeta, a metadata blob hash the kernel stores but never reads, andif_absent. A worker's record fails withValidationExistsinstead of replacing an existing verdict (T81).ResolveArtifactgainsnote, andMissingBlobcovers both new blob fields.- Merge leaves
metaout of its classification. - Ops that don't use the new fields keep their old encoding, so format-3 batches, batch hashes and digests are byte-identical under format 4.
- Upgrade: stop
ctxdand runctx migrateonce (3 → 4, keepslog.v3.bak). It changes no result (T77), but certificates issued before it readInvalid(LogMismatch), so restart agent sessions. - EventLog v2 carries the new encodings.
- Hooks act on three P4 audit follow-ups (ADR 0010 r3.5, SPEC v1.6.14).
- A stale-read warning is shown once per set of stale reads. A shell command no longer repeats an identical warning; file edits, denies and a new commit show it again. Every decision is still logged. One Codex session had seen the same Invalid warning 61 times.
- The Stop drift notice names only paths new since that agent's last report, and
ctx gate-reportcounts drift paths once per session. - Claude Code's version is recorded: hooks do not get
CLAUDE_CODE_EXECPATH, so the hook reads it from the session transcript. - No protocol or log format change. A hook state file written by 0.2.0 still reads.
- The kernel no longer keeps a per-rule history of premises before a rebind (
ChangeLog.rebindings). A rule's premises never change: Rebind disables the rule and adds a new one (SD9), so the history always equalled the current rows. Historical observation closures read the rule directly; one mutation waiver goes with it. - Nightly mutation testing runs again. It had failed every night since P6.
- Kernel mutants now run against the anchor and P6 suites as well, so code covered only there is no longer reported missed.
- Shards rotate through 48 (kernel) and 32 (P4) slices with 2 jobs each, so a shard fits its time limit; timeouts (exit 3) count as caught.
- Missed mutants are checked against
scripts/mutation-waivers.txtbyscripts/mutation_missed.py; each waiver states why the mutant is equivalent. - A full run (927 kernel mutants, 759 P4) left 15 kernel survivors: 11 are argued equivalent and waived, and 4 in
ChangeLog::retained_bytesare now killed by a rebind workload inmemory_accounting. A new anchors test covers a rebind with no head move.
0.2.0 — 2026-11-02¶
P4, P5a, P5b and P6 pass their gates; OpenCode is a third harness.
Upgrade notes. IPC protocol 4 and op_log format 3 (P6).
- Stop ctxd and run ctx migrate <dir> once. It keeps the old log as log.v2.bak.
- Clients from 0.1.x cannot talk to a 0.2.0 daemon. Install all four binaries together (scripts/install.sh or the release archive).
- Then restart agent sessions. A session that spans the upgrade is reported Invalid(LogMismatch).
- Symbol anchors made before walk 4 need ctx anchors migrate.
- Spurious
PENDING(ObservationLag)on a loaded machine (ADR 0011 r0.7, SPEC v1.6.13). The daemon's live anchor sample had a 40 ms deadline. Past it there is no evidence, which reads as lag, even with nothing changed. It is now 200 ms, inside the 500 ms hook budget.ctxd'sOptionsgainsanchor_live_timeout, and the CLI anchor tests use 2 s like the daemon tests. This was the macOS CI failure insymbols_cli. - CI: per-push checks run the symbol PROP12 suites at 1,000 seeds (10,000 stay in the gate run) and allow 45 minutes. Every push since P6 had hit the 30-minute limit, so no run had reported since.
- P4, P5a, P5b and P6 gates passed (2026-11-02; SPEC v1.6.12).
- The P4 G6 dogfood closed by owner decision at 11.8 days instead of ≥ 2 weeks: real use had stopped on 10-24 (audit, report).
- Dependency coverage 69.6 % passes. False-deny is 30.6 % with shell commands enforced, and 0.11 % with
mode = "enforce",shell_mode = "warn"; that is the recommended stricter setting, and the default stayswarn. - All 1,783 warns and 126 sampled allows were labelled by disclosed rules (
label.py), checked blind against two independent reviewers (95.2 % agreement on a fresh sample). - The audit's follow-ups: agents stopped reading certified context after a few days, Invalid warnings repeat on every action, drift re-reports the whole dirty tree, and Claude Code's version is not recorded.
- The suggested report path is now
docs/gates/p4-g6-dogfood-report.md:p4-dogfood.mdcollided withP4-dogfood.mdon case-insensitive file systems. - OpenCode 2.0 as a third harness (ADR 0014).
ctx setup --harness opencode(orall) registers the MCP server inopencode.jsonand installs a plugin in.opencode/plugins/contextdb/.- The plugin sends every event to
ctx-hook opencode <event>. The same certificate check warns or deniesedit,write,patchandshell; the briefing and per-turn context reach the system prompt; edits are recorded and drift is reported. - MCP calls bind by OpenCode's
_meta["ai.opencode/sessionID"]. - Verified on OpenCode 2.0.32: the model reads the briefing, and
ctxdholds the session's stream. A gated edit was tested with a fake OpenCode context and throughctx-hook, not yet live. ctx uifollows P5a–P6 and v1.6.11:- It replays the op_log with the multi-branch kernel. Before, any log with a branch op failed with
replay diverged. - A branch selector shows one branch at a time, the timeline names each commit's branch, and open Conflict artifacts are listed on their target.
refedges are drawn and listed, including reference-only rules ("references only, never supports").- Code anchors show their path or
path#symbol, and the panel decodes the committed descriptor (path, symbol, language, normaliser). - WHY and WHY-NOT are trees instead of Rust debug output.
- Replayed status uses the last committed watermark per anchor scope, and the panel adds the live status from
ctxdwhen it differs (for examplePENDING(ObservationLag)). Bodies of branch-only revisions are read through a viewer session on that branch. - Dependency usability (SPEC v1.6.11), from agents writing to a second repository's store: of 18
ctx_recordcalls in one session 9 were refused, and the agent ended by dropping its deps. - A record may carry only
refdeps. The kernel accepts a reference-only rule and never counts it as support (SD3/SD6, T09w), so the record still needsadopt_as_base;ctx_impactlists it.ctx_recordwarns when every dep isrefandadopt_as_baseis false. refmay name a Summary (A2);cur/pinon a Summary are still refused.- Refused deps say which dep and what to send: a Summary named with
cur/pinasks forsemorref, and a bare key gives its currentkey@rev. Thectx_recordtool description documents the four dep kinds. ctx_supersede carry_rules=copykeeps references. Writes whose deps are allrefcount as writes without deps in the P4 telemetry.- An op_log with a reference-only rule cannot be opened by an earlier binary.
-
Hooks: the default check budget is 500 ms (was 150 ms; a busy daemon took up to ~340 ms on a real repository). A timed-out check says
ctxd did not answer within N msinstead ofIo(Os { code: 35, kind: WouldBlock … }). The "no certified reads" warning is shown once per session and agent instead of every 10 minutes. -
P5b normaliser walk 4 (ADR 0012 r0.9, SPEC v1.6.10), from the independent implementation review. Fixed:
- Text no child node covers is now hashed. Before,
"hello\n"and"bye\n"hashed alike in Python, as did f-string text and format specifiers, Rust raw strings andmacro_rules!separators. - A same-file helper, constant or import that does not parse marks the symbols that use it as erroneous instead of giving them a new revision.
- Python statements in module-level
if/tryblocks are separate context items. - Go
forclauses keep their semicolons, and groupedvar ( … )declarations are symbols. - Deep
usetrees no longer overflow the observer's stack. - Smaller gaps: JS array holes, multi-declarator
export/constkeywords,export declare, dotted namespaces,this.#pandr#names in context, Go/vNimports,import a.b.
Symbol anchors need ctx anchors migrate: 886 of the 6,820 reference symbols re-hash. Formatter equivalence (T45) is unchanged. G6 was rescored on the same labels: FI 17.5 %, missed +0.0 pp under the owner convention; 70.0 % under the pre-registered reading.
- P5b: a symbol anchor that is Missing or Broken during ctx anchors migrate no longer leaves later scans refused, and no longer leaves the scope lagging for good. The version check and the CTXPOS02 header now count live anchors only.
- P5b gate: G1, G7, G8 and the independent review are done. G3 mutation was rerun with robustness; every non-equivalent mutant is caught. The phase gate waits on P5a and P4.
- P6: branches, transactions and WHAT_IF (ADR 0013, SPEC v1.6.8). Context forks and merges like the code it describes: explicit branches (
ctx branch,ctx_branch; a session binds to the branch named like its git branch), three-way merge withConflictartifacts that gate their target (CONFLICTED, SD17;ctx merge,ctx_merge,require_certifiedby default), atomic multi-op commits with actor-side certificate validation (ctx_commitwithexpect_cert_valid, closing write skew, T19), and dry runs of any batch including merges (ctx_what_if). Upgrade: protocol 4 and op_log format 3; stopctxd, runctx migrate <dir>(keepslog.v2.bak, resumable, lists epochs whose recorded result changes under the Conflict gate) and upgrade every binary together. - P6 independent implementation review (ADR 0013 r0.7, SPEC v1.6.9), 8 majors fixed with regression tests: a default
require_certifiedmerge now refuses Conflicts off the head; lateInvalidReadSetin a merge batch no longer double-maps ids (an actor panic); branch digests include the branch entry and received sync points; a strict check on a branch issues from the branch;ctx_commitidempotency binds branch, channel and principal and survives a re-issued certificate; group commits write each epoch's projection rows as of that epoch (also pre-P6 for posts and base history);ctx migratereports changed epochs after an interruption; format-3 projections live inprojections.v3.sqliteso a rollback works.ctx_branch/ctx_mergeacceptclient_txn_id. -
P6 gate runs: G1 caught the branch oracle depending on blake3 (now injected by the caller). G3 adds PROP7 for branch Ops, PROP11, PROP8 and PROP10 per branch and closes the kernel/shared mutation survivors (ValidationRecord merge conflicts were untested). G4's branch stress found two merge defects, both fixed without semantic change (ADR r0.6): the merge-base search was cubic in the number of sync points (60 ms per merge after 2,000 merges, now ~1 ms), and every sync point kept a whole branch database (488 MB after 1,500 merges, now 2 MB), so states that can never be a base are dropped. G2 closes with a service test of T19 where only the watermark moves in the window.
-
ctx setupnow runsctxdthrough the per-repository login service (launchd / systemd --user) by default, so it starts at login and restarts after a crash. A runningctxdis never stopped; without a usable service manager setup starts it detached and says so;--no-servicekeeps the old behaviour.
0.1.3 and earlier¶
- 0.1.3: crate versions follow the release tag. Includes P5b walk 3 (same-file context and the trailing-comma fix). Symbol anchors made with an earlier walk need
ctx anchors migrate. File anchors and the protocol (3) are unchanged. - P5b G6 passes (walk 3 retest, report) under the owner's convention that a pure move invalidates (SPEC v1.6.7, ADR 0012 r0.8, decided after the labels and disclosed): symbol FI 18.7 % ≤ ½ × file level 79.7 %, missed +0.0 pp; under the pre-registered reading FI is 70.4 % (fail).
symbol_replay score --moves-invalidate. - P5b normaliser walk 3 (ADR 0012 r0.7, SPEC v1.6.6): a symbol's revision also covers the same-file items it names (other symbols, imports by source path, Python module-level assignments), so a changed helper, constant or import re-revisions it; span hashes (T45) are unchanged. Symbol anchors need
ctx anchors migrate. The first G6 failed (symbol FI 34.2 %, missed +13.1 pp, report); the owner set FI ≤ ½ × file level, and a retest on disjoint symbols is fixed before labelling. - P5b G2 closure: reject a symbol registration whose key belongs to a legacy
#file anchor, preserving its descriptor kind, head and watermark; add the missing legacy-path/collision golden and distinguish layer passes from the P4/P5a-dependent phase gate. - P5b G5 (report): new
symbol_bench. With 10/100/1,000 symbol anchors the P4 hook stays within budget (p95 ≤ 29 ms, p99 ≤ 37 ms at 1,000) andctxd/ctx-hooklink no grammar; a whole scan costs ≈ 0.38 s per MiB of host bytes, so the 5 s deadline binds at ≈ 13 MiB (ADR 0012 r0.5 corrects the parse-only estimate). - P5b G4 (report): deep nesting no longer overflows the observer's stack (containers nested past 256 levels hold no symbols), extraction and the walk honour the scan deadline and stay linear (a 16 MiB file 11.0 → 7.1 s), identical host contents are parsed once, and
MISSINGnames are no longer symbols (ctx anchors symbolsfailed on them). No hash changes. New robustness, crash-mid-scan and parse-budget tests and asymbols_parsefuzz target (1 h, 0 crashes); mutation 250 caught, 28 compile-invalid, 0 missed. - P5b G3: an independently normalised Git-history oracle adds 10,000 fixed seeds / 200,000 mixed file-symbol transactions. Normaliser/extraction mutation closes with 230 caught and 13 compile-invalid variants, no survivors; boundary goldens, bounded nontermination checks and a parallel temporary-directory fix accompany the evidence report.
- P5b G3: model-driven PROP12 for symbol anchors (
prop12_symbols_model, 10,000 seeds, 100,000 transactions, generator-model and SPEC-form Git oracles, all ADR 0012 §9 floors met). It found thatCTXPOS02listed normaliser versions inLanguageorder instead of sorted (ADR 0012 §6); fixed, so multi-language scopes lag once after upgrading. The symbol scan is split intotargetsand the pureprepare_scan. - P5b normaliser walk revision 2 (ADR 0012 r0.4): formatter-equivalent forms found by the T45 corpus (rustfmt arm/closure blocks and diverging-tail semicolons; black tuple, target, import and type parentheses; prettier quotes, object keys, leading union bars and arrow parentheses) now hash alike. Existing symbol anchors need
ctx anchors migrate; about a third of symbols re-hash, so their dependents go STALE/PENDING once. New bench toolssymbol_corpus(T45) andsymbol_hashes(normaliser walk check); T45b and T42e tests. ctx uirefuses a directory that is not a data dir (suggesting<dir>/db), and without--portmoves on from a busy 7787 to the next free port up to 7796.-
SPEC v1.6.4 / ADR 0011 r0.6: agent execution across labelling, independent review, dogfood maintenance and gate reporting; no mandatory human audit, owner top-ups or agreement threshold. G6
score --assistedaccepts provenance-bearing agent evidence while retaining historical human/contested diagnostics and real replay/stratum requirements. Runtime channels, CAS, oracle tests and actual dogfood duration remain in force. -
Adopt SPEC v1.4 as the implementation starting point; keep prior research and reviews.
- Establish the Rust 1.95.0 workspace with 13 product/verification crate boundaries and an isolated R2 baseline workspace.
- Add the bootstrap
ctx --help/--versioncommands; database commands remain unimplemented. - Add Linux/macOS CI, license checks, dependency policy checks, and negative tests for the architecture gate.
- Implement P0 model contracts, immutable inputs, complete Op/error types, canonical wire and versioned EventLog v0.
- Implement independent InputModel staging/validation and Jacobi/Kahn full recomputation, three-layer certification, summaries and explanations.
- Implement core SoA/CSR arenas, indexes, independent canonicalization/CAS/cycle validation, rollback, NetDelta and both diff sets, with oracle-backed queries.
- Add 26 golden groups, three wire tests, policy hash golden, compile-fail API checks and 1,000 ChaCha8 seeds / 12,000 transaction comparisons.
- Record SPEC v1.4.1 executable details in ADR 0003, semantics traceability and P0 verification/review evidence. Local checks, independent review and remote Linux/macOS CI passed; P0 Gate is complete.
- Implement the P1 incremental counting kernel (Counting/FullRecompute, Pearce–Kelly, WHY/WHY_NOT, IMPACT, DIFF, shapes, bench).
- Compact P1 storage without semantic change: dense u32 PK, deduplicated indexes, CSR rule/logical arenas, post-state-only history. Live heap is 181–189 B/incidence (previous lower bound 292–314).
- Calibrate the P1 memory budget per scope (ADR 0005, SPEC v1.4.2). The bench measures live heap with a counting allocator and exits non-zero on failure. An allocator-checked accounting test is added. The mutation audit is extended to arena/memory with 0 survivors.
- Fix the nightly mutation job (missing
results/directory). Propose the P2 durable op_log ADR 0006. - Accept ADR 0006 and SPEC v1.4.3. Implement
contextdb-store: - own segmented op_log with a blake3 hash chain and durable decoding limits;
- ordered commit (idempotency, blobs, append + sync, publish) with fail-stop poisoning and a directory lock;
- blobs, snapshots, replay and a sampled oracle self-check at open;
- SQLite projections with a watermark;
- Historical / Snapshot / DIFF read modes;
- format-0 migration and doctor truncation;
- a SimDisk crash-injection harness.
- Make structural commits incremental (ADR 0007): staging overlay, appendable CSR adjacency, open-addressing key table, Pearce–Kelly undo journal, incremental A5 and status walker. Cold replay of 100K structural transactions goes from O(N²) to about 1 s.
- Add
ctx replay | doctor | snapshot | migrate | export. - Add G4 crash injection at the blob-put and projection-write steps.
- Add mutation tests for the key table, adjacency and staging overlay; bound key-table probes.
- Shard the nightly mutation audit and add the P2 durability job.
- Fix the findings of the independent P2 review:
- Blocker: a corrupt header on the final segment no longer deletes acked frames.
- Doctor: truncation plans list every dropped frame.
- Migration: an interrupted migration is refused at open and resumed by
migrate. - Locking: offline tools take the store lock.
- Poisoning: poisoned stores serve nothing, and poison is keyed per store directory.
- Reads: frames are read by range.
- Tail handling: semantic tail faults fail closed.
- Snapshots: an unbuildable snapshot is ignored.
ctx: never creates a store.- G4: a real post-sync-pre-publish hook; small-segment runs exercise rollover.
- Bench: gates the file-projection configuration; projection roll-forward is batched.
- Close the P2 closure-check findings:
- projection writes use cached statements, and bulk roll-forward writes the watermark once (first open with file projections 0.55–0.61 s, previously up to 6.1 s);
- roll-forward commits after the self-check;
- catch-up is bulked and rolls back on failure;
- open locks before creating
log/; migrateresumes from the newest backup and syncs before the swap;get_blobis gated on poison.- Close the P2 gate: independent review and two closure checks, CI run 39497969575 and nightly run 39498455621 on
21da1f7. - Accept P3 G0: ADR 0008 (daemon, group commit, session log, certificates, MCP) after four review rounds; SPEC v1.5.0–v1.5.3.
- P3 milestone 1 (core):
- Counter-based L1/L2 columns. Per-incidence literal bits, per-rule counters and per-node truth, witness and reason replace the query-time memo. They are maintained by the rank-ordered status walker (SPEC §3.4 Phase 3b), and FullRecompute rebuilds them independently.
DbisSend + Sync. - Certificates.
issue_certificateandvalidate_certificatecover the L2-witness closure,since_epochstrict windows from a per-epoch change log, log linkage and recertification. The oracle gains an independent issuance and validation; PROP11 runs 10,000 seeds. - Tests. P3 engine goldens T06d-sem, T16, T16b-cert, T21, T62-P3 and T65. New PROP2b coverage gates.
- Memory. ADR 0009 (owner decision) moves the L1/L2 state from the query-cache scope to the hot scope: hot ≤ 90, query cache ≤ 32 B/inc. The total is unchanged.
- P3 milestone 2 (store):
- op_log format 2: group framing
{seq, idx, count}, with migrations from formats 0 and 1. - Recovery: one tail algorithm, shared by op_log and the session log. Only the last group is truncatable, and semantic faults fail closed.
Store::commit_group: one sync per group, replies held until it, idempotency across ids staged in the group.- Session log (
sessions/). LogReaderfor reader threads.watermark_historyprojection.- Doctor: cuts at group boundaries.
- P3 milestone 3 (daemon,
contextdb-daemon): - IPC protocol (
proto.rs): length-prefixed, versioned Wire frames withDecodeLimits::IPC. A version mismatch getsProtocolVersion, and the rest of the rejected frame is drained so Linux does not reset the client. - Startup (
ctxd): filesystem refusal list (--allow-fs), store lock (T37), flock probe, lease file, three Unix sockets (agent/observer/admin, 0600, peer-uid check) whose path fixes the channel. - Commit actor: natural group commit (queue of 1,024,
Busywhen full), two-replica publication through arc-swap with replica reclaim, a counted clone fallback, and a 30 s requestTimeoutresolvable throughTxnStatus. - Service: sessions with a durable session log, handles bound to synced certificates,
ctx_check(validate first, re-issue only uncovered reads),carry_rules=copy, admin-onlyctx validate, ledger supersession diffs, FTS5 recall with a background indexer. - P3 milestone 4:
ctx-mcp, hand-rolled JSON-RPC 2.0 over stdio with nine agent tools, and a G6 scenario of three simulated agents.ctx status | why | why-not | impact | diff | validate | shutdowngo through the admin socket. - P3 milestone 5 (verification):
ctxd-stressG4 tool (coupled heads, CAS chains, replay check).- cargo-fuzz targets for the IPC decoder and MCP JSON.
- loom model of the publication and reclaim handshake (
publish.rs,cfg(loom)). mcp_benchG5 matrix.- Nightly P3 stress and fuzz jobs.
scripts/remote.shruns mutation, stress, fuzz and the Linux check leg on a 48-core host.- G5 write path (ADR 0008 §17):
- write requests release their snapshot before waiting;
- the actor replays the previous group onto the reclaimed replica;
- the session-log writer syncs only for durable events or flushes (otherwise within 100 ms);
- payloads go to append-only, self-verifying blob packs staged with
F_BARRIERFSYNC, so the group's op_logF_FULLFSYNCmakes them durable.
With 8 clients and fullfsync on, write p50 went from 98 to 12 ms and throughput from 81 to 597 tx/s. With 128 clients it went from 95 to 4,521 tx/s, and to 6,533 tx/s with fullfsync off.
- P3 review fixes (ADR 0008 §18):
- Open fully syncs pack segments, the op_log tail and the session-log tail and directory.
- A cut session log is persisted as LogBroken, and ctxd refuses to serve if that marker cannot be made durable.
- Oversized session drains are split into groups; recall results are capped.
- The session writer is flushed and joined before the store lock is released.
- Gate P3 passed (2026-10-21):
- G4 stress on e1ac9b1: 1/8/32/128 clients × 10 min, 0 mixed epochs, chain breaks or replay mismatches.
- Fuzz: IPC and MCP targets, 1 h each, 0 crashes.
- G5 under the owner's per-client write budgets.
- See docs/gates/P3.md.
- P4 G0: ADR 0010 (hooks, outbox, action gating) accepted after four independent review rounds; SPEC v1.6.0 records amendments A1–A11. contextdb-proto split out of the daemon (protocol, lease, client, gate predicate, outbox).
- P4 implementation (ADR 0010):
- Protocol v2: session binding by harness session key or tool-call claim, per-agent ledger views, gated Check (strict, action, mode), Updates peek/ack, Facts with stream marks and gap/skip, advisory Briefing, admin Telemetry.
- ctx-hook for Claude Code 2.1.306 and Codex 0.163.0: briefing, context_update, PreToolUse warn/deny (≤ 480 B reasons), MCP call claims, PostToolUse write sets, drift on Stop, fail-open/closed.
- Outbox: self-verifying records, per-stream seqs recovered after kills, at-least-once delivery with idempotent application; ctxd sweeps leftovers.
- ctx check | policy | gating | hooks | gate-report P4 | dogfood review.
- ctx-mcp binds each call from _meta; ctx_check takes an action and peeks context_update.
- P4 verification so far: T38–T41b, T66, G6 scenario; G3 properties at 10,000 seeds (two outbox seq bugs found and fixed); G4 kill points, daemon crash windows, outbox stress; G5 PreToolUse p95 ≤ 10.8 ms (budget 50 ms) after caching the repository root and skipping the session-log sync on steady checks.
- P5a G0: ADR 0011 (file anchors, observation freshness) accepted after independent review; SPEC v1.6.1.
- P5a implementation (ADR 0011):
- contextdb-anchors: raw-worktree Git blob OIDs (SHA-1 with collision detection, SHA-256) in canonical BLAKE3-addressed descriptors; two-sample bounded capture with O_NOFOLLOW openat walks; pure classifier; observer with watermark CAS retry.
- Daemon: trusted repo routing, live evidence for certified read/recall/check, observation support closure (Sem asserted and head), durable per-root proofs, path-filtered checks with conservative alias fallback, admin range check.
- Protocol 3 and session log format 2 (forced rollover from format 1).
- ctx anchors add|scan|watch|status|hooks, ctx check --strict --range, pre-push gate.
- P5a verification: PROP12 rebuilt against Git history at 10,000 seeds; G4 interruption/crash, corrupt descriptor and race tests; live capture made parallel with cached gitlinks and repository handles (1,000 anchors: 0 → ~92% certified reads within 40 ms); anchor_replay for the G6 human-labelled replay (3 repos × 1,000 commits prepared); independent review fixes (nested-repo path filter, socket/.git probe errors, case-alias registration, watermark-first CAS, non-failing Git hooks). Gate open: G5 quiet rerun, G6 labels, outbox growth (M2), P4 dogfood.
- P5a ADR 0011 r0.4 (review M2): an O(1) announce record replaces the per-stream outbox hint cutoff (G0 review and closure check); ctx anchors repair-announce; hooks install marks announcing appenders; dropped facts no longer gate freshness. Path filtering reuses the cached repository handle; semantic anchor tests use a configurable sample deadline.
- Usability: scripts/install.sh (ctx, ctxd, ctx-mcp, ctx-hook into one bin dir); ctx setup (data dir + git exclude, ctxd start with a protocol check, project MCP config for Claude Code and Codex, hooks); ctx service install|uninstall|status (launchd / systemd --user, restarts only after failures). README quick start rewritten around them.
- Releases and one-line install: install.sh (platform detection, download via public URL or authenticated gh, SHA-256 check against checksums.txt, --version/--dir/--setup/--uninstall, bash 3.2 compatible); .github/workflows/release.yml (v* tags: macOS arm64/x86_64, Linux x86_64/arm64 archives, checksums, gh-only); scripts/package-release.sh and scripts/release.sh (local fallback while hosted Actions are blocked); ctx service restart.
- ctx ui <dir> [--port N]: the read-only context graph viewer (formerly the separate tools/ctx-ui workspace) is built into ctx, so it ships with releases and always matches ctxd's protocol.
- ctx setup keeps machine-specific files out of Git: Claude project hooks go to .claude/settings.local.json (entries in .claude/settings.json are moved out), generated files are added to .git/info/exclude, tracked ones get a warning; hook install replaces ContextDB entries from any install path. This repository commits .contextdb/gating.toml and ignores the rest of .contextdb/.
- 0.1.2: crate versions follow the release tag (ctx --version prints 0.1.2).