Coding / AI Engineering / Context Engineering / billion-context
CHAPTER 11 / 11 · CONTEXT ENGINEERING
Recovery
Follow the references back to the source.
Recovery works because Fold preserves source references. As compression becomes hierarchical, these references propagate vertically and form a lineage. Recovery follows that lineage back to the retained raw messages.
VISUAL STUDY / SOURCE LINEAGE / RECOVERY
Follow the references back to m3.
The same m1–m10 history from Fold. Arrows below point from a summary to its retained sources.
sources: [S1, S2]Hierarchical Compression folds S1 and S2 into H1 while preserving their source relationships.
THE PRESERVED LINEAGE
H1→S1→m1 · m2 · m3 · m4H1→S2→m5 · m6 · m7Follow H1’s reference to S1, resolve S1’s reference to m3, then retrieve the retained original message.
H1→S1→m3→original raw contentS1, S2 and H1 are teaching labels for summary blocks. The route illustrates provenance; an implementation may use recorded original-message coverage or cached originals to retrieve directly.
THE NOTEBOOK
Concise learning notes · source-grounded mechanisms1. Fold creates source references
The same m1–m10 history continues here. Fold summarizes m1–m4 as S1 and m5–m7 as S2. m8–m10 remain raw. Each summary records the original messages it covers: S1.sources: [m1, m2, m3, m4] and S2.sources: [m5, m6, m7].
A source reference is the source relationship preserved during a local fold. The summary carries the concise account; the reference identifies where its original detail is retained.
2. Hierarchical Compression forms lineage
When S1 and S2 are compressed again into H1, H1 records references to both child summaries. Their own source relationships remain available. These references propagate vertically through the hierarchy and form lineage: the connected source paths from H1 through S1 or S2 to the original messages.
Source references → hierarchical propagation → lineage.
3. Recovery follows lineage to retained sources
Suppose the current task needs the exact command mentioned in m3. Follow H1 → S1 → m3, then retrieve the original message and bring its content into the working context.
The path shows the source relationships. The reviewed implementation can use recorded original-message coverage or cached originals to read the content directly; it need not perform a separate read for every illustrated arrow. A source read can return a historical copy while the summary remains folded.
Recovery is retrieval through provenance, not decompression in the information-theoretic sense. Exact detail comes from retained raw content. The summary alone cannot reconstruct an omitted command.
| Chapter | Role |
|---|---|
| Fold ↗ | Creates source references |
| Hierarchical Compression ↗ | Propagates source references and forms lineage |
| Recovery | Follows lineage back to retained sources |
FOLLOW THE SOURCE
Reviewed source: billion-context 0.1.180 / 03d27f9. The notes are Lawson’s learning interpretation of the reviewed repository.