Context
ordgraph-proto currently carries local RankQuant-shaped bucket-code primitives (CompositionSpec, RankQuantSpec, BucketCode) in src/code.rs. That code is kernel-level ordinal encoding machinery, not graph/event semantics.
OrdGraph should consume declared codes/evidence, not own the implementation of how RankQuant bucket codes are produced or validated.
Proposed ownership
Move/replace this functionality in ordvec, which already owns ordinal/sign quantization and RankQuant.
Acceptance criteria
- Expose a reusable API for deriving/validating bucket codes from ranks or vectors without requiring callers to build a full retrieval index.
- Cover fixed-composition validation:
dim, bits, bucket count, per-bucket count, malformed bucket payloads, duplicate/out-of-range ranks.
- Provide stable error types suitable for downstream crates.
- Add parity tests against the current
ordgraph-proto/src/code.rs behavior before the local copy is removed.
- Document intended downstream use by evidence systems such as OrdGraph.
Migration note
Once this lands, ordgraph should depend on the ordvec API for code production/parity checks or only ingest already-declared code artifacts.
Draft source: /home/ndspence/Downloads/ordgraph_extraction_issue_queue.md
Context
ordgraph-protocurrently carries local RankQuant-shaped bucket-code primitives (CompositionSpec,RankQuantSpec,BucketCode) insrc/code.rs. That code is kernel-level ordinal encoding machinery, not graph/event semantics.OrdGraph should consume declared codes/evidence, not own the implementation of how RankQuant bucket codes are produced or validated.
Proposed ownership
Move/replace this functionality in
ordvec, which already owns ordinal/sign quantization and RankQuant.Acceptance criteria
dim,bits, bucket count, per-bucket count, malformed bucket payloads, duplicate/out-of-range ranks.ordgraph-proto/src/code.rsbehavior before the local copy is removed.Migration note
Once this lands,
ordgraphshould depend on theordvecAPI for code production/parity checks or only ingest already-declared code artifacts.Draft source:
/home/ndspence/Downloads/ordgraph_extraction_issue_queue.md