Expand description
Dynamic questions (spec 019): pure request validation, canonical identity, capability fit, cost admission and response judgment.
Nothing here reads a clock, performs I/O or dispatches: the runtime’s
ask_dynamic is the only execution entry point (3.1). No type here
converts into a plan value, a crate::evaluate::Supplied output or a
judgment, so a dynamic result cannot enter staged evaluation:
ⓘ
fn launder(o: DynamicOutcome) -> Supplied { o.into() }ⓘ
fn launder(raw: DynamicRawOutput) -> Supplied { Supplied::Output(raw) }ⓘ
fn launder(ev: &mut Evaluation<'_>, p: DynamicProposal) {
let _ = ev.supply("step", &[], p);
}ⓘ
fn launder(o: DynamicOutcome) -> Judgment { Judgment::from(o) }ⓘ
// A validated question is built only by `validate`.
fn forge(q: DynamicQuestion) -> ValidatedQuestion { ValidatedQuestion { q } }Negative control: the same shapes compile with a plan’s own types, so each refusal above is the type boundary, not a typo.
fn plan_output(raw: RawOutput) -> Supplied { Supplied::Output(raw) }
fn supply(ev: &mut Evaluation<'_>, s: Supplied) {
let _ = ev.supply("step", &[], s);
}
fn dynamic_types_exist(_: DynamicOutcome, _: DynamicRawOutput, _: DynamicProposal) {}Structs§
- Judged
- The exact judgment of one raw output (3.3, 3.5): validation, abstention, and an answer or a named unresolved reason.
- Validated
Question - A request that passed validation against a host allowlist. Only
validatebuilds one, so the runtime accepts nothing else (3.1).
Enums§
- Dynamic
Request Error - Why a request failed validation (3.2). Nothing was dispatched.
Constants§
- DISTRIBUTION_
TOLERANCE - The tolerance a returned distribution’s masses must sum to 1 within.
Fixed by this implementation (spec 019 declares no per-request
tolerance); it equals the reference plans’
distribution_tolerance.
Functions§
- admit
- Whether a declared capability can answer the request exactly as asked,
without truncation (3.4).
Noneis a backend with no dynamic capability: its registered-plan descriptor never suffices. - admit_
cost - The units to reserve for the one attempt, or why it cannot be dispatched (3.5): only an enforceable bound at or below the hard cap is admitted. Unknown exposure and estimates are refused.
- judge
- Judge what the backend returned against the request and the capability (3.3, 3.5). Anything outside the declared labels, levels, value kind and exact support is invalid; response material that is not an answer is invalid and never acted on; a pinned served identity that differs is unresolved. Nothing is substituted for an unresolved result.
- parse_
question - Parse and validate request bytes (3.2).
- projection
- The canonical projection bytes a dynamic backend receives (3.3).
- proposal
- A proposal for an accepted answer (3.6): always
model-derived, with the request and the backend output in its lineage; the exact steps that ran are listed, never a relabeling.validatealways ran;abstentionis listed only when thresholds were applied, so a label accepted under the explicitlabel_onlyposture, where no abstention rule runs (AbstentionDecision::LabelOnly), listsvalidatealone. - qualifiable
- Whether a backend is eligible for qualification under its declaration (3.4): hidden output-affecting state makes it ineligible.
- request_
identity - The canonical request identity under
capability’s template and preprocessing (3.4). - validate
- Validate a request (3.2): its structural bounds, the labels its operation takes, the output kinds the operation allows, the abstention posture, positive bounds, and the host’s task-family allowlist.