[codex] add manifest verifier#104
Conversation
Signed-off-by: Nelson Spence <nelson@projectnavi.ai>
24e57b4 to
13b28f9
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces probe_index_metadata to inspect persisted index headers without allocating payloads, and adds ordvec-manifest, a repo-local sidecar verifier crate that validates index files against a JSON manifest schema. The feedback recommends wrapping the manifest file in a BufReader to optimize JSON deserialization performance, and suggests creating the output parent directory in create_manifest_for_index before canonicalization to prevent path resolution failures when the directory does not yet exist.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
/agentic_review |
Code Review by Qodo
1.
|
There was a problem hiding this comment.
Pull request overview
Adds a sidecar manifest verifier for ordvec indexes. Introduces an allocation-resistant header-metadata probe in the core crate (probe_index_metadata over Rank/RankQuant/Bitmap/SignBitmap) and a new publish=false workspace crate ordvec-manifest that binds an index file to a strict v1 JSON manifest via SHA-256, header re-probe, row-identity checks, and attestation shape checks, with a CLI and optional SQLite registry/cache.
Changes:
- Add
IndexKind/IndexParams/IndexMetadataandprobe_index_metadatato the core crate, validating header, declared shape, and exact file length without allocating the payload. - Add the
ordvec-manifestworkspace crate (library + CLI + optionalsqlitefeature) implementing schema validation, path policy, artifact verification, JSONL row identity checks, and attestation shape checks. - Wire the new crate into the workspace, lockfile, threat model, provenance docs, README, changelog, dependabot, and a dedicated CI lane.
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/rank_io.rs | Adds metadata-probe types and probe_index_metadata for all four persisted formats with header/shape/file-length checks and tests. |
| src/lib.rs | Re-exports the new probe API. |
| ordvec-manifest/Cargo.toml | Defines the new publish=false crate, deps, and sqlite / sqlite-bundled features. |
| ordvec-manifest/src/lib.rs | Implements manifest schema, verification flow, path policy, attestation shape checks, hashing, and manifest creation. |
| ordvec-manifest/src/sqlite.rs | Optional registry/cache: verify_with_registry and activate over a SQLite store. |
| ordvec-manifest/src/main.rs | CLI: hash, inspect, verify, create, and `sqlite verify |
| ordvec-manifest/tests/manifest.rs | End-to-end tests covering create/verify, schema strictness, path policy, JSONL rules, attestations, CLI, and SQLite. |
| ordvec-manifest/README.md | Short usage doc for the sidecar verifier. |
| Cargo.toml | Adds ordvec-manifest workspace member; updates workspace comment. |
| Cargo.lock | New transitive deps (chrono, clap, sha2, rusqlite, tempfile, etc.). |
| .github/workflows/ci.yml | Adds a dedicated manifest-verifier CI lane (no-default-features, all-features, clippy). |
| .github/dependabot.yml | Updates comment to mention the new workspace member. |
| docs/INDEX_PROVENANCE.md | Documents the verifier as a pre-load provenance check and its boundaries. |
| THREAT_MODEL.md | Adds the manifest-verification trust boundary; updates non-shipping-crypto framing. |
| README.md | Points users to the new verifier crate and updates the pre-load story. |
| CHANGELOG.md | Notes the new probe API, new crate, and updated provenance docs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Nelson Spence <nelson@projectnavi.ai>
|
Remediation pushed in Addressed bot findings:
Validation run:
All actionable inline review threads have been replied to and resolved. |
Signed-off-by: Nelson Spence <nelson@projectnavi.ai>
|
Follow-up merge-gate remediation pushed in Addressed:
Local validation:
|
Signed-off-by: Nelson Spence <nelson@projectnavi.ai>
Signed-off-by: Nelson Spence <nelson@projectnavi.ai>
|
Calibration follow-up pushed in Added:
Also fixed the CI-only Local validation:
Current PR head is green from the checks view; only the scheduled weekly fuzz lane is skipped as expected. Existing inline review threads are resolved. |
Signed-off-by: Nelson Spence <nelson@projectnavi.ai>
|
Calibration semantics follow-up pushed in Addressed the remaining schema concern:
Local validation:
|
|
Final PR104 remediation status for head
|
Summary
ordvec-manifestworkspace crate with strict v1 schema handling, path policy, artifact verification, row identity checks, attestation shape checks, CLI, and optional SQLite registry/cache supportValidation
cargo fmt --all --checkgit diff --checkcargo test -p ordvec-manifest --no-default-featurescargo test -p ordvec-manifest --all-featurescargo clippy -p ordvec-manifest --all-targets --all-features -- -D warningscargo test -p ordvec --no-default-featurescargo clippy -p ordvec --all-targets --all-features -- -D warnings