Skip to main content

Module flight

Module flight 

Source
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: CreatePreparedStatement whose query text is a JSON decide document: {"questions": {…jev-1 question map…}, "schema_version": "…", "calib_version": …, "model": "…"}. schema_version is required (the triple is pinned at prepare time, per P3.5); model defaults to the stub alias and resolves to the versioned id; calib_version may 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: utf8 column — decide(schema, batch) where the batch is one state per row.
  • Dataset schema: the P0.1a DecisionSchema Arrow schema — per-question fixed_size_list<f32> probabilities with jev.kind/jev.labels field 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 is invalid_argument at create time (P0.1a’s Arrow contract).
  • Execute: bound states are mock-answered row by row and emitted as one RecordBatch via DecisionSchema::build_batch — producer tolerance (D5) enforced by construction.

Structs§

DecideFlightSqlService
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 listener in the background.