Structured ExecutionSet results
Configure versioned, typed deterministic results and connect them to AnswerSets without relying on AI.
ExecutionSet schema v2 extends the deterministic policy engine beyond allow, deny, route, and escalate. A v2 ExecutionSet can return a structured result with resolve, allowing an attached AnswerSet to respond without calling an AI provider. Existing schema v1 contracts remain unchanged for current compatibility.
Legacy compatibility only: The legacy deterministic-rule customer editor was retired; the current HTTP Executions editor uses a separate API. Existing certified policies and their APIs remain available for controlled migration and audit; the workflow below describes behavior of existing bindings, not a new customer setup path.
What it does
A customer-facing AnswerSet can run this path:
- Validate the Question Key, workspace, request quota, and applicable input governance.
- Evaluate the bound, certified, approved, immutable ExecutionSet version.
- On
deny, return HTTP 403. Onescalateor unsupported routing, return HTTP 409. - On
resolve, apply AnswerSet response typing, strict-answer restrictions and all assigned output GovernanceSets. Record an ExecutionSet decision and an AnswerSet run with zero provider calls. - On
alloworroutetoanswers, continue the existing approved Knowledge and provider fallback path.
The resolve path is available only when the Answers deployment explicitly sets LAKESHARK_EXECUTION_RESOLUTION_ENABLED=true. The existing preflight switch LAKESHARK_EXECUTION_PREFLIGHT_ENABLED=true must also be enabled. If resolution is disabled, a bound resolve rule returns a safe HTTP 409 rather than silently calling an AI provider.
Author a schema v2 document
The example below documents the existing schema v2 API contract. The graphical authoring and import workflow has been retired from the customer console. Do not create new policies for ordinary AnswerSet requests. For existing integrations, use authorized API validation and review procedures described in the legacy API reference. Input declarations are mandatory and type checked. Rules evaluate by ascending priority, then lexicographic rule ID, and use all or any matching.
{
"schema_version": 2,
"id": "refund-eligibility",
"version": "v1",
"inputs": {
"caller.days": {"type": "integer"},
"caller.unopened": {"type": "boolean"},
"caller.amount_cents": {"type": "integer"}
},
"rules": [
{
"id": "eligible",
"priority": 10,
"match": "all",
"conditions": [
{"field": "caller.days", "operator": "lte", "value": 30},
{"field": "caller.unopened", "operator": "eq", "value": true}
],
"action": "resolve",
"result": {
"answer": "This purchase qualifies under the refund policy.",
"eligible": true,
"amount_cents": {"$field": "caller.amount_cents"}
}
}
],
"default": {"action": "escalate"}
}
For this example, send the following Question API payload:
{
"question": "Am I eligible for a refund?",
"context": {
"days": 12,
"unopened": true,
"amount_cents": 14999
}
}
The Question API supplies question and a server-bound answer_set_id. The context values become caller.* input fields for the bound ExecutionSet. With this input, the ExecutionSet evaluates to resolve and returns a structured result. For an AnswerSet configured with the text answer type, its result.answer must be a nonempty string. For an AnswerSet with json type, the complete result object is returned as JSON.
Existing AnswerSet bindings are version-pinned and can continue enforcing these policies. The retired UI no longer offers binding controls. Inspect and remove legacy bindings only through authorized management APIs after validating the impact. For example, an existing customer application could call:
POST /v1/questions
Authorization: Bearer <QUESTION_KEY>
Content-Type: application/json
{"question":"Am I eligible for a refund?","context":{"days":12,"unopened":true,"amount_cents":14999}}
The matching outcome includes source: "execution", the governed execution_result, execution_preflight evidence and zero provider token usage. Evaluation records a cryptographic fingerprint of the result, not its raw contents. Replay requires supplying the exact original input again.
Input trust is not established by a JSON schema
Important: context is caller-supplied. Validation proves its shape and type, not that a purchase actually happened or that its facts are correct. Do not make money-moving, access-granting, regulated, or other high-impact decisions based solely on this input.
Names under verified.* and system.* are reserved. V2 deliberately rejects contracts claiming verified fields until an explicitly registered, authenticated, server-side adapter is implemented and certified. The current engine never sends HTTP requests or executes arbitrary commands.
Use application-controlled service credentials and independently verified facts for any sensitive decision. The sample is illustrative and should not be deployed as a real refund-authorization system.
Supported bounded operations
- Conditions: Existing typed operators
eq,ne,in,not_in,gt,gte,lt,lte, andexists. - Input types:
text,integer,number,boolean,object,list. - Result field lookup:
{"$field":"caller.amount_cents"}. - Arithmetic:
{"$op":"subtract","args":[{"$field":"caller.amount_cents"},50]}. Alsoadd,multiply,min, andmax. Arithmetic uses bounded finite numbers; for money, pass integer minor units. - Result size: At most 16 KiB. Whole contract and evaluated JSON are capped at 256 KiB. Each rule has up to 32 conditions; expressions are bounded in depth.
This engine cannot execute arbitrary programs, send webhooks, call AI, or trust caller-provided fields as a secure identity claim.
Lifecycle and API
- Validate the draft through
POST /v1/execution-sets/validate. - Publish it to
POST /v1/execution-sets/{name}/versions. - Certify using
POST /v1/execution-sets/{name}/versions/{version}/certify. For eachresolvefixture, specifyexpected_result, not merely the action. - Approve and activate the immutable version.
- Bind the active approved version through
PUT /v1/execution-sets/bindings/answer-sets/{answer_set_id}. - Verify
GET /v1/execution-sets/runtime-statusreports bothanswer_set_preflight_enabled: trueandresolution_enabled: true. - Send requests to the existing AnswerSet Question API.
Example certification fixture:
{
"cases": [{
"input": {"caller":{"days":12,"unopened":true,"amount_cents":14999}},
"expected_action": "resolve",
"expected_target": null,
"expected_result": {
"answer": "This purchase qualifies under the refund policy.",
"eligible": true,
"amount_cents": 14999
}
}]
}
Only customer-provided examples are certified; this is not independent regulatory or accuracy certification. Add both positive and negative regression cases. A configured list-type AnswerSet currently rejects resolve, rather than bypassing plan-based list limits.
Security and evidence
The same organization and workspace scope applies to AnswerSet and ExecutionSet operations. Decisions require approval and produce durable, tenant-scoped evidence. Governance restrictions still apply to result text and nested strings. The result fingerprint is used for replay comparison without persisting unredacted input or result objects.
The platform’s execution source means a deterministic resolution occurred with no provider call. Do not interpret this fact as a verified dollar saving. Provider-cost avoidance should only be valued when a valid baseline and coverage evidence exist.
ExecutionSets overview · AnswerSet integration · Security and access control
Production verification
Before trusting an attached schema v2 control, run the isolated, manually dispatched production-v2-answer-resolution-certification.yml workflow from the LakeShark QA project using a dedicated unbound QA AnswerSet and its matching Question Key. The canary proves the exact typed result, no provider tokens, durable execution evidence, deny-by-default behavior and binding cleanup. The existing production-bound-preflight-certification.yml covers earlier deny-only behavior. Neither canary should be run against a customer AnswerSet.
For enterprise change control, synchronize the signed, uniform six-service release in this order: Providers, ConfigStore and Quotas; Auth schema migration and Auth; Scorecards and Answers. All six token-using services must recognize the same RBAC scope vocabulary. Merging GitOps configuration is not proof of a running deployment. Capture the image tags, completed database bootstrap jobs and QA evidence in the deployment change record.