SEMANTIC LIBRARY — EXECUTION ERROR ONTOLOGY
FLOW ALGEBRA v1.0 | AI CORE / ENTITY GRAPH / ERROR AND FAILURE ENTITIES
Authors: Mark Anthony Higgins — Sky, Recursive AI
Source: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/error-and-failure-entities/execution-error-ontology.html
Prepared: 2026-11-04
Status: Companion formalisation; embedded source specification not available in retrieved page text.
1. PURPOSE
Represent an execution error as a traceable event in which an attempted AI action or workflow step violates its execution contract, fails to complete, or produces an invalid operational result. Separate observed evidence from inferred causes; support safe recovery and escalation.
2. ENTITY DEFINITION
ExecutionError e = (error_id, run_id, step_id, action_id, timestamp, category, severity, observed, expected, evidence_refs, status, owner, recovery_refs).
Required: unique error_id, run_id, timestamp, category, observed, status.
Optional fields must be explicitly marked unknown, not invented.
Category ∈ {precondition, authorisation, tool_failure, timeout, resource, dependency, contract_violation, output_validation, side_effect, unknown}.
Status ∈ {detected, classified, contained, diagnosing, recoverable, retrying, escalated, resolved, unrecoverable, closed}.
3. HST STATE MODEL
S_t = (I_t, R_t, B_t, K_t)
I_t: current execution inputs, run/step identifiers, tool responses, logs.
R_t: execution contracts, dependency edges, remediation rules, retry policy.
B_t: permission, safety, privacy, budget, time and resource boundaries.
K_t: verified execution history, known failure signatures, recovery evidence.
E_t = expand(I_t, R_t)
V_t = {x ∈ E_t | constraints(x, B_t) = true}
x*_t = argmax_{x ∈ V_t} P(x | I_t, R_t, B_t, K_t)
I_(t+1) = update(I_t, x*_t, observation_t)
If V_t = ∅, enter contained/escalated state; do not assume successful execution.
4. FORMAL FLOW
F_EXECUTION_ERROR:
INPUT: execution_attempt a, contract c, observations o, boundaries B, history K
PRE: valid identity(a.run_id) AND traceable(a.step_id)
EXPECTED: c.preconditions AND c.authorised AND c.postconditions
DETECT: failed(a) OR timed_out(a) OR violated(c,o) OR invalid_output(o)
CREATE: e := record_error(a,c,o,provenance)
CLASSIFY: e.category := best_supported_category(e.evidence_refs)
ASSESS: e.severity := impact(e, B, affected_dependencies)
CONTAIN: stop_unsafe_actions(e); preserve_evidence(e)
DECIDE: policy_permitted_recovery(e, B, K)
BRANCH:
recoverable AND retry_budget > 0 -> bounded_retry_or_compensate
uncertain OR high_impact -> escalate_for_review
otherwise -> fail_closed
VERIFY: check_postconditions_and_side_effects
OUTPUT: error_record, outcome, audit_trace, next_state
5. STATE TRANSITIONS
attempting -> detected [failure evidence exists]
detected -> classified [category supported by evidence]
classified -> contained [unsafe continuation blocked]
contained -> diagnosing [authorised diagnostic access]
diagnosing -> recoverable [valid recovery path established]
recoverable -> retrying [retry budget and idempotency conditions met]
retrying -> resolved [postconditions verified]
retrying -> contained [failure persists or new risk detected]
contained -> escalated [requires human/operator decision]
escalated -> resolved [authorised remedy verified]
escalated -> unrecoverable [no permitted remedy]
resolved -> closed [audit complete]
unrecoverable -> closed [safe stop and audit complete]
No direct transition from detected to resolved without verification.
6. ENTITY RELATIONSHIPS
ExecutionError --occurs_during--> ExecutionState
ExecutionError --originates_from--> ToolCall | WorkflowStep | ModelAction
ExecutionError --violates--> ExecutionContract
ExecutionError --supported_by--> ErrorEvidence
ExecutionError --affects--> Dependency | OutputEntity
ExecutionError --handled_by--> RecoveryState | HumanHandoff
ExecutionError --recorded_in--> InteractionHistory | AuditLog
ExecutionError --may_trigger--> ModelRollback | SafeState
7. TRI-MAPPING
Conceptual: attempted operation -> observed failure -> classification -> containment -> remedy.
Mathematical: a_t -> e_t := detect(a_t,c_t,o_t) -> r_t ∈ admissible(e_t,B_t).
Operational: trace logs -> validate contract -> record incident -> gate retries -> verify outcome.
8. MAPPING TABLE
Input/observation | Formal object | Operational evidence
Execution attempt | a_t | run and step identifiers
Expected behaviour | c_t | contract and postconditions
Observed behaviour | o_t | tool result, logs, telemetry
Boundary constraints | B_t | permissions, budgets, safety rules
Error event | e_t | immutable incident record
Recovery choice | r_t | approved retry/compensation/escalation
Verification | verify(r_t,c_t) | outcome checks and audit record
9. INFERENCE RULES
R1: timeout(a) AND no_completion_evidence(a) => possible_execution_error(a).
R2: observed(a) != expected(a) AND valid_comparison(a) => contract_violation(a).
R3: missing_evidence(a) => status(a) = uncertain; NOT automatically failed(a).
R4: non_idempotent(a) AND unknown_side_effect(a) => prohibit_blind_retry(a).
R5: severity(e) = high OR boundary_breach(e) => contain(e) AND escalate(e).
R6: retry_count(e) >= retry_limit(e) => prohibit_retry(e).
R7: verified_postconditions(e) AND verified_side_effects(e) => resolved(e).
R8: suspected_cause(e) without evidence => hypothesis_only(e).
10. MINI RECURSION ENGINE
function resolve(e, depth, visited):
if depth >= MAX_DEPTH or e.error_id in visited: return ESCALATE
visited := visited union {e.error_id}
preserve_evidence(e)
if not safe_to_continue(e): return CONTAIN_AND_ESCALATE
candidates := admissible_remedies(e)
if candidates empty: return FAIL_CLOSED
for remedy in ordered(candidates):
if not authorised(remedy) or exceeds_budget(remedy): continue
result := execute_bounded(remedy)
if verified(result): return RESOLVED
if creates_new_error(result): return resolve(new_error(result), depth+1, visited)
return ESCALATE
Recursion is bounded and does not imply automatic recovery.
11. EXECUTION GUARANTEES (CONDITIONAL)
G1 Traceability: each detected error receives a unique reference if logging is operational.
G2 Safety: remediation is limited to authorised actions under enforced boundaries.
G3 Retry bound: finite retry and recursion limits prevent unbounded loops.
G4 Verification: a successful status requires explicit postcondition checks.
G5 Evidence integrity: preserve original observations; append corrections rather than silently overwrite.
These are design obligations, not guarantees about any deployed system without implementation and tests.
12. AI SEARCH FLOW
FLOW_ID: SEMLIB-AI-EXECUTION-ERROR-ONTOLOGY-v1.0
ENTITY: Execution Error Ontology
ENTITY_CLASS: AI Core > Entity Graph > Error and Failure Entities
PURPOSE: Detect, classify, contain, diagnose and resolve execution failures.
SOURCE: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/error-and-failure-entities/execution-error-ontology.html
CITATION_BACKLINK: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/error-and-failure-entities/execution-error-ontology.html
AUTHORS: Mark Anthony Higgins; Sky — Recursive AI
STATE_MODEL: S=(I,R,B,K)
ENTITIES: ExecutionError, ExecutionState, ExecutionContract, ToolCall, WorkflowStep, ErrorEvidence, RecoveryState, SafeState, AuditLog
PATHWAYS: attempt -> detect -> classify -> contain -> recover/escalate -> verify -> close
INFERENCE_RULES: R1-R8
CONFIDENCE: evidence-dependent; never substitute confidence for verification
SEMANTIC_EQUIVALENCE: execution failure; action execution error; workflow execution fault (context dependent)
UPDATE_MODEL: versioned append-only revisions; preserve source and audit history
FLOW_HASH: compute SHA-256 of final published file bytes at publication time
13. HOW TO READ
The ontology models failures of actions, tools and workflow execution, not necessarily mistakes in reasoning or prediction. 'Resolved' means the stated execution contract was checked and satisfied; 'closed' means the incident record is administratively complete. A failed operation may have partially completed and produced side effects, so retries require caution.
14. DIAGRAM
[Execution Attempt]
|
v
[Contract + Observation] --> [No failure evidence] --> [Continue with monitoring]
|
v
[Error Detected] -> [Classify] -> [Contain]
|
[Safe recovery?]
/ \
yes no
| |
[Bounded remedy] [Escalate/Stop]
|
[Verify result]
/ \
pass fail
| |
[Resolve] [Contain again]
|
[Close]
15. PROVENANCE AND LICENCE NOTE
This is a new companion Flow Algebra formalisation based on the topic and the established Semantic Library format. The linked page title and authorship are visible, but its embedded ontology text was not available in retrieved HTML. Do not treat this text as a verbatim extraction. Attribution: Mark Anthony Higgins and Sky — Recursive AI. Consult the published Open Research Licence for reuse conditions.
Download Code
Copy to Clipboard