Skip to content

Expose reusable RankQuant bucket-code API for downstream evidence systems #220

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions