Skip to content

Latest commit

 

History

History
858 lines (766 loc) · 68.3 KB

architecture.md

File metadata and controls

858 lines (766 loc) · 68.3 KB

Architecture

This page describes the contracts Qompack actually ships, with a citation for each. It is not a design document: where plans/00-ARCHITECTURE.md or Qompack.md describes something the code does not do, the code wins and the difference is stated here.

Sources are cited inline as file paths. Qompack.md is the design document (v1.5, 2026-09-06); plans/00-ARCHITECTURE.md is the architecture plan; plans/V5-report.md is the most recent verification record. ADRs are indexed in docs/adr/README.md.

1. Process model

Qompack is one binary, cmd/qompack, invoked in three roles.

Hook processes. plugin/hooks/hooks.json registers seven hooks, each of which runs the binary as a short-lived subcommand:

Hook Subcommand Timeout in the manifest
SessionStart qompack session-start 15 s
PostToolUse (matcher *) qompack observe tool 5 s
UserPromptSubmit qompack observe prompt 5 s
Stop qompack observe stop 5 s
SubagentStop qompack observe stop --subagent 10 s
PreCompact qompack checkpoint 20 s
SessionEnd qompack flush 20 s

The host does not apply that last timeout: Claude Code gives the SessionEnd hooks of every plugin one shared 1.5 s budget, and a timeout set on a plugin-provided hook does not raise it. So qompack flush does not wait for the session's end (C1.15). It waits at most half a second for the daemon's acknowledgement, which comes as soon as the flush is durable — its line in the session's write-ahead log and leased, as an observed event's acknowledgement promises — with the session recorded as needing recovery. The daemon then ends the session on its own: after every earlier delivery of the session, it runs the observer's end of session, writes the terminal-hook marker, saves the sketches, drains, and clears the recovery record once a drain has replayed everything it found; when its own drain met only bytes a later pass replays, such as another hook's line still being written, it asks for that pass, and the first complete one clears the record. A drain that lost a line leaves the record in place. A daemon that stops first leaves the flush in its log for the next drain to replay, and a flush a drain replays while the daemon serves is ended the same way, on its own rather than inside the drain.

Every entry is exec form: command is exactly the bundled executable — ${CLAUDE_PLUGIN_ROOT}/bin/qompack, or bin/qompack.exe in a windows bundle — and args is the subcommand, so the host spawns the binary directly on every platform and no shell ever parses the string (C1.11: the former shell-form string was a PowerShell parse error on Windows machines without Git Bash). The manifest is therefore rendered per target; the committed plugin/ tree is the linux/darwin rendering. All four bundle files are generated from one typed value (internal/pluginmanifest/manifest.go: "Generating all four from one Go value is what makes it impossible for them to drift apart"), and devtool plugin-validate diffs the generated bytes against the committed tree in CI. That package's own comment records that the exact key names are "partly undocumented host contract and are expected to change (G9.3)".

internal/cli is the dispatch layer and a composition root. Its package comment states the rule that governs every hook process: "a hook subcommand exits 0 no matter what happens inside it" — unreadable stdin, malformed JSON, an unresolvable project root, a read-only store or a panic in the handler are all logged and swallowed, and the host still receives valid JSON on stdout, except from the PreCompact hook, which prints nothing. A sidecar "must never be the reason a session gets worse".

The MCP server. plugin/.mcp.json registers one server, qompack, as the binary with the single argument mcp. Per internal/mcp's package comment, the transport "is stdio and only stdio": newline-delimited JSON-RPC 2.0 over the reader and writer its caller hands Serve, with no listener, no port and no socket.

The daemon. internal/daemon is "the resident per-project process … the thing that holds the store, the sketches and the scheduler in memory so a hook does not have to". Its stated reason for existing is a budget: a hook has a p99 budget (B-A, runtime.hotPath.budgetMs: by default 15 ms on Linux, 50 ms on Windows, 40 ms on macOS) and cannot open a store, load sketches and reconstruct scheduler state on every tool call, so "the daemon pays those costs once and the hook pays only a connect-write-ack". The per-platform figures are B-B's durable ingest budget carried into B-A, which contains it: the ACK is written only after the delivery is fsynced (internal/config/deadlines.go, HotPathBudgetMsFor).

The daemon's lifetime. One daemon serves a project, whichever sessions come and go: the singleton lock .qompack/run/daemon.lock decides which process that is, and a second one started for the same project exits 0 without touching it (internal/daemon/lock.go). It is started by qompack session-start (daemon.EnsureRunningUntil) or, lazily, by any hook that finds nothing listening (internal/ipc/client.go, lazySpawn, serialized by run/spawn.lock), and it outlives the session that started it by design. It exits by itself once no session has been live for runtime.daemon.idleExitSeconds (default 1800): a session stops being live at its SessionEnd, or after that same window of silence when the SessionEnd never arrived (idleExitDue, SessionRegistry.EndAbandoned).

A process that outlives the session must not hold the plugin's own files. On Windows a running executable cannot be deleted and neither can its directory, so a daemon started from the plugin's bin/qompack.exe kept the plugin directory from being removed — the V6 close-out's live session 2 found a --plugin-dir extraction the host could only half delete (C1.17), and a plugin update or uninstall removes the old version's directory the same way. There, a process running the plugin's own binary starts the daemon from a copy instead: <home>/.qompack/bin/<sha256>/qompack.exe, named by the binary's own SHA-256, made once per version and verified on every spawn — a regular file, not a link or reparse point, whose bytes hash to its name and to the spawning process's own executable, and still the file filed there once hashed — and replaced rather than run when it does not verify; one another program holds open without sharing read is not run either, nor removed, and that spawn falls back to the plugin binary (internal/daemon/spawn_stage.go). The plugin's binary is recognised either inside CLAUDE_PLUGIN_ROOT, which the host sets for every plugin hook, or by the plugin's layout — bin/qompack.exe with .claude-plugin/plugin.json beside bin/ — because the daemon is also started lazily by qompack mcp, which the host launches from .mcp.json and which is not guaranteed that variable. When a spawn makes a new copy, every other staged copy that no daemon is running is pruned: another build's copy goes even when both report the same version string, because copies are keyed by SHA-256, not by version. On Linux and macOS the kernel lets a running executable and its directory be unlinked or replaced, so the daemon runs from the plugin binary and nothing is copied; a binary run from outside any plugin directory (a build tree, a test's temporary directory) pins nothing a host removes and is not copied either. A daemon started from a copy runs in the copy's own directory, never the directory the spawning hook ran in; one started from the hook's own binary inherits the hook's working directory. Neither is the project root, which can be longer than a Windows process's working directory may be (MAX_PATH). If the copy cannot be made the daemon is started from the plugin binary after all, session-start logs why, and the daemon itself reports it Loud when it starts. A daemon started before a plugin update keeps running its own version until its idle exit; the next spawn runs the new one.

Starting the daemon. Everything that starts one — session-start, a hook's lazy spawn, the qompack mcp server's — follows one rule over .qompack/run/spawn.lock (ipc.ClaimSpawn, V6 close-out decision D17): it spawns only when it creates the lock, and a lock younger than 10 s means another spawn is on its way, which session-start waits for and a hook or the MCP server leaves to arrive, instead of starting a second daemon. An older lock is presumed left by a spawner that died and is reclaimed, so no lock holds spawning off for longer than that; a lock that is empty or unparseable (another spawner may be writing it), or stamped later than now, is judged by the file's own age. A spawn that fails to start releases its claim, and the daemon deletes the lock once it listens, so a free lock can also mean the daemon is already up: session-start dials before each claim, and once more after it and before it spawns, and gives the claim back when a daemon answers. Whatever holds the singleton lock also deletes the spawn lock as it releases the singleton lock (D27), so the claim of a spawned daemon that lost the singleton lock and exited without listening does not keep a spawn after the running daemon's exit waiting. A claim whose spawner died holds spawning off until it is 10 s old; a session-start whose wait ends first spools its start, and the first spawner after that reclaims the lock. Two processes that reclaim the same stale lock at the same instant can still both spawn; the singleton lock then turns the second away.

A daemon takes dials from the moment it listens, before its startup is done. That startup replays what hooks spooled while no daemon answered, then sweeps the checkpoint store and audits publication gaps, and every request that arrives meanwhile waits until it is done (serveOp), so a spooled event is always handled before a live one. The caller's own deadline bounds the wait: a hook that runs out spools, as it would against any slow daemon. Before D17 the daemon accepted nothing until its startup was done, and on Windows, where a named pipe nobody accepts on refuses every dial, a daemon replaying its spool on a loaded machine looked absent for as long as that took — up to 30 s in the close-out's cold-start diagnostic, while each hook that failed to reach it spooled and started another daemon.

session-start fits its whole run inside its 15 s manifest timeout (D17b and D21, internal/cli hookBudget). Counted from the hook's first statement, 1.5 s at the end is kept for the process's own start and exit, which the host's clock includes; before that come the 10 s reply wait and the 250 ms dial; and a start whose daemon is up within the 3.25 s before those keeps the full reply wait. Finding or starting the daemon may borrow the reply wait's idle time: the poll for a listening daemon runs until 8.25 s, the last instant that still leaves the reply the 5 s the daemon may take to answer a compaction (D9) plus the dial, and the reply wait is then what is left before 13.5 s once the dial is set aside: about 5 s when the poll runs all the way to 8.25 s, more when it finds the daemon sooner. The poll stops at 8.25 s, never partway through a tick or a dial past it, so a daemon that comes up in its last moments is reached by the hook's own dial. A daemon that has not come up by then is not waited for: the start is spooled and the hook ends at about 8.3 s. Preparing a Windows staged copy and creating the process are never cut short — the close-out's cold-start diagnostic saw process creation alone stall for 4 to 5 s on a loaded Windows machine — and a daemon started that late still gets the 1.5 s to come up that EnsureRunning has always given it, even past 8.25 s. Whatever runs over comes out of the reply wait, and with no time left the request is spooled without a dial. A start cut short is answered as any unanswered one — {}, or for a compaction the deferred note (§7) — and the daemon replays it from the spool, recording the session without the §12.1 probe.

What runs where. The hook process parses its event, connects, writes and waits for an ACK. The daemon does the work: it is the single writer of the store, and — per internal/mcp's package comment — the MCP handlers execute in the daemon too, not in the qompack mcp process. The stdio process "is a transcoder": it advertises this package's own ToolDefs, so tools/list is byte-identical on both sides, and forwards every tools/call over the local transport. That is not only a performance choice: Claude Code launches an MCP server once per client and hands it no session_id, so the daemon is also the only party that can resolve which session a call belongs to.

IPC. internal/ipc implements the transport: endpoint resolution, NDJSON request/response framing, a one-byte ACK/NAK handshake, and "the spool that every failure path falls back to". It is the only package permitted to import net, and its package comment is emphatic that this is not network access: on Windows a named pipe ACL'd to the current user's SID, on POSIX a SOCK_STREAM Unix domain socket, mode 0600 in a 0700 directory. Decision D10 — no network I/O, ever — is enforced mechanically by CI's security job, which greps the import graph for net/http, net/url and crypto/tls outside internal/ipc.

A hook that cannot reach the daemon, or whose acknowledgement comes too late, appends its delivery to its own client spool and still exits 0. While requests keep arriving, the daemon's client-spool watcher replays such a spool about two check intervals after it was written and retries one that must still wait for an earlier delivery of its session (C1.13); the startup, flush, idle and operator drains replay whatever is left. The idle drain runs once the project has had no activity for scheduler.idle.detectAfterSeconds (120 s by default), looked at on a tick of at most 30 s. The watcher's passes, the idle drain and a drain the ingest's lanes ask for share a soft 2 s pass budget (owner decision D31, idleRunBudget). Once it is spent, a pass that has made progress (it advanced a spool's consumed front, or published or retired a line) starts no new line. The line in progress finishes rather than being cut: its dispatch to the handler runs under its own 5 s drainLineDeadline, and its admission, lease and journal checks under no deadline. A pass that has made no progress is not stopped by the budget: it reads on until it makes progress or reaches the end of the spool, so a spool whose head waits for an earlier delivery of its session cannot starve the spools after it (D58(c)). Such a pass is bounded by the spool, not the clock. It admits again, and checks against the committed frontier again, each line that still waits. A line an earlier pass of the same daemon consumed behind such a head costs only its read, for up to orderingProcessedCap (4096) such lines per spool file, while the file is the same file and has only grown. Past that bound such a line is admitted and checked again on every pass, though it is counted and announced only once unless a pass left an unleased line ahead of it unconsumed, and a restarted daemon consumes every such line in full once more. A spool file unchanged since the daemon synced it is neither synced nor has its progress rewritten again. While a blob's cleanup waits on a line still ahead of a front, the pass also reads each spool file's unconsumed lines once, at its start, for references to that blob. The drains a session end runs for itself are not budgeted.

A replayed request is one whose hook has already answered the host without the daemon, so a replay does the request's bookkeeping and nothing the host would have to see. A replayed SessionStart registers the session, runs and records the contract assertions and the observer's bookkeeping, but mints no hook.additional_context_delivered probe (§12.1) and puts nothing into its answer: a probe nobody received would run out its two chances and degrade the project, blaming the host for a reply Qompack lost. A degrade banner such a replay cannot show is owed to the next live SessionStart. When the replay is of a request the daemon did answer, too late for its hook, it withdraws the probe that answer carried and owes its banner again (the hook's delivery nonce identifies the request). A replayed SessionStart the host fired before a pending PreCompact does not resolve session_start.source_compact, which stays pending for the start that follows the PreCompact. A replayed PreCompact re-arms that obligation only if no SessionStart of the session has arrived since the hook fired. It seals its checkpoint unless it is a hook's spooled copy of one whose seal has already succeeded in this daemon, which is acknowledged without a second seal, without the scheduler's compaction close and without a second wall-time sample. A copy that reaches a drain while its seal is still running is sealed as well, so a seal that then fails still leaves the compaction a checkpoint. A prompt counts as a miss for the current probe only if it is a prompt of the session the probe was minted for, sent after it was minted: a replayed prompt from before the probe, another window's prompt, or a prompt of a session whose own start was replayed and minted nothing never had a chance to find it. A prompt is one chance however often its delivery is handled — a retry after a capture that failed, or a redelivery after a restart, carries the same delivery nonce and spends nothing more. Each time comparison is between the hooks' own timestamps. A replay is not a served request either, so it does not release the daemon's one re-drain after its first served request (internal/daemon/handlers.go, handleSessionStart, handleCheckpoint and sentinelMissCounts).

2. Write set and retention

Everything Qompack writes for a project lives under <project>/.qompack/. internal/paths/layout.go names the directories, and EnsureLayout creates them at 0o700:

objects/, index/, sketches/, dag/, grammar/, checkpoints/, pins/, eval/ (with replay/ and opt/), records/, state/, run/, spool/, logs/, metrics/, tmp/, migrate/ and backup/. EnsureLayout also writes <project>/.qompack/.gitignore containing exactly *\n, so the store self-ignores even in a project whose own .gitignore is never touched.

Per user, Qompack writes only under <home>/.qompack/ (the user-global configuration layer, the token-estimator calibration file, a fallback log directory for a project whose own log cannot be written, and — on Windows — the daemon's staged executable, bin/<sha256>/qompack.exe, §1). test/guards/writeset_test.go runs all six hooks and fails on any write outside these two trees.

Qompack only reads config.json, in both trees; you or your editor write it. Every read takes a handle with delete sharing: paths.ReadFileShared, or on the hook path paths.OpenSharedLeaf, which also never follows a final symlink or junction. So an editor that saves by renaming a new file over the old one never makes a hook's read fail. Such a failure matters because a hook that cannot read its configuration records nothing (owner decision D8). The shared reads need internal/config to import internal/paths, which owner decision D22 allows (plans/00-ARCHITECTURE.md §3.2). A file that exists and still cannot be read — a directory named config.json, a permission refusal — is never taken for a missing one: config.Load reports it as a loud "unreadable config" warning, and the hook path refuses it.

Two limits remain, both on Windows. An editor that renames with the legacy MoveFileEx cannot replace a file while any process holds it open, even with delete sharing, so that save can be refused while a hook is reading the file. The editor reports the refusal, the hook still reads the version on disk, and saving again succeeds. And a rename that replaces config.json can leave the name missing for tens of milliseconds while it runs, whichever rename the editor uses: measured on the development host, about one save in every 10,000 to 40,000 did, for 18 to 115 ms, with no reader holding the file (plans/sdd/V6-closeout/w6-config/runs/). A hook that saw the file and then could not open it looks again for up to 250 ms: it reads the file that comes back, refuses one that comes back and cannot be read, and goes on without that layer only if the file stays gone throughout. A hook whose first look falls inside that moment, and a config.Load (the daemon's reload, config print), find no file, exactly as they would if you had deleted it, and use the configuration without that layer: the defaults, or the user-global file for a missing project file. That one delivery is then recorded, or not, under that configuration: a runtime.mode of off or a runtime.redact addition in the file being saved does not apply to it. A reader that has not seen the file cannot tell that moment from a deleted file, and looking again after every miss would delay every hook in a project that has no config.json, so it is not refused.

The two trees never coincide. A project root is resolved from QOMPACK_PROJECT_ROOT, else the nearest enclosing .git, else the working directory, and each of those can name the home directory itself: a session started there, one started below a home that is a git work tree (a dotfiles repository), or an override pointing at it. Its store would be <home>/.qompack/, the user-global layer's own directory, so owner decision D18 refuses that root: every entry point compares the resolved root with the home directory (after cleaning, case-insensitively on Windows, following symlinks and junctions, internal/paths/home.go) and records nothing, writes nothing, locks nothing and starts no daemon for it. SessionStart answers with one short message saying so, the other hooks answer {}, the MCP tools answer a stable refusal, and status, doctor and every store command say why (internal/cli/homeroot.go). Behind the entry points, the daemon's lock and every spawner — the spawn claim, a hook's or the MCP server's lazy spawn, EnsureRunning and SpawnDetached — refuse the same root themselves, so a caller that skipped the check would still create nothing under <home>/.qompack/. A project below the home directory is unaffected.

Named files referenced elsewhere on this page: checkpoints/NNNN.json and checkpoints/MANIFEST.jsonl, index/observations.jsonl, records/eliminations.jsonl, state/frontier.json, state/config-violations.json, sketches/tried.bloom.

internal/paths's package comment makes the §7.4 append-only invariant mechanical: "every function in this package that can write into .qompack refuses to truncate or rewrite checkpoints/, pins/, or sketches/tried.bloom" (appendonly.go: IsProtected, OpenFile, AppendOnly, AppendJSONL, CreateNew, ReplaceBloom). The guard judges a path by its spelling, compared the way the filesystem resolves names (protected_names.go): case-folded on Windows and macOS, where CHECKPOINTS/0001.json is the sealed checkpoint itself, and on Windows with every NTFS stream suffix (::$DATA, ::$INDEX_ALLOCATION) removed first. Spellings that resolve only through the filesystem are outside a textual guard: 8.3 short names such as CHECKP~1, hard links and reparse points. No product caller builds any of these spellings; every protected path comes from a Layout field.

The write set is asserted, not asserted-about: plans/V5-report.md §27 records TestV5_NoPackageWritesOutsideDotQompack running under the real binary, plus test/guards/writeset_test.go and an extended append-only guard. §27 also records that retention roots and GC are covered by the I-06.x rows and the phase-7 compaction tests, and that the compaction tests rewrite by design and are documented as doing so.

One GC pass at a time. Store GC runs only inside the daemon: every session end runs a pass, and so does the idle scheduler. A store runs one pass at a time (internal/store/gcgate.go), because two overlapping passes both resume the same state/gc.json cursor and subtract its freed bytes twice from the size that state/store.json persists and the quota reads, and they also collide on gc-live.bin, the tombstones and the compaction of retention-roots.jsonl. A request that finds a pass running waits for it, and is answered by the next pass to start, never by the running one: that pass harvested its retention sources before the request existed. The requests that waited behind one pass and ask for the same kind of pass (retention window, dry run, quota) are answered by a single follow-up pass, started by the one that grants the longest deadline; the daemon's two callers always ask for the same kind. The wait answers to the caller's context, so Stop is never held behind a queue, and a pass's deadline starts only when that pass starts. The gate needs no file lock: qompack fsck --repair never runs GC, and every command that opens a writable store takes the daemon lock first.

What is never written. Secrets. internal/redact is the choke point: "secrets must never reach objects/, so redaction is applied once, at store.Put/PutBytes, before canonicalization and chunking — never as an after-the-fact audit step". Ten built-in rules run in a fixed order plus whatever runtime.redact.patterns admits; redaction is idempotent and bounded in growth, and both properties are fuzzed. A rule is deliberately allowed to match an entire input, because a tool result that is nothing but a private key must still be fully redacted.

No telemetry is written or sent: runtime.telemetry.enabled is hardwired off and the key exists only to say so (docs/config-reference.md).

3. Identity

plans/00-ARCHITECTURE.md §0.2 defines four closed enumerations. They are confirmed against internal/core/evidence.go, which declares exactly these values:

  • core.Fidelity ∈ {exact, prefix, partial, redacted, truncated, binary, failure, unknown}
  • core.Coverage ∈ {qompack_included, archive_only, native_load_observed, expired_deleted, unknown}
  • core.EvidenceOutcome ∈ {ok, absent, unavailable, denied, corrupt, expired, uncertain}
  • core.Authority ∈ {user_correction, explicit_decision, tool_observation, candidate_extraction, hypothesis, conflict}

The architecture's rule for them: "Enumerations are closed and versioned; consumers receive them through composition roots, never by importing a sibling layer."

Two identities are kept apart. core.ObservationID is Qompack-assigned per accepted host delivery and "never derived from content"; content identity is the hash root of the canonicalised content. Two deliveries with equal bytes are therefore two observations with one content identity. A host tool_use_id is carried verbatim as HostID when supplied and is absent otherwise — never synthesised. Ordering is recorded as ArrivalSeq beside the observed Turn, and observed order and arrival order are never inferred from one another. A record without an envelope (v, transform, hash) has fidelity unknown, not exact.

internal/state carries the authority rules as types: "Only AuthorityUserCorrection and AuthorityExplicitDecision are authoritative; only they may supersede an authoritative record, correct anything, or resolve a conflict. A hypothesis or a candidate extraction never becomes an instruction by being newer." Records are append-only, a conflict is rendered as a conflict until an authorized source resolves it, and scope fails closed.

4. Publication and durability

Publication is ordered (plans/00-ARCHITECTURE.md §0.2.2): durable object (fsynced) → verified references (index lines naming the object, appended only after the object is durable and re-verified by hash on read) → committed frontier / checkpoint visibility. A reference or frontier failure leaves the object as a GC root; a capture failure leaves the host result in place and forbids any handle or pointer that claims it recoverable.

Acknowledgement is idempotent by the persisted ObservationID: lease → handle → ack, so an interrupted drain re-delivers the same observation instead of consuming it or minting a second identity.

Every consumer of a delivery therefore has to tolerate seeing it twice, because the handler runs before the ack: a Stop or a bounded drain that cuts the ack replays the same delivery through the same handler. The observer absorbs the replay (observer.redelivery_absorbed): a tool use, a prompt or a subagent capture by the record its first run published, and a main-agent Stop, which writes no record, by the identity of the session's last applied Stop, which state/observer.json keeps with the turn it advanced. The scheduler tap applies each delivery once by its ObservationID, so a replay folds no tokens into the open segment, adds no detector observation and moves no request-start anchor (sched.tap.redelivery). The one thing a replay does is make a segment close the first run owed and did not make: a task-boundary or changepoint close that the same cancel failed along with the ack. The ordering gate holds a session's next delivery until every earlier one is acknowledged, so the last delivery applied for a session is the only one that can come back. The tap therefore keeps one identity per session, for the 256 sessions it applied a delivery of most recently. The tap folds every session's tool use into the bound account, so it persists in state/scheduler.json the identity of each of those sessions whose delivery reached that account, and a restarted daemon folds none of them again: a replay after the bind is recognized by the restored identities, and one the startup drain made before the bind is deducted from the account the bind restores, only when that account holds it.

ADR 0014 records the delivery path's group commit and the format-2 A/B seal as they are implemented and merged — it documents decisions already taken rather than proposing new ones, and settles four of the twelve questions SP20-D1's design put to the owner.

Delivery journal segments. The lease and acknowledgement journals are segmented (SP20-D4, enabled by default since the V6 close-out). A segment's two journal files keep their fixed bounds — 65,536 entries and 64 MiB each — and reaching either rotates the journal rather than refusing: the rotation archives the outgoing window (every lease, acknowledgement and terminal disposition) into the generation store, an immutable Merkle radix over nonce, arrival, acknowledgement, terminal and per-session frontier keys, stored as one pack file and one root pointer per generation, merging the window's keys in the radix's own key order so each page is read and written about once; then it stages the next segment, with a carried-lease file naming every archived lease that has no acknowledgement, and commits the switch as one fsynced record in the segment authority's chained log. Leases and acknowledgements wait while a window is archived: 2.3 to 6.8 s for a full window in the V6 close-out's measurements on loaded Windows and Linux hosts, once every 65,536 deliveries. Owner decision D6 accepted that pause as a documented residual; each rotation is a Loud line and adds to the delivery_rotations and delivery_rotation_pause_ms counters, and a store's first rotation, which a build that predates segments cannot read past, is announced beforehand with a Warn (Backup and restore). The hot path never writes the generation store: the active segment's journals are the record of the active window, and only a settlement of an already-archived lease is mirrored at once. A new delivery is checked against the active window first and the archive second, so a redelivery of any archived nonce returns its original identity and a dormant session continues its arrivals densely. The original four files stay in place as segment 0; its two seals are frozen when the first rotation has archived the window and before its transition commits, so a build that predates segments refuses the journal instead of re-minting arrivals.

Between rotations the daemon holds only the journals' active window in memory, with bounded caches of the generation store (32,768 decoded branch pages and 64 open pack files), and a lookup reads one path from the store's root, whose depth grows with the logarithm of the history. A rotation also holds, while it runs, the outgoing window's archive plan and the carried leases it rewrites (at most 64 MiB of them): about 225 to 235 MiB of peak heap at a full window in the close-out's measurements. Disk grows with history. Store GC reads the active segment's journals and its carried leases, never the archived segments' journals, so a GC pass holds at most the active window and 65,536 carried leases. A carried lease leaves the carry only when an acknowledgement settles it before a later rotation; a delivery retired by a policy denial never is acknowledged, and neither is a leased delivery that is never published, so those accumulate. A carry beyond 65,536 leases halts every GC pass, which then collects nothing (store.gc.delivery_carry_over_bound, Loud once per run of halted passes), and a rotation whose carry would pass 64 MiB (about 200,000 leases) refuses before it stages anything, so the journal fails closed (delivery_rotation_carry_over_bound). Both bounds are accepted residuals under D6; Troubleshooting says what each looks like. Backup, the offline delivery-seal check and fsck --seal-check read every segment.

Checkpoint durability is internal/checkpoint: the L4 checkpointer owns the immutable, importance-ordered checkpoint artifact, the incrementally advancing draft that encodes closed segments exactly once (the §4.6 DPI guard), the tiered truncation order, ground-truth pointer validation, and decision extraction. The on-disk JSON shape is versioned (SchemaVersion) and pinned against a frozen fixture. ADR 0011 covers the read end.

There is exactly one draft owner per session — the checkpointer's FileWriter, which owns Begin, Finalize and Abort and adjudicates the DPI guard in one place.

Durability barriers. On POSIX two barriers make a write survive a power cut, and they cover different things: a file's sync makes its bytes durable, and a sync of its directory makes its name durable. A new file whose own sync returned can still vanish if its directory was never synced. Every step that promises durability issues both where it depends on both, in an order that lets no durable record name something a cut could still take (internal/paths/barriers.go is the seam that lets tests count and cut them). A directory barrier is never taken as done because the name it covers is already on disk: the first durable append to a log in each process syncs the log's directory whoever created the file, and a directory some earlier call in the process created but could not sync — the call failed, or another goroutine is still inside it — is synced by the next call that depends on it:

  • Checkpoint seal. Finalize returns only after, in order: the artifact's bytes; the draft's segment marks (index/segments.jsonl, re-marked and synced — and index/ once per daemon run, for the log's name — so no later draft re-encodes a sealed segment); the artifact's name (checkpoints/ synced); the MANIFEST.jsonl line, synced — the seal itself; and checkpoints/ again when the seal created the manifest. Only then do the draft's retirement, the successor draft, the PreCompact answer and the next rehydration act on it. A cut anywhere leaves the checkpoint absent (its draft still on disk, sealed on the next attempt) or sealed with its marks durable, never a manifest line naming bytes the cut took. A barrier that fails after the line is written, while the process lives on, leaves the checkpoint sealed for every reader: Finalize reports the failure (and counts checkpoint.seal_not_durable) but retires the draft as sealed, so the next attempt never seals the same content again under the next sequence.
  • Delivery and WAL. A hook's ACK follows the WAL line's sync; the spool directory is synced when a WAL segment is opened, and a tool response too large to send inline (a spool/blob-*.bin file the hook wrote) is synced, with its directory, before the line that names it.
  • Publication, pins, eliminations, GC. A capture sidecar is durable, name included, before any reference or frontier ACK names it: a new records/captures/<shard>/ directory is synced into its parent before the sidecar is written. A publication pass fsyncs each object, its directories and the index before any reference or acknowledgement depends on it. A pin's log line is synced before the derived pins/invariants.json changes. A record_eliminated call publishes the evidence it minted and syncs its records/eliminations.jsonl line before it answers, because no spool line stands behind an MCP call. A GC pass syncs its tombstones before it deletes the chunks they retire. Retention-root declarations are synced before the backup manifest that relies on them. (The publication order is plans/00-ARCHITECTURE.md §0.2.2's.)
  • Backup and restore. Every directory of a backup tree, and the certification marker, is synced before the manifest certifies the backup; a restore syncs its staged tree before the rename that publishes it, and the destination after. EnsureLayout syncs the parent of every directory it creates, removes .qompack/.gitignore before it adds a directory to a layout that has one, and writes it only after those syncs succeed, so the next call over a layout whose syncs failed (in this process or the next), or one another writer began (a hook's spool directory), syncs its entries again.

Some files may lose their tail to a power cut by design, because nothing durable depends on them: the elimination lines the detector and prompt recognition derive from spooled events (a lost tail costs that elimination; a sealed checkpoint's copy is never read back as authority), the signal log, the DAG log (a lost batch degrades relevance ordering to the documented recency tiebreak), index/files.jsonl and index/sessions.jsonl (repaired on redelivery and recomputed from the tool-use index), demand telemetry, day logs, the caches (sketches/tried.bloom, which is CRC-checked and rebuilt from the elimination log, and the token chunk cache), and a hook's own client spool file, which carries no acknowledgement.

Windows directory sync (owner decision D24). On Windows the directory barrier is a no-op (paths.SyncDir): the directory handle Go's os.Open returns refuses FlushFileBuffers, and D24 keeps the no-op on the NTFS-journaling premise rather than add a raw Windows directory handle.

  • What NTFS journals. Metadata only: every change to the file system's own structures — a file's creation, a rename, a deletion, a size change — is written to the volume's write-ahead log as one transaction and replayed at mount, so after a power cut each such change is wholly present or wholly absent. A directory entry is never torn, and a rename never leaves both names or neither. File contents are not journaled: bytes written since a file's last flush can be lost.
  • What a flush covers. A file's FlushFileBuffers (File.Sync) writes its bytes and forces the log out through that file's own latest change. The log is sequential, so every metadata change logged before that point — the file's own creation or rename among them — is durable when the flush returns. A directory flush would add nothing for a file that is itself flushed after its last directory change.
  • What a power cut can still take. Whatever follows the last flush on the volume: unflushed bytes, and a rename, creation or deletion completed after it. WriteAtomic flushes its staging file before its rename, so its most recent replacement of a file can revert to the previous complete version — never to a torn or empty one — and a removed file can reappear.
  • Why that is enough. No product guarantee depends on more. Each write listed above ends with a file flush after the directory change it relies on (the MANIFEST.jsonl line, the journal and WAL appends, each object's flush in a publication pass, the pins and acknowledged elimination lines), except a backup's certification, and every change that can revert is safe to lose. state/ documents, the pins view, a draft and state/precompact.json are derived or rebuilt, with one exception: a forked session's state/lineage-<session>.json records a fact nothing else holds (which session the fork continues), and a backup carries it with the rest of state/. Its rename is made durable by the next flush on the volume, which the fork's first prompt capture makes before that prompt is acknowledged, so a power cut can revert it only before the fork has said anything; the fork is then treated as unforked, its own first prompt standing as its original, which is what every fork got before the record existed. A restore's final rename leaves the previous state to retry from. A backup's certification is the rename of its manifest and the removal of its certification-pending marker, the last two steps of qompack backup, and no flush follows them: a power cut just after the command reports the backup certified can leave it without its manifest or with the marker back. Verification refuses such a backup, so it is never restored from as certified; it must be taken again.

The premise has not been tested with a power cut on this project; a working Windows directory barrier exists (FlushFileBuffers on a CreateFile(GENERIC_WRITE, FILE_FLAG_BACKUP_SEMANTICS) handle) and D24 declines it.

Open on this tree. plans/V5-report.md §29 item 2 records two known regressions in enabled scope that are not host questions: SP20-D1 (hot-path budget B-B red on the shipped leased delivery path) and SP20-D2 (verify-on-read over the GetChunk and Search budgets). Both are carried to V6-VERIFY under a recorded waiver, and the report states plainly that plan §8's gate of "no unresolved mandatory regression" is therefore not met.

5. State authority and uncertainty

internal/state separates what Qompack observed from what it believes: "An observation is immutable and lives elsewhere; a Record here is a statement DERIVED from one or more observations and is identified only by their core.ObservationIDs." Nothing in that package holds observation bytes, rewrites an observation, or lets a record change its own authority after admission. Current authority and historical reads are therefore distinct: a superseded, corrected or conflicted record stays readable with links in both directions and a retained Lineage.History.

The recorded partial. plans/V5-report.md §24 records the uncertainty gate as partial: it does not survive the digest surface under a blind ledger. Concretely (§29 item 11): the blind-ledger digest renders a stale record as [active], and pin records are stamped mcp because IngestPin has no production caller. Both are routed and unruled, and the gate stays partial until they are ruled. Read an uncertainty marking in a digest as a claim that has not been verified end to end.

6. Retrieval

The MCP tools are documented in docs/mcp-tools.md, generated from internal/mcp.ToolDefs. Four contracts are worth stating here because they are easy to misread.

unavailable is not absent. ADR 0013 names "errors read as absence" as a defect to be fixed and sets the rule: absent "may be asserted only with complete, fresh coverage; anything less is uncertain or unavailable with a reason and a recovery direction". docs/mcp-tools.md carries the same contract for already_tried: a failed ledger query returns unavailable, and "unavailable or unrecognized states never establish absence or prohibit an approach". An unavailable answer is never substituted with current content.

dropped reports qualified coverage. It retrieves Qompack's own recorded omissions for the session — what Qompack did not carry — qualified as a whole: the report says when it is unavailable or when entries were withheld, and no entry carries a coverage or fidelity value. docs/mcp-tools.md states the boundary in its own words: "This report does not establish what remains in native context."

An ephemeral tag does not mean native eviction. Every retrieval response exposes _meta.qompack.ephemeral. docs/mcp-tools.md states it directly: "this is not a host eviction control or proof of native context retention". internal/mcp's package comment says the same: "Retrieval metadata marks Qompack representations ephemeral; it does not control host eviction or establish native context retention."

Spans are minimal by default. A tool returning file content returns the smallest chunk-aligned span covering the request, widened to a symbol boundary where one is known, with full: true as the explicit escape hatch and a next_span for paging.

Capture, fidelity and coverage may be partial or unknown. No retrieval response carries a fidelity or coverage value: a response reports what the read itself did (span, truncated, a «redacted:…» placeholder), and capture fidelity is recorded on the capture's sidecar record under .qompack/records/captures/ (docs/troubleshooting.md §3).

7. Checkpoint and rehydration

At PreCompact the checkpointer finalizes a checkpoint artifact; after the compaction, the rehydrator builds the payload that SessionStart source=compact injects.

qompack checkpoint prints nothing on stdout, on every path, a recovered panic included. The hooks reference gives PreCompact no hookSpecificOutput variant and says the host discards its systemMessage and continue, and Claude Code 2.1.280 rejected the focus instruction Qompack used to return there (C1.12). Claude Code 2.1.293 passes a PreCompact hook's stdout to the summarizer as additional instructions. This is undocumented. Qompack writes nothing there: the command's SilentStdout flag makes runGuarded hand it a writer that discards. The focus instruction is retired (C1.18): the daemon's checkpoint route seals the checkpoint and replies with the empty object, and records no instruction in the contract history. The one assertion that probed for it, precompact.custom_instructions_accepted, now reports retired and is attributed to an unsupported capability. internal/checkpoint still composes the focus text, but only to record its length in the state/precompact.json debug record; it reaches no hop.

Every hook client still passes the daemon's reply through internal/hookio's ConformOutput, because a daemon of an older build can still be resident after an upgrade. ConformOutput keeps only the fields the host accepts and acts on for the event being answered — additionalContext and systemMessage for SessionStart, UserPromptSubmit and PostToolUse, systemMessage for Stop/SubagentStop, nothing for PreCompact and SessionEnd, and never continue. The table is pinned against a transcription of the documented schema in testdata/host/hooks-output-schema.json.

That transcription also records the host's per-field cap: an additionalContext or systemMessage over 10,000 characters is accepted, but Claude receives only a file path and a 2,000-character preview in its place, and is not asked to read the file. The host counts UTF-16 code units — its own code tests field.length <= 1e4 (2.1.280; hookio.HostChars, plans/sdd/V6-closeout/rehydrate-cap/evidence/host-cap-unit.txt). The hook client passes an over-cap field through unchanged and logs a Loud line with its size (hookio.HostCapOverruns). That path is a defence that does not fire, because every field Qompack emits is built to fit: the rehydration (docs/cannot-do.md), the SessionStart degrade banner (each quoted value cut to 200 characters, the whole banner under 1,000) and the UserPromptSubmit loop warning (at most five warnings of 360 characters and a count of the rest, under 2,000) (C1.20).

Two things about that payload are load-bearing, per internal/rehydrate's package comment. Its order is normative — ItemKind's constants are the importance order, and a rehydration that reorders them is wrong even if it fits the budget, because position decides what survives truncation. Its size is deliberately small.

The host ceiling (owner decision D5, 2026-09-22). The whole compact additionalContext — the injection-tagged payload, its headings and separators, every handle, the overflow report, and the contract probe the daemon appends — is at most 9,500 host characters (rehydrate.HostContextCeilingChars), 500 under the host's 10,000. rehydrate.Build prices every unit in tokens and in host characters and admits it only when it fits both; the character count is exact, so the ceiling is a guarantee rather than an estimate. It is a host constant, not a configuration key: nothing raises it, and the token budget below can only bound the payload lower. Selection keeps the §8.6 order with whole records — tier 1 (the retrieval line first, then pinned invariants and the verbatim original intent), then items 2–6a by their shares — and a record that does not fit is left out whole, never cut. Every record left out is named in section 7 with the call that restores it (why(dec_…), re_read(path), expand(tool_use_id=…), already_tried with the elimination's own target and approach, Read on the rule, CLAUDE.md or SKILL.md file, or the checkpoint file and field); eliminations past eliminationsTopN stay one counted line, answered by the standing already_tried query, and the checkpointer's own drops keep its detail. Section 7 is a bounded prefix plus a counted tail (… and N more; call dropped()), and its smallest form is reserved before anything else is admitted, so the report on what is missing always fits. The complete list is persisted for dropped() regardless (ADR 0011 §21). A budget too small for any section (below the retrieval line, which tier 1 admits first) is never silent when something was dropped: the block is then a loss notice in section 7 alone, priced like any section, naming how many items did not fit, dropped() (the user's /qompack:dropped) and the original request's restore call when that was left out. Only a budget that cannot hold even - N items dropped; call dropped() injects nothing, and its drop report says so (D59, ADR 0011 §23).

Small tool results inline, and the record framing (0.3.2). Item 6 labels each tool pointer with the call that returns it, expand(tool_use_id="…"), and renders a result of at most 512 bytes verbatim, fenced, under its pointer: the bytes expand would return, read through the same index entry and store root, judged by expand's origin rule and redacted with the live runtime.redact policy. Inlined bytes are priced like any other unit against the budget and the 9,500-character ceiling and bounded to 4 KiB per payload in builder order, and a pointer whose inlined text does not fit keeps its bare line (internal/rehydrate/inline.go). The payload is tagged <!-- qompack:session-record seq=N ver=V --> and headed as Qompack's record of the session before compaction; checkpoint.StripInjections still removes a span tagged qompack:injected by 0.3.1 or earlier.

What "the verbatim original intent" guarantees (SP08-D3, owner decision D35). Item 2 injects the L0 capture prompt_<session>_0, resolved by derived id: the session's first captured prompt, verbatim. Captured turns follow the order prompts reach the daemon and are never renumbered. Prompts the daemon took live are captured in arrival order, and prompts replayed from the hooks' client spools are replayed in host order: by the timestamp the hook stamped on the first record each file still has to replay, never by the file name. Every hook's spool writer has a file of its own, client-<pid>-<writer id>.ndjson, where the writer id is random, so a hook that reuses an earlier hook's process id does not append to that hook's file. So under the HotSpool submode and runtime.daemon.enabled=false, where every prompt is spooled, turn 0 is the host's first prompt. Two cases are outside the guarantee. The first is a race: a prompt spooled because its hook could not reach the daemon, overtaken by a later prompt that arrived live and was captured before a drain replayed the spool. The second is left over from 0.3.0, whose hooks named their spool by process id alone, client-<pid>.ndjson: a later 0.3.0 hook with the same id appended to an earlier hook's file, and one drain pass replays that file's records in file order, possibly ahead of another file's earlier prompt. The daemon still drains such a file when a project upgraded from 0.3.0 holds one, in host order with the rest. Qompack does not claim to have captured the host's first request in either case. It says it may not have. Every prompt record carries its host timestamp. Any capture that lands behind a later-stamped turn, from either source, is counted (observer.prompt_out_of_host_order) and logged as a Warn naming the turn it came in behind. A rehydration whose turn 0 is not the session's earliest-stamped prompt adds a user_intent_source entry, host_order, to section 7, naming both records and the expand(tool_use_id=…) call for the host-first one (docs/cannot-do.md).

What follows the original, and what a fork's original is (V6 close-out, D45). The capture is read whole, never a prefix: an original longer than the block can carry is named in section 7 with its expand(tool_use_id=…) call. The checkpointer recomputes user_intent from the session's own prompt records (store.SessionPrompts) whenever its draft is refreshed and just before each seal, so every checkpoint carries the session's later prompts, verbatim and in order, as user_intent.evolution, including those in the segment that is still open when the host compacts. It keeps the newest whole restatements, at most 64 and at most 9,400 characters of them (the most one rehydration can carry, so nothing left out could have been injected), and names how many earlier ones it left out with the expand(tool_use_id=…) call for the newest and the oldest of them; tier 1 is never truncated, so without the size bound a session of long pastes cost every checkpoint its pointers and decisions. A session that another session did not fork is seeded only from its own chain, never from another session's checkpoint. A fork (SessionStart with source fork) has its lineage recorded when it starts (state/lineage-<session>.json), naming as its parent the session whose prompt was the project's newest at that moment; its checkpoints inherit what that session had said before the fork started, read from its own prompt records (through its own lineage when it was itself a fork, and from a checkpoint it sealed only when the records cannot be read), its own prompts follow them, and item 2 verifies the original against the origin session's own capture and labels it with that session (docs/cannot-do.md). A fork inherits its negative knowledge the same way (V6 close-out, D49): the parent's session-scoped eliminations recorded before the fork started (and, through the chain, each ancestor's up to the next fork point) answer the fork's already_tried, reach its rehydration and are carried in its checkpoints with the decisions they mint, still attributed to the session that made them; a sibling session that merely shares the project sees none of them. A fork's first checkpoint also carries the decisions of the checkpoint it continued (the parent's newest when the fork started, when the parent sealed it), ranked after the fork's own. Within one session, a decision stays in every later checkpoint while its source holds: an elimination's while the record is carried, a pinned one while the pin stands. A decision read off an explains edge from a node that is not an elimination would be kept in every later checkpoint, but no 0.3.0 producer draws such an edge: only an elimination's decision has an explains edge, and it is held as an elimination's. A decision is carried as its source mints it, so a checkpoint truncated at budget does not pass on a decision with its rejected alternative emptied, or lose one it cut.

What "8–12K" is and is not. It is a historical Qompack-added target for the material Qompack injects, recorded in ADR 0011 and in Qompack.md §8.6. It is not the total restored native context, and nothing here claims the native input shrinks: what the host restores on its own is the host's business, and Qompack neither measures nor controls it. The shipped defaults are runtime.rehydrate.minTokens 8000 and runtime.rehydrate.maxTokens 12000, with checkpoint.budgetTokens 12000 for the checkpoint artifact itself (docs/config-reference.md). Since D5 the host ceiling binds first: 9,500 characters is roughly 2,400 tokens of prose, so the token keys now matter only when set below that.

The answer is bounded, and never silently empty (C1.16). The host gives qompack session-start a 10 s reply deadline, after which the hook client answers {}; in the V6 close-out's live session 2 a compact SessionStart under load took 10.3 s and lost its rehydration that way. The session.start route now starts the rehydration itself (Services.Rehydrate) as soon as the contract run has said the mode may act, so it overlaps the route's own durable writes, and it no longer waits behind the observer's per-session lock, which a worker writing one of the same session's tool results holds across every store write: the observer's SessionStart bookkeeping runs beside the rehydration and finishes on its own (internal/daemon/session_start_compact.go). It is still ordered before the session's next event, as it was when the answer waited for it: the observer seams for that session (tool results, Stops, prompt captures, SessionEnd) wait for its pending bookkeeping first, and no other session's do (compactGates). The rehydration's drop report is written after its answer is handed over. The wait is bounded at a third of the SessionStart manifest timeout (5 s) from the request's arrival; a rehydration not ready by then, one that fails outright, or one a stopping daemon cannot start or cuts short is answered with an explicit note instead — it says the rehydration did not arrive and why, and names the MCP calls that recover the pre-compaction material (expand of the session's first prompt, recall, dropped()) and where the checkpoints are. Since owner decision D11 the same note answers a rehydration that cannot be built at all: a checkpoint store that cannot be read (an unreadable manifest, or a checkpoint that verifies but does not decode; a checkpoint that fails verification is stepped over, and the payload is built without it) and a build that fails or panics. Nothing is built on a store that cannot be read, and the drop report records the rehydration as never built — one rehydration entry, not delivered: …, naming the cause and where the checkpoints are, with no items and no tokens — so dropped() never describes an earlier rehydration as this one; for a replayed compaction it says the hook answered without the daemon rather than that the model received the note. A rehydration that finishes after its answer went out records its drop report as undelivered, so dropped() says so first; so does one built when the daemon replays a compact SessionStart from a hook client's spool, since the hook had already answered without it. The hook client writes the same note when no answer arrives at all (a missed deadline, an unreachable daemon), wherever a rehydration was due; under degraded-passive or runtime.mode off or passive, with the daemon disabled, or with the reinjection switch below off, {} stays the answer, because nothing was due. internal/cli's TestSessionStartCompact_UnderSameSessionIngest measures the compact answer under concurrent same-session ingest. On the frozen release candidate (C5.2 night of 2026-10-07/08, decision D78), with eight workers feeding 256 KiB Reads into the session, all 30 compactions of each run answered with the rehydration: p50 82 ms, p95 108 ms and p99 143 ms with no extra load, and p50 221 ms, p95 386 ms and p99 417 ms under the rig's in-process co-load of 16 fsync writers and 4 CPU spinners. The figures under plans/sdd/V6-closeout/w2-lifetime/runs/ (p99 from 1.85 s to 0.66 s) were taken before 3f2da1b3, when that rig's reads never reached the daemon, so they do not measure the shipped route, and no figure from before that fix is given here. The route's phases are in metrics/latency.json as session_start.* and rehydrate.*.

Injection has an independent kill switch: runtime.migration.reinjection.sessionStartCompact (default true). Setting it false disables injection without touching recording. It names the one injection adapter that has been tested; plans/MIGRATION-EVIDENCE.md records injection as "documented; installed behavior unknown" and "no PostCompact prerequisite".

8. Scheduler, observer, negative knowledge

Scheduler (L3). ADR 0012 records the composite trigger, BOCD changepoint detection, cache regimes and p-selection as shipped by SP-12, together with the idle work and frontier advancement. Its configuration surface is the scheduler block of docs/config-reference.md.

Observer (L0). ADR 0008 records the capture layer: content-address every tool result, canonicalize per tool, near-dedup, addressable tombstones, redundancy and supersession detection, verbatim prompt capture and subagent capture.

Negative knowledge. ADR 0009 settles the one thing about this layer that is most often got wrong, and its title says it: the bloom is a cache. The records are the source of truth and every membership answer is checked against them. There is no "safe false positive" property here and none is claimed — an elimination is a conditional fact, and a false already_tried is a real cost. sketches/tried.bloom is append-only-protected, and internal/negknow is where it lives.

Slices are scores. ADR 0007: the dependence-DAG slice produces a relevance score per node, not a binary keep/drop.

9. Historical records vs current amendments

The full index, with each ADR's status and date as the ADR states it, is docs/adr/README.md. It is derived from the directory by test/docs, so it cannot go stale silently. Status and date below are quoted as each ADR states them; where an ADR carries no date line, the cell says so rather than guessing one.

ADR Title Status / date, as stated Kind
0002 Replay methodology: what the numbers mean and how they are produced accepted (SP-02, wave 1); no date line Stands
0003 Re-collecting the replay corpus, and the schedule the gate enforces accepted (SP-02, wave 1); no date line Stands
0007 DAG slices are scores, not drop decisions Accepted. Implemented by SP-07 (internal/dag); 2026-08-15 Stands
0008 Observer L0: capture, tombstones, supersession, and the Phase 1 exit Accepted. Implemented by SP-08; 2026-08-25 Stands
0009 Negative knowledge: the bloom is a cache, and nine decisions that follow from it Accepted. Implemented by SP-09 (internal/negknow); 2026-08-23 Stands
0010 A wall-clock budget is judged only where it is judgeable Accepted. Implemented at the close of V3-VERIFY's J5 backfill; 2026-09-06 Current amendment
0011 Rehydration budget, item order, and whole-rule restoration accepted; 2026-09-06; subplan SP-11; amended 2026-09-22 (§21, D5) Current amendment. §21 holds the payload under the host's 10,000-character additionalContext cap; §1–§20 stand as refined there
0012 Scheduler L3: the composite trigger, BOCD, cache regimes and p-selection Accepted; 2026-09-06 Stands
0013 Migration contracts: identities, publication, the shared ledger, envelopes and ownership "Proposed by SP-19 M0-02 on branch arch/migration-contracts"; 2026-09-07 Current amendment, proposed
0014 The delivery path's group commit and the A/B seal Accepted, on branch verify/v5-final; 2026-09-13 Current amendment
0030 The QPKS sketch binary format Accepted; subplan SP-03, internal/sketch; no date line Stands
0100 V3 verification — wave 2 (observer L0 + negative knowledge) accepted; 2026-08-26 Historical record

Two of those deserve a note here. ADR 0013 is proposed, not accepted: it amends plans/00-ARCHITECTURE.md with §0.2 and "takes effect for implementation only once those owners have approved it", and nothing in it enables a feature — every behaviour it describes stays behind a runtime.migration.* gate that is pending in this build. ADR 0010 is the rule that a wall-clock budget is judged only where it is judgeable, which is why CI has separate timing and test-e2e jobs that run those tests alone.

10. What is not supported

Each item names where the limit is recorded. The full page is docs/cannot-do.md.

  • No native cuts, markers or history eviction. plans/MIGRATION-EVIDENCE.md, "Capability decisions": history rewriting / native eviction is unsupported and Excluded; ephemeral metadata is a future representation hint only. internal/mcp's package comment says the same of the ephemeral tag.
  • No model-compliance or native-byte proof. plans/MIGRATION-EVIDENCE.md records injection as "documented; installed behavior unknown" and packaging as "repository-level met, installed-host unverified" (B01). Nothing here observes what the model did with an injected payload, or what bytes the host holds.
  • No reconstruction of a missing original. plans/00-ARCHITECTURE.md §0.2.2: a capture failure "leaves the host result in place and forbids any handle or pointer that claims it recoverable". A record without an envelope is unknown fidelity, not exact.
  • No universal improvement claim. plans/V5-report.md §26: no held-out task runs, stochastic baselines or quality trials were executed; SP-21's quality row is "inconclusive by construction" and recorded as such (§24).
  • No performance guarantee. The budgets in docs/config-reference.md are budgets that CI gates, not promises about your machine. ADR 0010 exists because a wall-clock figure measured under co-load is not a judgement, and plans/V5-report.md §29 carries open reference-platform rows.
  • No name-availability guarantee. Slash-command and MCP tool names are advertised by this plugin; whether a name is free in a given host session depends on what else that host has loaded. plans/V5-report.md §29 item 6 records the competing-hook matrix (T21-HOST-01) as needing an installed host and not yet run.
  • Subscription usage is not API price. plans/V5-report.md §25 records estimated price as unknown with no rate table applied, and notes that a subscription allowance is not cash per token. Qompack's own ledger never writes an estimate as an invoice and never fills an unknown count with zero.

Known divergence from the plan documents

plans/00-ARCHITECTURE.md is a planning document that later waves amend; plans/V5-report.md §24 carries an explicit plan-vs-code drift list (SP-10's gate table, SP-11's gates, SP-13's manifest and installed transcript, SP-10's host-boundary correction) as implemented_unverified or documented, routed to V6 planning. Where this page and a plan document disagree, this page follows the code and says which code. Where neither can settle a question, it is marked unknown above rather than guessed.