You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ADR-009 §2.1 states the Level-0 root manifest "is exactly 4096 bytes and occupies the final 4096 bytes of the latest manifest payload," and acceptance criterion 3 is "Tail scanning locates a valid manifest without reading a fixed header at offset zero." An independent implementor reading ADR-009 as normative — which §2.4 explicitly instructs — will write a reader that finds nothing in a real CLI-produced file.
The cause looks structural: there are two writer paths in the tree.
rvf-runtime — the crate behind rvf-cli, which produces actual files — has its own write_manifest (store.rs:3582) emitting MANIFEST segments, and its Cargo.toml does not depend on rvf-wire or rvf-manifest at all. It has its own find_latest_manifest (read_path.rs:49) that scans for manifest segments, not a Level-0 root.
Both paths agree on the segment magic and 64-byte alignment, so they aren't in conflict there — but only one produces the root manifest ADR-009 describes as the source of truth.
Note a 2304-byte container is smaller than a single 4096-byte root manifest, so small files can't carry one by construction. That itself deserves to be stated in the spec.
Suggested resolution
Either:
Amend ADR-009 to describe both layouts — say plainly that the Level-0 root manifest is optional/absent in runtime-produced containers, that rvf-runtime is also a normative source, and how a reader should behave when no root manifest exists (fall back to the newest MANIFEST segment); or
Make rvf-runtime emit a root manifest so the shipped writer matches the declared contract.
(1) is cheaper and reflects reality; (2) makes the format uniform. Either way the ADR and the shipped writer should stop disagreeing — that inconsistency is precisely what ADR-009 was written to eliminate.
Golden vectors from #769 are unaffected: they test rvf-wire's codec, which is correct on its own terms.
Found while building an independent RVF parser for rvQR against ADR-009 as the normative spec.
What I observed
A container produced by the shipped CLI (
rvf create -d 16 -m cosine+rvf ingest, 24 vectors, 2304 bytes) contains:53 46 56 52at offsets 0, 162, 1960, 2092 (4 segments: MANIFEST, VEC, WITNESS, MANIFEST)30 4D 56 52: zero occurrencesWhy this matters
ADR-009 §2.1 states the Level-0 root manifest "is exactly 4096 bytes and occupies the final 4096 bytes of the latest manifest payload," and acceptance criterion 3 is "Tail scanning locates a valid manifest without reading a fixed header at offset zero." An independent implementor reading ADR-009 as normative — which §2.4 explicitly instructs — will write a reader that finds nothing in a real CLI-produced file.
The cause looks structural: there are two writer paths in the tree.
rvf-wire+rvf-manifestown the 4096-byteLevel0Rootcodec (manifest_codec.rs:172 write_root_manifest), tail discovery, and the golden vectors added in docs+feat(rvf): ADR-009 — RVF v1 wire contract, exact magic bytes, golden vectors, CI gate #769.rvf-runtime— the crate behindrvf-cli, which produces actual files — has its ownwrite_manifest(store.rs:3582) emitting MANIFEST segments, and itsCargo.tomldoes not depend onrvf-wireorrvf-manifestat all. It has its ownfind_latest_manifest(read_path.rs:49) that scans for manifest segments, not a Level-0 root.Both paths agree on the segment magic and 64-byte alignment, so they aren't in conflict there — but only one produces the root manifest ADR-009 describes as the source of truth.
Note a 2304-byte container is smaller than a single 4096-byte root manifest, so small files can't carry one by construction. That itself deserves to be stated in the spec.
Suggested resolution
Either:
rvf-runtimeis also a normative source, and how a reader should behave when no root manifest exists (fall back to the newest MANIFEST segment); orrvf-runtimeemit a root manifest so the shipped writer matches the declared contract.(1) is cheaper and reflects reality; (2) makes the format uniform. Either way the ADR and the shipped writer should stop disagreeing — that inconsistency is precisely what ADR-009 was written to eliminate.
Golden vectors from #769 are unaffected: they test
rvf-wire's codec, which is correct on its own terms.🤖 Generated with claude-flow