Multi-generation rewrite chain with large excerpt checkpoints
Run
harbor run -t fritzprix/compaction-mutchain-v1
Download
harbor download fritzprix/compaction-mutchain-v1
Details
Revision
1
Published
Oct 8, 2026
Visibility
Public
Authors
fritzprix
Content hash
Keywords
compaction
long-horizon
libragent
repro
Mutation chain
You are in /app.
Phase A
Read /app/seed/facts.json and write /app/work/phase_a_ack.json
with fields chain_id, salt copied exactly.
Phase B — generations
Start from /app/base/gen_00.txt (generation 0).
Build generations 1 .. N where N is given in /app/MUTCHAIN.md.
Rules for producing /app/work/gen_XX.txt from the previous
generation file are also in MUTCHAIN.md (deterministic).
After each generation g (including verifying gen_00), write
/app/work/meta_XX.json:
json
{
"gen": <int>,
"path": "work/gen_XX.txt",
"line_count": <int>,
"sha256": "<hex of full file bytes>",
"excerpt_start": <int>,
"excerpt": "<verbatim EXCERPT_LINES lines joined by \n>",
"prev_sha256": "<sha256 of previous gen file, or null for 0>"
}
For g>0, read the previous meta (or file) to fill prev_sha256.
Phase C
Write /app/work/chain.json:
json
{
"chain_id": "<seed>",
"salt": "<seed>",
"generations": <N+1 total including 0>,
"sha_chain": ["<sha gen0>", "<sha gen1>", "..."]
}
Done
Leave all work/gen_*.txt, work/meta_*.json, and work/chain.json.