Knolo KIP-0004: V4 to V5 Migration With the Same Bytes and the Same Receipt
Knolo KIP-0004 defines how a V4 pack becomes a V5 Knowledge Image: verify the source first, keep every block traceable, and produce identical bytes and receipts in every runtime.
Knolo is the open-source, local-first Knowledge Image runtime and format (Apache-2.0, @knolo/core on npm). Formats change. What an open format owes its users is a migration path that anyone can check. In Knolo that path is written down in KIP-0004, V4 to V5 migration, in the specification folder of the Knolo GitHub repo.
A note on status: the Knolo KIP index on knolo.org currently shows labeled example records, not accepted standards. KIP-0004 in the repo is marked "implemented foundation contract". It describes what the runtimes do today; it has not been through a public acceptance process.
Knolo migration starts by verifying the source
KIP-0004 does not convert first and check later. Migration first mounts and verifies the complete V4 source artifact. The receipt records sourceDigest as the SHA-256 of the raw source bytes (sha256-<hex>). Using the raw bytes, not a parsed view, keeps that identity stable across the TypeScript and Rust readers.
A Knolo genesis commit with a named actor
The new V5 image starts with a genesis commit whose actor is knolo-v4-migrator, with no parents and sequence 1. It follows the standard V5 rules for the schema, policy, runtime, transaction, object, event and view roots. Anyone reading the history can see that the image came from a migration and not from a fresh build.
Every Knolo V4 block stays traceable
Each legacy block becomes two objects:
- a
sourceobject with the original block text and the legacy block metadata; - a
chunkobject with the same bytes plus heading, span, namespace and source identity metadata.
Claims and agent registries, when present, are imported as traceable json-v4 objects, and a metadata object records the source digest and source version. Nothing from the old pack is silently dropped or rewritten without a trail back to where it came from.
The Knolo migration receipt
The receipt body is a canonical CBOR map with version, kind, sourceDigest, sourceVersion, stateRoot and the sorted legacy block identity mappings. Its receiptDigest is the knolo:receipt:v1 digest of that body. Canonical encoding matters here: two implementations that agree on the map must agree on the bytes, which is the subject of KIP-0003.
Why determinism is the Knolo standard
The last line of KIP-0004 is the one that makes it a standard rather than a tool: migration is deterministic and idempotent. The same verified source bytes must produce identical V5 image bytes and identical receipt bytes in both runtimes. That means:
- a third party can rerun the migration and compare digests instead of trusting the person who ran it;
- a pin taken on a migrated image is reproducible from the original pack;
- a second implementation can prove compatibility with evidence, the approach described on the Knolo compatibility page.
Verification proves integrity, not truth. A migrated image is exactly as accurate as the pack it came from, and the receipt says which pack that was.
Read more
- Knolo migration docs on knolo.dev and the Knolo V5 concepts.
- Knolo specifications on knolo.org and the Knolo project lifecycle.
- The full KIP set lives in the Knolo knolo-core repo on GitHub.
knolo · kip · specification · migration · knowledge-image · open-source
