[codex] document ordvec C API#102
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Code Review
This pull request updates the documentation and threat model to support the new C ABI and Go FFI bindings, including a new C API guide with a minimal example. The review feedback points out a potential buffer over-read in the C example if the index dimension exceeds the stack-allocated query buffer size, and notes that the threat register table in THREAT_MODEL.md needs to be updated to match the newly added and renumbered threat IDs.
c0288e2 to
fe55297
Compare
419bbde to
d3b94f5
Compare
Review Summary by QodoDocument ordvec C API with comprehensive guide and threat model updates
WalkthroughsDescription• Add comprehensive C API documentation covering build, linking, and usage • Document ABI contracts, search modes, stats, threading, and v1 exclusions • Update threat model to cover C ABI and Go wrapper FFI boundaries • Link C API docs from README and update status date Diagramflowchart LR
A["C API Documentation"] --> B["Build & Link Instructions"]
A --> C["Minimal Example Code"]
A --> D["ABI Contracts & Semantics"]
A --> E["Search Modes & Stats"]
A --> F["Threading & V1 Exclusions"]
G["Threat Model Updates"] --> H["C ABI Defenses"]
G --> I["Go FFI Boundary"]
G --> J["FFI Threat Scenarios"]
K["README"] --> L["Link to C API Docs"]
File Changes1. docs/c-api.md
|
Code Review by Qodo
1. Unsafe query buffer example
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fe55297e8f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
Adds first-party documentation for the ordvec-ffi C ABI and updates repository docs to reflect the new FFI surfaces (C ABI and planned Go wrapper boundary) in the threat model.
Changes:
- Introduces
docs/c-api.mdwith build/link instructions, a C usage example, and ABI v1 contracts (search modes, error/status semantics, stats, threading, exclusions). - Links the new C API documentation from
README.md. - Expands
THREAT_MODEL.mdFFI coverage to include the C ABI and Go wrapper boundary, with additional threat entries and mitigations.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| THREAT_MODEL.md | Updates threat model scope and adds an FFI threat section covering C ABI (and Go wrapper notes). |
| README.md | Adds a documentation link to the new C ABI docs. |
| docs/c-api.md | New C API documentation including a minimal C example and ABI v1 contract details. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d3b94f5 to
2760c18
Compare
fe55297 to
1c90f12
Compare
Signed-off-by: Nelson Spence <nelson@projectnavi.ai>
2760c18 to
a678e27
Compare
1c90f12 to
22cb986
Compare
|
Addressed the remaining bot findings for this PR:
Validation run locally on the stacked branch: |
Summary
docs/c-api.mdcovering build/link instructions, a full C example, search modes, status/error semantics, stats, row IDs, lifetimes, thread safety, and v1 exclusionsValidation
cargo fmt --all --checkcbindgen ordvec-ffi --config ordvec-ffi/cbindgen.toml --output ordvec-ffi/include/ordvec.h --verifycargo testcargo test -p ordvec-fficargo clippy --all-targets -- -D warningscargo clippy -p ordvec-ffi --all-targets -- -D warningscargo build -p ordvec-ffiGOCACHE=/tmp/go-build go test -count=1 ./...andGOCACHE=/tmp/go-build go test -race -count=1 ./...fromordvec-goStack base: PR #101 /
codex/c-abi-ffi. Next PR in stack:codex/go-wrapper.