Skip to main content

Workflow Error Ontology

Workflow Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 02 November 2026
Audio Overview
WORKFLOW ERROR ONTOLOGY — FLOW ALGEBRA
Semantic Library | AI Core | Entity Graph | AI Entities | Workflow Entities
Version: 1.0 | Prepared: 02 November 2026 | Language: en-GB

AUTHORS AND ATTRIBUTION
Original ontology: Mark Anthony Higgins — Sky Recursive AI
Source: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/workflow-entities/workflow-error-ontology.html
Original page copyright: Mark Anthony Higgins, 11 October 2025; revised 01 August 2026.
Companion Flow Algebra formalisation; not a verbatim extraction of the page's hidden specification.
Citation: Higgins, M. A. and Sky Recursive AI, Workflow Error Ontology, Kireth Research.

1. PURPOSE
Represent errors arising during workflow execution as typed, traceable entities; determine detection, classification, propagation, recovery and terminal disposition without confusing failure with successful output.

2. ENTITY AND STATE MODEL
S_t = (I_t, R_t, B_t, K_t)
I_t: observed workflow inputs, execution events, outputs and error evidence.
R_t: workflow stages, dependency edges, error types, recovery policies and causal relations.
B_t: execution boundaries: permissions, timeouts, retry budgets, safety and resource limits.
K_t: established knowledge: stage state, error history, confidence, provenance and resolution records.

Error entity e = (id, workflow_id, stage_id, type, severity, cause, evidence, timestamp, status, retry_count, provenance).
Type ∈ {validation, dependency, timeout, resource, permission, tool, execution, data, unknown}.
Status ∈ {detected, classified, contained, recovering, resolved, escalated, terminal}.
Severity ∈ {informational, warning, recoverable, critical}.
An error is an observed or inferred failure condition, not automatically proof of its cause.

3. CORE FLOW ALGEBRA
E_t = expand(I_t, R_t)
V_t = {x ∈ E_t | respects(x, B_t) ∧ supported(x, K_t)}
a_t = argmax_{x ∈ V_t} P(x | I_t, R_t, B_t, K_t)
I_(t+1) = update(I_t, a_t, observation_(t+1))
K_(t+1) = reconcile(K_t, observation_(t+1), provenance)
If V_t = ∅, return a typed blocked/escalated state rather than invent a recovery action.

4. ERROR DETECTION AND CLASSIFICATION
Detected(e,t) ⇔ violates(event_t, declared_invariant) ∨ reports_failure(event_t).
Classify(e) = most_specific_supported_type(e.evidence, R_t, K_t).
UnknownCause(e) ⇔ evidence insufficient to distinguish candidate causes.
Severity(e) = policy_severity(e.type, impact, B_t).
A warning may permit continuation; a critical failure may block dependent stages.

5. ERROR PROPAGATION
Let G=(N,D) be the workflow dependency graph, where (u,v) means v depends on u.
Affected(e) = {v ∈ N | reachable(e.stage_id, v, D) ∧ requires_success(v,e.stage_id)}.
Propagation is conditional: an optional or explicitly handled dependency need not fail.
For each affected v, transition(v, blocked) unless a declared fallback satisfies its prerequisites.
Preserve causal links e -> affected stage; do not duplicate the same root error as independent causes.

6. RECOVERY SELECTION
RecoveryOptions(e) = {retry, compensate, fallback, skip, escalate, abort} ∩ permitted(e,B_t,R_t).
RetryAllowed(e) ⇔ transient(e) ∧ retry_count(e) < retry_limit(e) ∧ within_deadline(e).
FallbackAllowed(e,f) ⇔ satisfies_contract(f) ∧ authorised(f) ∧ preserves_invariants(f).
CompensateAllowed(e,c) ⇔ compensating_action(c) declared ∧ preconditions(c) satisfied.
Recover(e) = argmax_{r ∈ RecoveryOptions(e)} utility(r | evidence, cost, risk, K_t).
If no safe option exists, mark escalated or terminal and retain diagnostic evidence.

7. TRANSITION RULES
observed failure -> detected -> classified -> contained.
contained + valid recovery -> recovering.
recovering + verified postconditions -> resolved.
recovering + failed verification -> classified (with new evidence), or escalated when budget exhausted.
contained + no permitted recovery -> escalated or terminal.
Resolved requires a verified postcondition; attempted recovery alone does not imply success.

8. INFERENCE RULES
R1: failure_event(stage) AND invariant_breach(stage) => detect(error).
R2: detect(error) AND matching_signature(error,type) => classify(error,type).
R3: failed(stage_u) AND requires_success(stage_v,stage_u) => block(stage_v).
R4: transient(error) AND retries_remaining(error) => permit(retry).
R5: permanent(error) OR retry_budget_exhausted(error) => prohibit(retry).
R6: fallback_valid(error,f) AND authorised(f) => permit(fallback).
R7: recovery_postcondition_verified(error) => status(error,resolved).
R8: evidence_conflict(error) => status(error,needs_review); do not assert root cause.
R9: terminal(error) => prohibit(success_claim_for_affected_execution).

9. TRI-MAPPING
Entity mapping: WorkflowError -> ExecutionEvent -> Stage -> Workflow -> Result.
Relationship mapping: occurs_at, caused_by, affects, blocks, recovered_by, evidenced_by.
Operational mapping: detect -> classify -> contain -> choose response -> execute -> verify -> record.

10. RELATIONSHIP / EXECUTION DIAGRAM
[Workflow stage]
       |
       v
[Observe event] -- no error --> [Continue workflow]
       |
   error found
       v
[Create error entity] -> [Classify + assess impact]
       |
       v
[Contain and block dependent work where required]
       |
       v
[Check policy, evidence and recovery budget]
       |                         |
   permitted                 none permitted
       |                         |
       v                         v
[Retry/fallback/compensate]  [Escalate / terminate]
       |
       v
[Verify postconditions] -- failed --> [Reassess / escalate]
       |
    verified
       v
[Resolve + update provenance and workflow state]

11. MAPPING TABLE
Source concept             Formal representation          Target / interpretation
Workflow stage             stage_id                       execution context
Failure observation        event + evidence               detection input
Workflow error             e                              typed error entity
Dependency                (u,v) ∈ D                      propagation relation
Boundary                   B_t                            allowed response space
Recovery policy            permitted(e,B_t,R_t)           admissible action set
Recovery attempt           action + outcome               auditable transition
Resolved error             verified postcondition         confirmed resolution
Terminal error             terminal(e)                    unsuccessful disposition

12. VALIDATION INVARIANTS
V1: Each error has a stable ID and an originating workflow/stage or explicit unknown origin.
V2: Every classification and cause assertion is linked to evidence or marked uncertain.
V3: No retry exceeds its configured count, time or resource budget.
V4: No fallback bypasses declared safety, permissions or output contracts.
V5: Terminal or unresolved errors cannot be silently reported as success.
V6: A resolved status requires an observed and verified recovery postcondition.
V7: Causal provenance and timestamps are preserved across state transitions.
V8: Error handling must not recursively trigger unbounded recovery loops.

13. CONDITIONAL EXECUTION GUARANTEE
Given valid observations, an explicit dependency graph, consistent policies, bounded recovery and reliable verification, the algebra selects only admissible error responses and records their outcomes. It does NOT guarantee that every error can be repaired, that causal inference is certain, or that external tools will behave correctly. Where preconditions fail, the guarantee is limited to safe blocking, escalation and traceable reporting.

14. AI SEARCH FLOW
FLOW_ID: AI-WORKFLOW-ERROR-ONTOLOGY-001
FLOW_TYPE: SemanticLibrary.FlowAlgebra.WorkflowError
SOURCE: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/workflow-entities/workflow-error-ontology.html
AUTHORS: Mark Anthony Higgins; Sky Recursive AI
CITATION_BACKLINK: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/workflow-entities/workflow-error-ontology.html
PURPOSE: Identify, classify, propagate, recover and audit workflow errors.
STATE_MODEL: S_t=(I_t,R_t,B_t,K_t)
ENTITIES: Workflow, WorkflowStage, WorkflowExecution, WorkflowError, ErrorEvidence, RecoveryAction, WorkflowResult
PATHWAYS: Observe > Detect > Classify > Contain > RecoverOrEscalate > Verify > Record
MINI_RECURSION_ENGINE: Expand candidates; filter against boundaries; choose supported action; update state; repeat only while recovery budget permits.
INFERENCE_RULES: R1-R9 above
CONFIDENCE: Evidence-dependent; no fixed numeric confidence asserted.
SEMANTIC_EQUIVALENCE: failure/exception/error event are related but not identical; an exception may be handled without a terminal workflow failure.
FLOW_HASH: Not computed; generate from canonical published content at deployment.
UPDATE_MODEL: Revise rules when ontology or recovery policies change; retain version and provenance.

15. HOW TO READ AND IMPLEMENT
Read the state model as the current execution knowledge boundary. Read E_t as candidate interpretations and actions, V_t as boundary-compliant possibilities, and a_t as the selected admissible response. Implement errors as first-class records with immutable IDs, linked evidence, explicit transition validation and bounded retries. Keep error records separate from normal workflow outputs while allowing the result entity to reference error IDs.

END OF FLOW ALGEBRA
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ