Legacy ExecutionSet API
Compatibility reference for previously configured deterministic policies and bindings.
Legacy deterministic-rule API compatibility: The older rule-oriented ExecutionSet editor is no longer offered in the console. The current Executions area creates HTTP ExecutionSets through a different API. See HTTP ExecutionSets for new workflows. Existing APIs and bindings remain available for compatibility and audit. Removing the UI does not disable an active binding. Administrators should migrate or explicitly unbind existing policies before retiring them.
Previously, the console offered Executions to create and manage ExecutionSets. ExecutionSets evaluate structured JSON using explicitly configured rules. They do not ask an AI model to make the decision. Schema v2 also supports bounded typed inputs, combined conditions, and deterministic structured results. A route outcome identifies a target; it does not execute an arbitrary URL or external action.
Lifecycle
- Publish an immutable configuration version.
- Certify it against at least one expected input/outcome case.
- Approve the certified version.
- Activate it. The active version is used for normal evaluation.
- Evaluate requests and receive an evidence ID, matched rule, decision, and input/configuration hashes.
- Replay a previous decision by supplying the exact input again. LakeShark does not retain raw inputs as execution evidence.
Deactivating and deleting are separate API operations. The historical console management path is no longer available. Use only authorized management APIs and follow change-control procedures:
- Deactivate turns off its active version and stops further standalone evaluations, including requests selecting a version explicitly. You can reactivate a previously certified and approved version.
- Delete removes an already inactive, disconnected set from the active workspace and releases its configuration entitlement. Immutable versions, decision evidence and the name remain retained for audit. This is an auditable soft deletion, not a permanent wipe.
- If the ExecutionSet is connected to any AnswerSet, disconnect those AnswerSets explicitly first. LakeShark refuses to deactivate or delete the set until every binding is removed. Existing AnswerSets will lose that deterministic protection when you disconnect them, so review impact first.
The older Archive API follows the same safe deletion checks; it no longer silently removes AnswerSet bindings.
New versions are drafts until certified, approved, and activated. Publishing does not automatically change production behavior. Creating a new ExecutionSet consumes one existing configuration resource entitlement. Subsequent versions of that set do not consume additional resource entitlements.
See legacy migration and API maintenance and the existing structured-results contract.
Example configuration
{
"schema_version": 1,
"id": "ticket-triage",
"version": "v1",
"default_action": "escalate",
"default_target": null,
"rules": [
{
"id": "high-risk",
"field": "risk",
"operator": "gte",
"value": 70,
"action": "deny",
"target": null,
"priority": 10
},
{
"id": "support",
"field": "category",
"operator": "eq",
"value": "support",
"action": "route",
"target": "answers",
"priority": 20
}
]
}
The first matching rule in ascending priority, then lexicographic rule ID order wins. If no rule matches, default_action applies. Higher priority numbers are evaluated later.
Supported operators are eq, ne, in, not_in, gt, gte, lt, lte, and exists. Inputs and values are JSON typed; a boolean is not equal to the number 1. Ordered comparisons require numbers.
Supported actions are allow, deny, route, and escalate. The route action requires a nonempty target; other actions do not accept targets.
API
ExecutionSets is available through the public Answers gateway at https://lakeshark.dev/api/answers/v1/execution-sets. The customer console no longer exposes ExecutionSet management. Only appropriately authorized legacy API integrations should access these endpoints. The service origin hostnames are private infrastructure and must not be called directly.
| Operation | Method | Path | Scope |
|---|---|---|---|
| List sets | GET | /v1/execution-sets |
executions.read |
| Validate imported draft | POST | /v1/execution-sets/validate |
executions.write |
| Propose draft with provider | POST | /v1/execution-sets/propose |
executions.write, providers.read |
| Publish immutable version | POST | /v1/execution-sets/{name}/versions |
executions.write |
| List versions | GET | /v1/execution-sets/{name}/versions |
executions.read |
| Read active version | GET | /v1/execution-sets/{name} |
executions.read |
| Read version | GET | /v1/execution-sets/{name}/versions/{version} |
executions.read |
| Certify | POST | /v1/execution-sets/{name}/versions/{version}/certify |
executions.write |
| Approve | POST | /v1/execution-sets/{name}/versions/{version}/approve |
executions.write |
| Activate | POST | /v1/execution-sets/{name}/versions/{version}/activate |
executions.write |
| Evaluate and record | POST | /v1/execution-sets/{name}/evaluate |
executions.evaluate |
| List attached AnswerSets | GET | /v1/execution-sets/{name}/bindings |
executions.read, answers.read |
| Deactivate (without removing bindings) | POST | /v1/execution-sets/{name}/deactivate |
executions.write |
| Delete inactive unbound set | DELETE | /v1/execution-sets/{name} |
executions.write |
| Legacy archive (same safety checks as delete) | POST | /v1/execution-sets/{name}/archive |
executions.write |
| Observed decision metrics | GET | /v1/execution-sets/{name}/metrics |
executions.read |
| List decision evidence | GET | /v1/execution-sets/{name}/decisions |
executions.read |
| Replay evidence | POST | /v1/execution-sets/evidence/{id}/replay |
executions.evaluate |
| Runtime preflight status | GET | /v1/execution-sets/runtime-status |
executions.read |
| Bind AnswerSet to active version | PUT | /v1/execution-sets/bindings/answer-sets/{id} |
executions.write, answers.write |
| Read binding | GET | /v1/execution-sets/bindings/answer-sets/{id} |
executions.read |
| Remove binding | DELETE | /v1/execution-sets/bindings/answer-sets/{id} |
executions.write, answers.write |
Metrics report actual deterministic decision counts and action distribution. They do not automatically equate decisions with realized provider cost savings.
All endpoints require a valid JWT for a selected organization and workspace. The caller cannot override tenant identity through request fields.
Publish
curl --fail-with-body -X POST \
https://lakeshark.dev/api/answers/v1/execution-sets/ticket-triage/versions \
-H "Authorization: Bearer $LAKESHARK_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"document":{"schema_version":1,"id":"ticket-triage","version":"v1","default_action":"deny","rules":[{"id":"ok","field":"status","operator":"eq","value":"approved","action":"allow","priority":10}]}}'
Certify
{
"cases": [
{
"input": {"status": "approved"},
"expected_action": "allow",
"expected_target": null
},
{
"input": {"status": "unknown"},
"expected_action": "deny",
"expected_target": null
}
]
}
Post this to /{name}/versions/{version}/certify beneath the API prefix. Certification failures do not promote the version and invalidate prior approval. This is customer-supplied regression coverage, not a third-party certification.
Evaluate
{
"data": {"status": "approved"}
}
POST /v1/execution-sets/ticket-triage/evaluate returns the action, matched rule, trace, immutable version and hashes, and a unique evidence ID. Only certified and approved versions can be evaluated.
Security and operational boundaries
- No arbitrary HTTP execution or external provider action is performed by the current deterministic evaluator.
- No execution proceeds if a contract is malformed, missing, unapproved, or cannot be audited.
- Decision evidence includes hashes and rule matches, but not raw customer input or secret field values.
- Decision storage is scoped to the authenticated organization/workspace with PostgreSQL row-level security.
- Version documents are immutable; new changes require a new version.
- Replay requires the original input to be supplied again and does not repeat external actions.
- API evaluations consume the organization’s existing request quota.
- The separated-review setting is supported by the database contract, but there is no tenant-facing configuration control for it in this release.
AnswerSet binding enforcement is opt-in at deployment level. Query GET /v1/execution-sets/runtime-status before relying on it: answer_set_preflight_enabled: true means the Answers runtime preflight guard is enabled. If the value is false or unavailable, bindings are stored but do not affect Question API requests. When enabled, bound ExecutionSets use the pinned certified and approved version before provider execution, record evidence and stop deny, escalate or unsupported-route decisions. The default evaluator remains useful independently of bindings.
See legacy binding migration for verifying and safely retiring pinned policies.
Approved adapter boundary
The shared execution library supports registry-controlled, side-effect-free structured-data adapters. Adapter identifiers must be registered by deployment code, not supplied as executable URLs or arbitrary Python class names. External service adapters and side-effectful action execution are not exposed by the current customer API and require a separate idempotent, authorized execution service before general availability.