Expand description
The P3.5 decide contract, stubbed: Flight SQL prepared statements that pin a
question set plus the (schema, model, calib) version triple, bind batches of states,
and return DecisionSchema-conformant Arrow batches.
Contract shape (what P3.5 will implement for real on hyprstream-flight):
- Create:
CreatePreparedStatementwhose query text is a JSON decide document:{"questions": {…jev-1 question map…}, "schema_version": "…", "calib_version": …, "model": "…"}.schema_versionis required (the triple is pinned at prepare time, per P3.5);modeldefaults to the stub alias and resolves to the versioned id;calib_versionmay be null (uncalibrated). The returned handle is the blake3 hash of the canonical decide document, so identical documents share a statement. - Parameter schema: a single non-null
state: utf8column —decide(schema, batch)where the batch is one state per row. - Dataset schema: the P0.1a
DecisionSchemaArrow schema — per-questionfixed_size_list<f32>probabilities withjev.kind/jev.labelsfield metadata, label, reserved conformal-set column, and the version-triple columns. - Drift fails loudly: an unknown (or closed) handle is
not_found; a decide document whose question ids are not identifier-safe for the columnar surface isinvalid_argumentat create time (P0.1a’s Arrow contract). - Execute: bound states are mock-answered row by row and emitted as one
RecordBatchviaDecisionSchema::build_batch— producer tolerance (D5) enforced by construction.
Structs§
- Decide
Flight SqlService - The stub Flight SQL service. Stateless apart from the prepared-statement table.
Constants§
- STATE_
PARAMETER - Name of the single parameter column: one state per row of the bound batch.
Functions§
- decide_
document - Standalone decide-document builder used by tests and the SDK-less contract check.
- serve
- Serve the stub Flight SQL endpoint on
listenerin the background.