{
 "paper": "instant-recall",
 "a": "7.7",
 "b": "7.8",
 "summary": "From v7.7 (14 Jun) to v7.8 (29 Jul): 8,837 words to 9,592 words, 849 words in new or rewritten paragraphs and 94 taken out, 26 paragraphs changed.",
 "note": {
  "title": "Measurements from a coding-agent audit; claims made narrower",
  "kind": "revision",
  "body": "## Summary\n\nNumbers from an audit of coding-agent sessions now qualify several claims. The notes queued them in late July.\n\n- The coverage bound now holds only over the sources the build actually lists, with measured examples of what falls outside.\n- The duplicate-removal result is checked against measured repeat reads, which turned out to be rare.\n- The importance score is set against measured data on how long items stay in context.\n- \"Constant-time lookup\" is stated as direct key lookups, with the total work written out.",
  "source": "change note"
 },
 "paragraphs_changed": 26,
 "changes": [
  {
   "section": "2.4 Contemporary Open-Source Agent-Context Systems",
   "old": "headroom is the strongest external instantiation of exactly the compaction-based storage layer Instant Recall assumes *below* it (§1.1, §2.2): both compact-then-retrieve-on-demand, and both preserve originals losslessly. The honest line between them is one of altitude, not competition. headroom compacts the *active context window of a single agent run* — a working-set / paging concern, specialized by content type — whereas Instant Recall indexes the *persistent, cross-session store* by concept anchor for O(1) pre-inference recall. They are vertically adjacent: a combined stack with headroom-style CCR as the storage layer and Instant Recall as the concept index over it is the natural integration, not an either/or. What headroom does that Instant Recall does not is per-content-type compressors and a *learned* compression model. What Instant Recall does that headroom does not is decide *which* memories to surface before the model runs — a concept→cluster index — plus the beyond-cosine validity/trust/link signals of §4.9. headroom answers \"how do I fit this content in the window losslessly\"; Instant Recall answers \"which of months of stored content belongs in the window at all.\" A second, sharper debt to headroom is reproducibility, addressed directly in §8.4: it demonstrates that an agent-memory-adjacent system *can* publish a re-runnable harness over standard public datasets, which is the bar Instant Recall's own evaluation has not yet cleared.",
   "new": "headroom is the strongest external instantiation of exactly the compaction-based storage layer Instant Recall assumes *below* it (§1.1, §2.2): both compact-then-retrieve-on-demand, and both preserve originals losslessly. The honest line between them is one of altitude, not competition. headroom compacts the *active context window of a single agent run* — a working-set / paging concern, specialized by content type — whereas Instant Recall indexes the *persistent, cross-session store* by concept anchor with retrieval cost independent of corpus size. They are vertically adjacent in design, but adjacency is a claim about the live traffic path, not merely compatible interfaces. In one deployment, headroom was installed, enabled, and referenced by the gateway environment yet served only six requests over its lifetime and saved zero tokens because the active CLI subprocess did not receive the integration setting. This is one wiring defect, not evidence about compression quality; it shows that a combined stack must report lower-layer request counts before claiming that the integration is operational. What headroom does that Instant Recall does not is per-content-type compressors and a *learned* compression model. What Instant Recall does that headroom does not is decide *which* memories to surface before the model runs — a concept→cluster index — plus the beyond-cosine validity/trust/link signals of §4.9. headroom answers \"how do I fit this content in the window losslessly\"; Instant Recall answers \"which of months of stored content belongs in the window at all.\" A second, sharper debt to headroom is reproducibility, addressed directly in §8.4: it demonstrates that an agent-memory-adjacent system *can* publish a re-runnable harness over standard public datasets, which is the bar Instant Recall's own evaluation has not yet cleared.",
   "marked": "headroom is the strongest external instantiation of exactly the compaction-based storage layer Instant Recall assumes *below* it (§1.1, §2.2): both compact-then-retrieve-on-demand, and both preserve originals losslessly. The honest line between them is one of altitude, not competition. headroom compacts the *active context window of a single agent run* — a working-set / paging concern, specialized by content type — whereas Instant Recall indexes the *persistent, cross-session store* by concept anchor [-for O(1) pre-inference recall.-] {+with retrieval cost independent of corpus size.+} They are vertically [-adjacent:-] {+adjacent in design, but adjacency is a claim about the live traffic path, not merely compatible interfaces. In one deployment, headroom was installed, enabled, and referenced by the gateway environment yet served only six requests over its lifetime and saved zero tokens because the active CLI subprocess did not receive the integration setting. This is one wiring defect, not evidence about compression quality; it shows that+} a combined stack [-with headroom-style CCR as-] {+must report lower-layer request counts before claiming that+} the [-storage layer and Instant Recall as the concept index over it-] {+integration+} is [-the natural integration, not an either/or.-] {+operational.+} What headroom does that Instant Recall does not is per-content-type compressors and a *learned* compression model. What Instant Recall does that headroom does not is decide *which* memories to surface before the model runs — a concept→cluster index — plus the beyond-cosine validity/trust/link signals of §4.9. headroom answers \"how do I fit this content in the window losslessly\"; Instant Recall answers \"which of months of stored content belongs in the window at all.\" A second, sharper debt to headroom is reproducibility, addressed directly in §8.4: it demonstrates that an agent-memory-adjacent system *can* publish a re-runnable harness over standard public datasets, which is the bar Instant Recall's own evaluation has not yet cleared."
  },
  {
   "section": "3.3 Probabilistic Source-Coverage Analysis",
   "old": "**Implication.** Improving query embedding quality within a fixed source set yields bounded recall improvement. Adding sources raises the upper bound toward 1.0 but cannot exceed it. Instant Recall saturates this bound at build time by aggregating all sources into a single unified index.",
   "new": null,
   "marked": "[-**Implication.** Improving query embedding quality within a fixed source set yields bounded recall improvement. Adding sources raises the upper bound toward 1.0 but cannot exceed it. Instant Recall saturates this bound at build time by aggregating all sources into a single unified index.-]"
  },
  {
   "section": "3.3 Probabilistic Source-Coverage Analysis",
   "old": null,
   "new": "**Implication.** Improving query embedding quality within a fixed source set yields bounded recall improvement. Adding sources raises the upper bound toward 1.0 but cannot exceed it. Instant Recall approaches this bound only over the sources its build enumerates. That qualifier matters for coding-agent deployments: an independent 890-session audit measured 20,916,377 bytes of Bash output, about 47% of tool traffic, and command output is not necessarily exposed as a file-shaped `(content, timestamp, source)` input. A unified file index therefore does not by itself establish complete source coverage; deployments must enumerate transient tool-output channels or report them as excluded.",
   "marked": "{+**Implication.** Improving query embedding quality within a fixed source set yields bounded recall improvement. Adding sources raises the upper bound toward 1.0 but cannot exceed it. Instant Recall approaches this bound only over the sources its build enumerates. That qualifier matters for coding-agent deployments: an independent 890-session audit measured 20,916,377 bytes of Bash output, about 47% of tool traffic, and command output is not necessarily exposed as a file-shaped `(content, timestamp, source)` input. A unified file index therefore does not by itself establish complete source coverage; deployments must enumerate transient tool-output channels or report them as excluded.+}"
  },
  {
   "section": "4.1 Overview",
   "old": "- **Offline (nightly consolidation):** Full rebuild of the concept index mapping anchor terms to pre-ranked memory chunk paths. - **Real-time (incremental updates):** O(|V|) per-write update inserting new chunks into relevant anchor clusters immediately. - **Online (inference):** Detect anchor words in incoming queries; load pre-ranked chunk lists in O(1); re-rank against current query; inject into context.",
   "new": "- **Offline (nightly consolidation):** Full rebuild of the concept index mapping anchor terms to pre-ranked memory chunk paths. - **Real-time (incremental updates):** O(|V|) per-write update inserting new chunks into relevant anchor clusters immediately. - **Online (inference):** Detect anchor words in incoming queries; load each pre-ranked chunk list by direct key lookup; re-rank against current query; inject into context. Total work is O(|V| + |A| + K|A|), independent of corpus size n (§5.1).",
   "marked": "- **Offline (nightly consolidation):** Full rebuild of the concept index mapping anchor terms to pre-ranked memory chunk paths. - **Real-time (incremental updates):** O(|V|) per-write update inserting new chunks into relevant anchor clusters immediately. - **Online (inference):** Detect anchor words in incoming queries; load {+each+} pre-ranked chunk [-lists in O(1);-] {+list by direct key lookup;+} re-rank against current query; inject into [-context.-] {+context. Total work is O(|V| + |A| + K|A|), independent of corpus size n (§5.1).+}"
  },
  {
   "section": "4.1 Overview",
   "old": "![Inference-time data flow. The user query enters anchor detection and semantic expansion (orange, input), feeds the O(1) index lookup against the pre-built concept index (blue, storage), then post-retrieval re-ranking blends anchor relevance, query cosine, and the beyond-cosine signals (green, processing). A low-confidence branch triggers the reformulation gate. Ranked chunks assemble into the context window handed to the LLM (purple, output).](images/inference-pipeline.png)",
   "new": "![Inference-time data flow. The user query enters anchor detection and semantic expansion (orange, input), feeds direct key lookups against the pre-built concept index (blue, storage), then post-retrieval re-ranking blends anchor relevance, query cosine, and the beyond-cosine signals (green, processing). A low-confidence branch triggers the reformulation gate. Ranked chunks assemble into the context window handed to the LLM (purple, output).](images/inference-pipeline.png)",
   "marked": "![Inference-time data flow. The user query enters anchor detection and semantic expansion (orange, input), feeds [-the O(1) index lookup-] {+direct key lookups+} against the pre-built concept index (blue, storage), then post-retrieval re-ranking blends anchor relevance, query cosine, and the beyond-cosine signals (green, processing). A low-confidence branch triggers the reformulation gate. Ranked chunks assemble into the context window handed to the LLM (purple, output).](images/inference-pipeline.png)"
  },
  {
   "section": "4.6a Deduplication via Similarity Check",
   "old": "In deployment testing on a corpus with 18 months of daily logs, deduplication reduced effective index size by approximately 12%.",
   "new": null,
   "marked": "[-In deployment testing on a corpus with 18 months of daily logs, deduplication reduced effective index size by approximately 12%.-]"
  },
  {
   "section": "4.6a Deduplication via Similarity Check",
   "old": null,
   "new": "In deployment testing on a corpus with 18 months of daily logs, deduplication reduced effective index size by approximately 12%. That result should not be read as evidence that exact repetition dominates the underlying traffic. In an independent 2026-07 coding-agent audit covering 4,402 Read calls and 23,376,348 bytes, identical repeats accounted for 25,042 bytes across 7 calls and subset containment for 94,971 bytes across 35 calls, while line-number scaffolding alone accounted for 1,512,097 bytes. The similarity policy remains useful for index hygiene, but its thresholds address only a small part of observed redundancy; formatting normalization and temporal validity target larger classes.",
   "marked": "{+In deployment testing on a corpus with 18 months of daily logs, deduplication reduced effective index size by approximately 12%. That result should not be read as evidence that exact repetition dominates the underlying traffic. In an independent 2026-07 coding-agent audit covering 4,402 Read calls and 23,376,348 bytes, identical repeats accounted for 25,042 bytes across 7 calls and subset containment for 94,971 bytes across 35 calls, while line-number scaffolding alone accounted for 1,512,097 bytes. The similarity policy remains useful for index hygiene, but its thresholds address only a small part of observed redundancy; formatting normalization and temporal validity target larger classes.+}"
  },
  {
   "section": "4.8 Importance Scoring",
   "old": "The score modulates effective similarity during K-slot ranking, centered so that an average chunk (importance 5) is left unchanged and only above- or below-average importance shifts the rank:",
   "new": null,
   "marked": "[-The score modulates effective similarity during K-slot ranking, centered so that an average chunk (importance 5) is left unchanged and only above- or below-average importance shifts the rank:-]"
  },
  {
   "section": "4.8 Importance Scoring",
   "old": null,
   "new": "The score modulates effective similarity during K-slot ranking, centered so that an average chunk (importance 5) is left unchanged and only above- or below-average importance shifts the rank. An independent coding-agent trace measured context residency with median 48, mean 139.6, p90 364, and a maximum of 34 re-reads for one file. This does not calibrate the scoring function for the personal-assistant benchmark, but it confirms that access counts have a long enough tail to require log scaling and a cap:",
   "marked": "{+The score modulates effective similarity during K-slot ranking, centered so that an average chunk (importance 5) is left unchanged and only above- or below-average importance shifts the rank. An independent coding-agent trace measured context residency with median 48, mean 139.6, p90 364, and a maximum of 34 re-reads for one file. This does not calibrate the scoring function for the personal-assistant benchmark, but it confirms that access counts have a long enough tail to require log scaling and a cap:+}"
  },
  {
   "section": "4.9 Beyond Cosine: Validity, Trust, and Links",
   "old": "A pure similarity index treats the highest-cosine chunk as the best answer. Three deployment cases show this is wrong, so Instant Recall carries three additional per-chunk signals that ranking weights alongside cosine. Each applies one principle — *raw similarity is insufficient; retrieval must weight signals beyond embedding distance* — to a different dimension: when a fact was true, whether code can be trusted, and how chunks connect.",
   "new": "A pure similarity index treats the highest-cosine chunk as the best answer. Deployment evidence shows this is wrong, so Instant Recall carries three additional per-chunk signals that ranking weights alongside cosine. Each applies one principle — *raw similarity is insufficient; retrieval must weight signals beyond embedding distance* — to a different dimension: when a fact was true, whether code can be trusted, and how chunks connect.",
   "marked": "A pure similarity index treats the highest-cosine chunk as the best answer. [-Three deployment cases show-] {+Deployment evidence shows+} this is wrong, so Instant Recall carries three additional per-chunk signals that ranking weights alongside cosine. Each applies one principle — *raw similarity is insufficient; retrieval must weight signals beyond embedding distance* — to a different dimension: when a fact was true, whether code can be trusted, and how chunks connect."
  },
  {
   "section": "4.9 Beyond Cosine: Validity, Trust, and Links",
   "old": "**Validity over time (bi-temporal facts).** A chunk you can retrieve but that is silently *wrong because it was overwritten* is a recall failure subtler than CORF: the index finds it, but it no longer reflects reality, and the prior truth is gone. Each chunk therefore carries a validity interval (`validity_start … validity_end`) describing when it was true in the world, and an ingestion time describing when the system learned it — the two clocks of a bi-temporal store. A new fact that contradicts an old one *closes the interval* of the old fact (`validity_end = now`) and stamps it `superseded_by` the new chunk, rather than overwriting the row. History is preserved, and the index can answer \"what did we believe was true *as of* date X,\" not only \"what is the latest snapshot.\" Retrieval defaults to a `current`-mode filter (`validity_end IS NULL OR validity_end > now`), backed by a covering index so the hot path does not scan; `valid-at` and `all` modes are available for time-travel queries. The invalidation routine only closes currently-open intervals — it never deletes a row or resurrects a closed one — and the contradiction *detection* that decides when to call it is left to the nightly reflection layer. §4.9a explains why that detection cannot be a cosine threshold over the frozen embedding model.",
   "new": "**Validity over time (bi-temporal facts).** A chunk you can retrieve but that is silently *wrong because it was overwritten* is a recall failure subtler than CORF: the index finds it, but it no longer reflects reality, and the prior truth is gone. An independent audit over 890 coding-agent sessions and 4,402 Read calls measured 3,374,879 stale bytes across 680 calls, 14.4% of the 23,376,348-byte Read corpus. The corpus differs from the personal-assistant benchmark and is reported separately, but it supplies a base rate for the failure class rather than an anecdote. Each chunk therefore carries a validity interval (`validity_start … validity_end`) describing when it was true in the world, and an ingestion time describing when the system learned it — the two clocks of a bi-temporal store. A new fact that contradicts an old one *closes the interval* of the old fact (`validity_end = now`) and stamps it `superseded_by` the new chunk, rather than overwriting the row. History is preserved, and the index can answer \"what did we believe was true *as of* date X,\" not only \"what is the latest snapshot.\" Retrieval defaults to a `current`-mode filter (`validity_end IS NULL OR validity_end > now`), backed by a covering index so the hot path does not scan; `valid-at` and `all` modes are available for time-travel queries. The invalidation routine only closes currently-open intervals — it never deletes a row or resurrects a closed one — and the contradiction *detection* that decides when to call it is left to the nightly reflection layer. §4.9a explains why that detection cannot be a cosine threshold over the frozen embedding model.",
   "marked": "**Validity over time (bi-temporal facts).** A chunk you can retrieve but that is silently *wrong because it was overwritten* is a recall failure subtler than CORF: the index finds it, but it no longer reflects reality, and the prior truth is gone. {+An independent audit over 890 coding-agent sessions and 4,402 Read calls measured 3,374,879 stale bytes across 680 calls, 14.4% of the 23,376,348-byte Read corpus. The corpus differs from the personal-assistant benchmark and is reported separately, but it supplies a base rate for the failure class rather than an anecdote.+} Each chunk therefore carries a validity interval (`validity_start … validity_end`) describing when it was true in the world, and an ingestion time describing when the system learned it — the two clocks of a bi-temporal store. A new fact that contradicts an old one *closes the interval* of the old fact (`validity_end = now`) and stamps it `superseded_by` the new chunk, rather than overwriting the row. History is preserved, and the index can answer \"what did we believe was true *as of* date X,\" not only \"what is the latest snapshot.\" Retrieval defaults to a `current`-mode filter (`validity_end IS NULL OR validity_end > now`), backed by a covering index so the hot path does not scan; `valid-at` and `all` modes are available for time-travel queries. The invalidation routine only closes currently-open intervals — it never deletes a row or resurrects a closed one — and the contradiction *detection* that decides when to call it is left to the nightly reflection layer. §4.9a explains why that detection cannot be a cosine threshold over the frozen embedding model."
  },
  {
   "section": "4.9 Beyond Cosine: Validity, Trust, and Links",
   "old": "![The three beyond-cosine signals layered on the base cosine ranking. The base lane (blue) produces a cosine-ranked candidate set; validity (closes superseded intervals via a temporal filter), trust (×1.5/×1.2/×1.0/×0.5 verification multipliers), and links (durable backlinks + k-hop walk) each re-weight the candidates (green). All three are populated by the nightly cycle, never at query time, so the inference path stays O(1). The output is a re-weighted ranking where the closest chunk is not automatically first.](images/beyond-cosine-signals.png)",
   "new": "![The three beyond-cosine signals layered on the base cosine ranking. The base lane (blue) produces a cosine-ranked candidate set; validity (closes superseded intervals via a temporal filter), trust (×1.5/×1.2/×1.0/×0.5 verification multipliers), and links (durable backlinks + k-hop walk) each re-weight the candidates (green). All three are populated by the nightly cycle, never at query time, so the inference path remains independent of corpus size. The output is a re-weighted ranking where the closest chunk is not automatically first.](images/beyond-cosine-signals.png)",
   "marked": "![The three beyond-cosine signals layered on the base cosine ranking. The base lane (blue) produces a cosine-ranked candidate set; validity (closes superseded intervals via a temporal filter), trust (×1.5/×1.2/×1.0/×0.5 verification multipliers), and links (durable backlinks + k-hop walk) each re-weight the candidates (green). All three are populated by the nightly cycle, never at query time, so the inference path [-stays O(1).-] {+remains independent of corpus size.+} The output is a re-weighted ranking where the closest chunk is not automatically first.](images/beyond-cosine-signals.png)"
  },
  {
   "section": "4.9 Beyond Cosine: Validity, Trust, and Links",
   "old": "These three signals share a discipline: enrichment runs in the nightly cycle, not at query time, so the inference-path lookup stays O(1).",
   "new": "These three signals share a discipline: enrichment runs in the nightly cycle, not at query time, so the inference path does not add work proportional to corpus size.",
   "marked": "These three signals share a discipline: enrichment runs in the nightly cycle, not at query time, so the [-inference-path lookup stays O(1).-] {+inference path does not add work proportional to corpus size.+}"
  },
  {
   "section": "4.11 Inference-Time Lookup with Post-Retrieval Re-ranking",
   "old": "Inference-time retrieval proceeds in five steps: (1) **anchor detection** — each token in the query is matched against $V$ via exact match, stemmed match, and bigram/trigram phrase match; all matching anchors form the active set $A$; (2) **semantic anchor expansion** — the query embedding is compared against all anchor embeddings in $V$, and any anchor within cosine distance 0.3 of the query is added to $A$; (3) **O(1) index lookup** — for each $a \\in A$, retrieve the pre-computed top-K chunk list; (4) **post-retrieval re-ranking** — score each candidate chunk by blending anchor relevance (weight 0.6), query-specific cosine similarity (weight 0.4), and the validity/trust/link signals of §4.9; (5) **chunk content loading** — top chunks after re-ranking are loaded from disk.",
   "new": "Inference-time retrieval proceeds in five steps: (1) **anchor detection** — each token in the query is matched against $V$ via exact match, stemmed match, and bigram/trigram phrase match; all matching anchors form the active set $A$; (2) **semantic anchor expansion** — the query embedding is compared against all anchor embeddings in $V$, and any anchor within cosine distance 0.3 of the query is added to $A$; (3) **direct index lookup** — for each $a \\in A$, retrieve the pre-computed top-K chunk list in O(1) per key; (4) **post-retrieval re-ranking** — score each candidate chunk by blending anchor relevance (weight 0.6), query-specific cosine similarity (weight 0.4), and the validity/trust/link signals of §4.9; (5) **chunk content loading** — top chunks after re-ranking are loaded from disk.",
   "marked": "Inference-time retrieval proceeds in five steps: (1) **anchor detection** — each token in the query is matched against $V$ via exact match, stemmed match, and bigram/trigram phrase match; all matching anchors form the active set $A$; (2) **semantic anchor expansion** — the query embedding is compared against all anchor embeddings in $V$, and any anchor within cosine distance 0.3 of the query is added to $A$; (3) [-**O(1)-] {+**direct+} index lookup** — for each $a \\in A$, retrieve the pre-computed top-K chunk [-list;-] {+list in O(1) per key;+} (4) **post-retrieval re-ranking** — score each candidate chunk by blending anchor relevance (weight 0.6), query-specific cosine similarity (weight 0.4), and the validity/trust/link signals of §4.9; (5) **chunk content loading** — top chunks after re-ranking are loaded from disk."
  },
  {
   "section": "4.13 Full Inference Pipeline Integration",
   "old": "``` INFERENCE_PIPELINE(user_message, agent_config): # Layer 0: Always-loaded context (O(1), ~500 tokens) base_context = load(agent_config.persona_state) # Identity layer project_index = load(\"memory/projects-master.md\") today_log = load_today_self_written_log() # episodic hot cache",
   "new": "``` INFERENCE_PIPELINE(user_message, agent_config): # Layer 0: Stable always-loaded prefix (deployment-specific size) base_context = load(agent_config.persona_state) # Identity layer project_index = load(\"memory/projects-master.md\") today_log = load_today_self_written_log() # episodic hot cache",
   "marked": "``` INFERENCE_PIPELINE(user_message, agent_config): # Layer 0: [-Always-loaded context (O(1), ~500 tokens)-] {+Stable always-loaded prefix (deployment-specific size)+} base_context = load(agent_config.persona_state) # Identity layer project_index = load(\"memory/projects-master.md\") today_log = load_today_self_written_log() # episodic hot cache"
  },
  {
   "section": "Layer 2: Assemble context window context = [base_context, project_index, today_log, *memory_chunks, user_message]",
   "old": "# Layer 2: Assemble context window context = [base_context, project_index, today_log, *memory_chunks, user_message]",
   "new": null,
   "marked": "[-# Layer 2: Assemble context window context = [base_context, project_index, today_log, *memory_chunks, user_message]-]"
  },
  {
   "section": "Layer 3: Compaction if budget exceeded if token_count(context) > CONTEXT_BUDGET: context = COMPACT(context)",
   "old": "# Layer 3: Compaction if budget exceeded if token_count(context) > CONTEXT_BUDGET: context = COMPACT(context)",
   "new": null,
   "marked": "[-# Layer 3: Compaction if budget exceeded if token_count(context) > CONTEXT_BUDGET: context = COMPACT(context)-]"
  },
  {
   "section": "Layer 2: Preserve the stable prefix; append per-turn memory at the tail context = [base_context, project_index, today_log, *memory_chunks, user_message]",
   "old": null,
   "new": "# Layer 2: Preserve the stable prefix; append per-turn memory at the tail context = [base_context, project_index, today_log, *memory_chunks, user_message]",
   "marked": "{+# Layer 2: Preserve the stable prefix; append per-turn memory at the tail context = [base_context, project_index, today_log, *memory_chunks, user_message]+}"
  },
  {
   "section": "Layer 3: Compact only from a per-call context snapshot if per_call_token_count(context) > CONTEXT_BUDGET: context = COMPACT(context)",
   "old": null,
   "new": "# Layer 3: Compact only from a per-call context snapshot if per_call_token_count(context) > CONTEXT_BUDGET: context = COMPACT(context)",
   "marked": "{+# Layer 3: Compact only from a per-call context snapshot if per_call_token_count(context) > CONTEXT_BUDGET: context = COMPACT(context)+}"
  },
  {
   "section": "Layer 3: Compact only from a per-call context snapshot if per_call_token_count(context) > CONTEXT_BUDGET: context = COMPACT(context)",
   "old": null,
   "new": "The list order is operational, not cosmetic. `base_context`, `project_index`, and `today_log` form the stable prefix; retrieved chunks are appended only after that prefix and adjacent to the user message. In a measured persistent-agent window, cache-read tokens outnumbered fresh input tokens 122,422,666 to 15,841, with 7,374,471 cache-write tokens; a separate 2026-07-25 sample measured 91.1% hit rate, 98.6% median, and 10.6 cache reads per write. A per-turn memory block inserted earlier would invalidate every cached token after the insertion point.",
   "marked": "{+The list order is operational, not cosmetic. `base_context`, `project_index`, and `today_log` form the stable prefix; retrieved chunks are appended only after that prefix and adjacent to the user message. In a measured persistent-agent window, cache-read tokens outnumbered fresh input tokens 122,422,666 to 15,841, with 7,374,471 cache-write tokens; a separate 2026-07-25 sample measured 91.1% hit rate, 98.6% median, and 10.6 cache reads per write. A per-turn memory block inserted earlier would invalidate every cached token after the insertion point.+}"
  },
  {
   "section": "Layer 3: Compact only from a per-call context snapshot if per_call_token_count(context) > CONTEXT_BUDGET: context = COMPACT(context)",
   "old": null,
   "new": "The budget gate also requires an explicit measurement contract. In one deployment, a turn-aggregate `usage` value was misread as a per-call context snapshot: 6,448,106 reported tokens versus a decoded 52,116-token context, a 19.8× over-read. Compaction then fired around 5.5% of the real window; 29 events in seven days reached a 540-second cap and were discarded despite 19ms of compaction work. Such a downstream failure can erase correctly retrieved chunks, so `per_call_token_count` above denotes a snapshot of the assembled call, never a turn aggregate. Context-size assumptions are likewise deployment-specific: a comparable stack measured 23,731 always-loaded tokens (system prompt, injected files, skills, and tool schemas) within a 52,116-token call, not a general ~500-token floor.",
   "marked": "{+The budget gate also requires an explicit measurement contract. In one deployment, a turn-aggregate `usage` value was misread as a per-call context snapshot: 6,448,106 reported tokens versus a decoded 52,116-token context, a 19.8× over-read. Compaction then fired around 5.5% of the real window; 29 events in seven days reached a 540-second cap and were discarded despite 19ms of compaction work. Such a downstream failure can erase correctly retrieved chunks, so `per_call_token_count` above denotes a snapshot of the assembled call, never a turn aggregate. Context-size assumptions are likewise deployment-specific: a comparable stack measured 23,731 always-loaded tokens (system prompt, injected files, skills, and tool schemas) within a 52,116-token call, not a general ~500-token floor.+}"
  },
  {
   "section": "6.5 Alternative 5: Hosted Vector Databases (Pinecone, Weaviate)",
   "old": "| Dimension | Hosted Vector DB | Instant Recall | | ------------------- | ------------------------------------------ | -------------------------------------- | | **Retrieval model** | Flat similarity search (O(log n) via HNSW) | Pre-computed anchor→chunk cache (O(1)) | | **Cost** | $8+/month (starter tier) | Zero ongoing cost (local compute) | | **Privacy** | Embeddings sent to cloud | All data remains local | | **Latency** | ~50–200ms (network round-trip) | ~50ms (local, no network) |",
   "new": "| Dimension | Hosted Vector DB | Instant Recall | | ------------------- | ------------------------------------------ | -------------------------------------- | | **Retrieval model** | Flat similarity search (O(log n) via HNSW) | Pre-computed anchor→chunk cache (O(1) per active-anchor key; total independent of n) | | **Cost** | $8+/month (starter tier) | Zero ongoing cost (local compute) | | **Privacy** | Embeddings sent to cloud | All data remains local | | **Latency** | ~50–200ms (network round-trip) | ~50ms (local, no network) |",
   "marked": "| Dimension | Hosted Vector DB | Instant Recall | | ------------------- | ------------------------------------------ | -------------------------------------- | | **Retrieval model** | Flat similarity search (O(log n) via HNSW) | Pre-computed anchor→chunk cache [-(O(1))-] {+(O(1) per active-anchor key; total independent of n)+} | | **Cost** | $8+/month (starter tier) | Zero ongoing cost (local compute) | | **Privacy** | Embeddings sent to cloud | All data remains local | | **Latency** | ~50–200ms (network round-trip) | ~50ms (local, no network) |"
  },
  {
   "section": "6.6 A Compression Layer is Not an Alternative — It is a Substrate",
   "old": "It is worth distinguishing Instant Recall from a context-compression layer such as headroom's CCR (§2.4), because the two are easy to confuse as competitors when they are in fact stacked. A compression layer answers \"how do I fit selected content into the window losslessly\"; Instant Recall answers \"which of months of stored content should be selected at all.\" Compression operates on the active working set of a single run and is specialized by content type (JSON, code, logs); Instant Recall operates on the persistent cross-session store and is specialized by concept anchor. They compose cleanly: CCR-style reversible compression as the storage layer (§1.1) feeding `(content, timestamp, source)` triples into the Instant Recall index above it. Treating compression as a design *alternative* would be a category error; it is a substrate.",
   "new": "It is worth distinguishing Instant Recall from a context-compression layer such as headroom's CCR (§2.4), because the two are easy to confuse as competitors when they are stacked by design. A compression layer answers \"how do I fit selected content into the window losslessly\"; Instant Recall answers \"which of months of stored content should be selected at all.\" Compression operates on the active working set of a single run and is specialized by content type (JSON, code, logs); Instant Recall operates on the persistent cross-session store and is specialized by concept anchor. They can compose: CCR-style reversible compression as the storage layer (§1.1) feeding `(content, timestamp, source)` triples into the Instant Recall index above it. But interface compatibility does not prove deployment integration. The six-request, zero-token-saved case in §2.4 shows why any claim that the stack is live must include a traffic-path liveness count.",
   "marked": "It is worth distinguishing Instant Recall from a context-compression layer such as headroom's CCR (§2.4), because the two are easy to confuse as competitors when they are [-in fact stacked.-] {+stacked by design.+} A compression layer answers \"how do I fit selected content into the window losslessly\"; Instant Recall answers \"which of months of stored content should be selected at all.\" Compression operates on the active working set of a single run and is specialized by content type (JSON, code, logs); Instant Recall operates on the persistent cross-session store and is specialized by concept anchor. They [-compose cleanly:-] {+can compose:+} CCR-style reversible compression as the storage layer (§1.1) feeding `(content, timestamp, source)` triples into the Instant Recall index above it. [-Treating compression as-] {+But interface compatibility does not prove deployment integration. The six-request, zero-token-saved case in §2.4 shows why any claim that the stack is live must include+} a [-design *alternative* would be a category error; it is a substrate.-] {+traffic-path liveness count.+}"
  },
  {
   "section": "7.5 Threats to Validity",
   "old": null,
   "new": "**Source enumeration and downstream pipeline validity.** The 47,392-chunk benchmark enumerates the personal-assistant stores listed in §7.1; it does not establish that every deployment source is indexable. The independent coding-agent audit found Bash output accounting for about 47% of tool traffic, while the build contract assumes enumerable chunks. In addition, retrieval metrics do not capture whether prompt assembly destroys cache reuse or whether a mismeasured compaction gate removes retrieved chunks. End-to-end evaluation should therefore report source exclusions, cache writes, compactions, and index-lookup counts alongside CORF metrics.",
   "marked": "{+**Source enumeration and downstream pipeline validity.** The 47,392-chunk benchmark enumerates the personal-assistant stores listed in §7.1; it does not establish that every deployment source is indexable. The independent coding-agent audit found Bash output accounting for about 47% of tool traffic, while the build contract assumes enumerable chunks. In addition, retrieval metrics do not capture whether prompt assembly destroys cache reuse or whether a mismeasured compaction gate removes retrieved chunks. End-to-end evaluation should therefore report source exclusions, cache writes, compactions, and index-lookup counts alongside CORF metrics.+}"
  },
  {
   "section": "8.1 Limitations and Mitigation Strategies",
   "old": null,
   "new": "**Prompt-budget coupling.** K is constrained not only by anchor specificity but by the resident prompt around the retrieved chunks. The 52,116-token context anatomy reported in §4.13 left 28,387 tokens (54.5%) to conversation history after a 23,731-token always-loaded floor. Adaptive K should therefore accept the measured per-call residual budget as an input rather than assume a fixed amount of available context.",
   "marked": "{+**Prompt-budget coupling.** K is constrained not only by anchor specificity but by the resident prompt around the retrieved chunks. The 52,116-token context anatomy reported in §4.13 left 28,387 tokens (54.5%) to conversation history after a 23,731-token always-loaded floor. Adaptive K should therefore accept the measured per-call residual budget as an input rather than assume a fixed amount of available context.+}"
  },
  {
   "section": "8.4 Reproducibility",
   "old": "The annotated CORF dataset is drawn from one deployment's logs and is small, which §7.5 flags as the paper's central validity threat. Adjacent open-source systems show the higher bar is reachable: headroom (§2.4) ships a runnable accuracy-eval harness (`python -m headroom.evals`) over public datasets (GSM8K, TruthfulQA, SQuAD, BFCL) and reports an accuracy-delta number anyone can re-run, and marketingskills (§5.3) ships per-skill runnable eval files. We therefore treat reproducibility as a bar to clear rather than a plan to gesture at. The planned synthetic CORF generator — seeding pronoun-blind, source-split, and anchor-silent queries against a controlled corpus — should ship as a `python -m`-style runnable suite that reports CORF-Recall@20, FPR, and latency on a *public* controlled corpus, so that the headline 0.85@54ms numbers no longer rest entirely on one user's private logs. The synthetic set would not replace the deployment benchmark but would make the failure-mode taxonomy testable in isolation by anyone, which is the property the §7.5 threat-to-validity currently lacks.",
   "new": "The annotated CORF dataset is drawn from one deployment's logs and is small, which §7.5 flags as the paper's central validity threat. Adjacent open-source systems show the higher bar is reachable: headroom (§2.4) ships a runnable accuracy-eval harness (`python -m headroom.evals`) over public datasets (GSM8K, TruthfulQA, SQuAD, BFCL) and reports an accuracy-delta number anyone can re-run, and marketingskills (§5.3) ships per-skill runnable eval files. We therefore treat reproducibility as a bar to clear rather than a plan to gesture at. The planned synthetic CORF generator — seeding pronoun-blind, source-split, and anchor-silent queries against a controlled corpus — should ship as a `python -m`-style runnable suite that reports CORF-Recall@20, FPR, and latency on a *public* controlled corpus, so that the headline 0.85@54ms numbers no longer rest entirely on one user's private logs. The suite must also assert integration liveness: number of index lookups fired, fraction of queries traversing the retrieval layer, enumerated and excluded source classes, and whether any downstream compaction removed retrieved chunks. The synthetic set would not replace the deployment benchmark but would make both the failure-mode taxonomy and the traffic-path contract testable in isolation, which is the property the §7.5 threat-to-validity currently lacks.",
   "marked": "The annotated CORF dataset is drawn from one deployment's logs and is small, which §7.5 flags as the paper's central validity threat. Adjacent open-source systems show the higher bar is reachable: headroom (§2.4) ships a runnable accuracy-eval harness (`python -m headroom.evals`) over public datasets (GSM8K, TruthfulQA, SQuAD, BFCL) and reports an accuracy-delta number anyone can re-run, and marketingskills (§5.3) ships per-skill runnable eval files. We therefore treat reproducibility as a bar to clear rather than a plan to gesture at. The planned synthetic CORF generator — seeding pronoun-blind, source-split, and anchor-silent queries against a controlled corpus — should ship as a `python -m`-style runnable suite that reports CORF-Recall@20, FPR, and latency on a *public* controlled corpus, so that the headline 0.85@54ms numbers no longer rest entirely on one user's private logs. The {+suite must also assert integration liveness: number of index lookups fired, fraction of queries traversing the retrieval layer, enumerated and excluded source classes, and whether any downstream compaction removed retrieved chunks. The+} synthetic set would not replace the deployment benchmark but would make {+both+} the failure-mode taxonomy {+and the traffic-path contract+} testable in [-isolation by anyone,-] {+isolation,+} which is the property the §7.5 threat-to-validity currently lacks."
  }
 ]
}
