Run a bounded synthetic case pack against a stored policy version
Executes an independently authored case pack against the rules stored on this policy version, in process, and returns the per-case results.
SYNTHETIC. No decision, receipt, policy snapshot or audit row is created, nothing is signed and nothing is persisted. The response carries no integrity_hash, no signature and no decision id — it is not receipt-shaped and cannot be presented as a real evaluation. Non-billing, and rate-limited under the standard per-tenant/per-key tier.
RECORDS what the stored rules did for each supplied case at the supplied evaluation_time, how that compares to the case’s expectation, and — in evaluated — WHICH candidate ran: the policy_id, version and stored draft_revision of the version row those rules were read from, in the same statement. It is an identity, not an attestation: there is no hash, no signature and no lock behind it.
The candidate this run binds to. expected_draft_revision is OPTIONAL. When supplied it must equal the stored draft_revision; a disagreement in either direction is 409 STALE_DRAFT_REVISION with expected_revision and current_revision in details — the same refusal PATCH, ratify and the seal route answer — and nothing is executed. It RECORDS nothing itself: it enters no stored row, no digest and no response field. Omitting it changes nothing else, because evaluated names the subject either way. Neither check is a lease: this route takes no row lock because it writes nothing, so a concurrent draft save may land immediately after the read — evaluated still correctly names the rules that ran, since the revision and the rules come from one SELECT.
ESTABLISHES deterministic agreement for the exact cases, rules, context and evaluator version exercised. It does NOT establish completeness beyond those cases, the truth of the case classifications, or source fidelity — the spike found one invented rule and one over-broad rule that oracle execution did not catch.
Five scoring states, not a pass rate. match and mismatch are the scored outcomes. unrepresentable is an expected NOT_APPLICABLE: the evaluator has no verdict for “this policy does not apply”, and its zero-rule ALLOW is retained as engine output rather than promoted to the policy outcome. It is ALSO the state for a case whose context.decision_type differs from the one this policy governs: no rule is evaluated against it, and engine_output carries not_applicable_decision_type — a branch with no decision and no violations, so a context the policy does not govern cannot be read as a verdict by field access. A case whose context states no decision_type is evaluated normally. not_scored is an expected OUT_OF_SCOPE_INSUFFICIENT_EVIDENCE, or a case with no expectation. operational_failure is an evaluator exception for that case — an indeterminate state, never an ALLOW. The summary reports five counts and no ratio, because the states do not roll up.
422 CASE_PACK_CANDIDATE_DERIVED refuses a pack that declares non-independent authorship AND whose every comparable expectation names exactly the rule codes the candidate fires. That check is narrow: it cannot detect a derived pack that declares independent, and coincidence with the firing set is also what a CORRECT independent oracle looks like.
Authorizations
MeshQu API key passed as a bearer token: Authorization: Bearer mqu_…. Mint one in the console (Settings → API keys).
Tenant UUID for multi-tenant isolation. Required on all authenticated routes — validated before authentication (middleware/tenant.ts), so a missing or non-UUID header returns 400 (MISSING_TENANT_ID / INVALID_TENANT_ID) before the API key is checked.
Path Parameters
Policy id.
Policy version number.
x >= 1Body
The evaluation instant. REQUIRED and supplied by the caller, because determinism is the point: same pack + same rules + same evaluation_time gives the same results. A server clock here would make two identical runs differ.
The draft_revision the client displayed when it built this run. When supplied it must equal the stored draft_revision of the version being executed; a disagreement — in EITHER direction — is refused 409 STALE_DRAFT_REVISION with expected_revision and current_revision in details, exactly as PATCH, ratify and the seal route refuse one, and nothing is executed. Omitting it is permitted and changes nothing else: the response names the subject it evaluated either way.
x >= 0Response
Default Response
Always true. This is a synthetic preview: no decision, receipt, policy snapshot or audit row was created, nothing was signed, and nothing was persisted. It is non-billing and rate-limited under the standard per-tenant/per-key tier.
true Always true. Synthetic case executions are not metered as evaluations.
true Always false. Stated as a field rather than only in prose so a client can assert it, and so a future change that began persisting would have to change this literal and every test reading it.
false meshqu-case-pack/v1 Names the SEMANTICS of the shared verdict loop, not a build, package version or deployment.
PRESENTATION metadata. Excluded from the digest-bound projection that occupies the review package's case_execution_results slot, so re-running identical work does not move a package digest.
The subject these results describe: the policy version row whose stored rules were executed. RECORDS which candidate ran. PROVES nothing about it — no hash, no signature, nothing persisted.
The candidate-derivation canary verdict for the executed pack. A REJECTED pack never reaches this response — it is a 422. See the 422 description for the heuristic's stated limits.