Skip to content

Commit 5bd7a2a

Browse files
Add manifest auxiliary artifact verification
Signed-off-by: Nelson Spence <nelson@projectnavi.ai>
1 parent 52c6615 commit 5bd7a2a

8 files changed

Lines changed: 701 additions & 44 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
manifest JSON size, row-identity JSONL line length, row count,
1414
duplicate-tracking memory, report issue count, and SQLite cached report size.
1515

16+
### Added
17+
18+
- Added named auxiliary artifact verification to `ordvec-manifest`, including
19+
required/optional sidecar states, path/size/SHA-256 checks, deterministic
20+
report entries, and SQLite cache invalidation for declared sidecar bytes.
21+
1622
## 0.3.0 - 2026-05-29
1723

1824
### Added

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,9 +267,10 @@ structurally valid file can still be untrusted. If an index file crosses a
267267
trust boundary (network transfer, shared storage), verify it before loading.
268268
The full GitHub checkout includes a publish=false sidecar CLI,
269269
`ordvec-manifest`, that binds an index file to a JSON manifest by SHA-256,
270-
header metadata, row identity, and attestation shape checks. It does not sign
271-
artifacts, manage keys, or decide deployment trust policy. No in-format crypto
272-
is shipped because it would add key management the library can't own. See
270+
header metadata, row identity, named auxiliary sidecars, and attestation shape
271+
checks. It does not sign artifacts, manage keys, or decide deployment trust
272+
policy. No in-format crypto is shipped because it would add key management the
273+
library can't own. See
273274
[`docs/INDEX_PROVENANCE.md`](https://github.com/Fieldnote-Echo/ordvec/blob/main/docs/INDEX_PROVENANCE.md)
274275
and [`THREAT_MODEL.md`](https://github.com/Fieldnote-Echo/ordvec/blob/main/THREAT_MODEL.md)
275276
in the full repository.

docs/INDEX_PROVENANCE.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,23 @@ The manifest verifier checks:
6464
- row identity, either explicit `row_id_identity` or a strict JSONL row map
6565
whose `row_id` equals the zero-based line number and whose `db_id` is
6666
non-empty, NUL-free, and unique by default;
67+
- declared auxiliary artifacts, checking each caller-named sidecar's path,
68+
SHA-256 digest, and byte length under the same default path policy as the
69+
primary index artifact;
6770
- optional `calibration` profile references, checking profile identity,
6871
path/hash integrity, encoder identity, and ordinalization compatibility;
6972
- attestation **shape** only: predicate type, builder id when present, and at
7073
least one subject SHA-256 matching the artifact when attestations are
7174
supplied.
7275

76+
Auxiliary artifacts are for application-owned sidecars such as metadata,
77+
secondary indexes, or stores that a caller intends to load together with the
78+
ordvec index. The verifier does not interpret those bytes; it only reports
79+
whether declared required members were verified, whether optional members were
80+
present or absent, and whether any declared member failed path, size, or digest
81+
checks. Callers should load sidecars only after the relevant declaration is
82+
verified.
83+
7384
When present, `calibration` binds an index artifact to a hashed ordinal profile
7485
used to interpret overlap, bucket, sign, or rank evidence under a calibrated
7586
null. The verifier checks profile identity, path/hash integrity, encoder

ordvec-manifest/README.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
Repo-local, publish=false sidecar verifier for ordvec index manifests.
44

5-
It verifies index bytes, probed header metadata, row identity, optional
6-
calibration profile references, and attestation shape before a caller loads an
7-
ordvec index. It does not sign artifacts, manage keys, call networks, mutate
8-
index files, decide deployment trust policy, compute calibration statistics, or
9-
change the C ABI.
5+
It verifies index bytes, probed header metadata, row identity, named auxiliary
6+
artifacts, optional calibration profile references, and attestation shape before
7+
a caller loads an ordvec index. It does not sign artifacts, manage keys, call
8+
networks, mutate index files, decide deployment trust policy, compute
9+
calibration statistics, or change the C ABI.
1010

1111
```sh
1212
cargo run -p ordvec-manifest -- create \
@@ -54,11 +54,21 @@ returned or cached. These limits bound metadata parsing and report/cache
5454
growth; hashing an index or calibration profile is still proportional to the
5555
artifact bytes being verified.
5656

57+
Manifests may declare `auxiliary_artifacts` for caller-owned sidecars that
58+
should be integrity-checked with the same path policy as the primary index.
59+
Each entry has a stable `name`, relative `path`, lowercase SHA-256 digest,
60+
`file_size_bytes`, and a `required` flag that defaults to `true`. Required
61+
members fail verification when missing, tampered, size-mismatched, or rejected
62+
by path policy. Optional members are reported as verified when present or as
63+
`optional_absent` with a stable reason code when absent. The verifier checks
64+
bytes only; application semantics remain with the caller.
65+
5766
With `--features sqlite`, the `sqlite verify` and `sqlite activate` subcommands
5867
add a local cache/audit log plus one active-manifest pointer. This is not a
5968
full named registry. `sqlite verify --use-cache` reuses only reports whose
60-
manifest, verification options, artifact bytes, row-identity bytes, and
61-
calibration profile bytes still match; otherwise it runs fresh verification and
62-
stores a new report. `sqlite activate --force` writes the active pointer even
63-
when verification fails, emits a `sqlite_activation_forced` warning in JSON
64-
output, and exits zero because it did mutate activation state.
69+
manifest, verification options, artifact bytes, row-identity bytes,
70+
calibration profile bytes, and declared auxiliary artifact states/bytes still
71+
match; otherwise it runs fresh verification and stores a new report.
72+
`sqlite activate --force` writes the active pointer even when verification
73+
fails, emits a `sqlite_activation_forced` warning in JSON output, and exits zero
74+
because it did mutate activation state.

0 commit comments

Comments
 (0)