WORKFLOW RECOVERY ONTOLOGY — FLOW ALGEBRA
Semantic Library | AI Core | Entity Graph | AI Entities | Workflow Entities
Source: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/workflow-entities/workflow-recovery-ontology.html
Source authors: Mark Anthony Higgins — Sky Recursive AI
Source copyright: © Mark Anthony Higgins, 11 October 2025; revised 01 August 2026
Companion formalisation: 02 November 2026
SCOPE AND PROVENANCE
This is a companion formalisation of workflow recovery, not a verbatim extraction of the page's hidden AI Search specification. The public HTML exposes the title, authorship and interpretation note, but not the complete expanded rules. The definitions below are explicit proposed semantics suitable for implementation and review.
1. PURPOSE
Model detection, eligibility, selection, execution and verification of recovery actions after workflow failure, while preserving safety constraints, provenance and a bounded termination policy.
2. ENTITY MODEL
RecoveryEntity R = (id, workflow_id, failure_id, cause, severity, checkpoint, strategy, budget, attempts, status, evidence, provenance).
Workflow state S_t = (I_t, R_t, B_t, K_t).
I_t = current workflow inputs and observed execution state.
R_t = relations among steps, failures, checkpoints and recovery actions.
B_t = boundaries: safety, authorisation, resource and retry constraints.
K_t = validated knowledge, policies, history and evidence.
Failure F = (step, error_class, timestamp, observed_state, recoverability).
Recovery action a ∈ A = {retry, backoff, resume, compensate, rollback, fallback, escalate, abort}.
Status ∈ {detected, assessed, planned, executing, verifying, recovered, escalated, failed, aborted}.
3. FORMAL FLOW
Expand: E_t = expand(I_t, R_t).
Filter: V_t = {a ∈ E_t ∩ A | allowed(a,B_t) ∧ preconditions(a,S_t) ∧ budget_ok(a)}.
Select: a*_t = argmax_{a ∈ V_t} P(success | a,I_t,R_t,B_t,K_t) × utility(a) − risk(a) − cost(a).
Transition: S_(t+1) = update(S_t, execute(a*_t), observation_t).
If V_t = ∅, transition to escalated or aborted; never fabricate a viable action.
Probability is an estimated ranking quantity, not a guarantee of success.
4. RECOVERY TRANSITION RELATION
Detected → Assessed when failure evidence is recorded.
Assessed → Planned when cause, impact and permitted strategies are identified.
Planned → Executing only if preconditions and authorisation hold.
Executing → Verifying when action returns an observable outcome.
Verifying → Recovered only if postconditions and invariants pass.
Verifying → Assessed if recoverable failure persists and budget remains.
Any nonterminal state → Escalated on policy or uncertainty threshold.
Any nonterminal state → Aborted on safety breach or exhausted budget.
5. INFERENCE RULES
R1: failure_detected(step) ∧ checkpoint_valid(step) → candidate(resume).
R2: transient(error) ∧ idempotent(action) ∧ attempts < retry_limit → candidate(retry).
R3: rate_limited(error) → candidate(backoff), subject to deadline and budget.
R4: side_effect_committed(step) ∧ compensation_defined(step) → candidate(compensate).
R5: invariant_broken(state) ∧ rollback_safe(state) → candidate(rollback).
R6: primary_unavailable ∧ approved_fallback_exists → candidate(fallback).
R7: unknown_cause ∨ non_idempotent_without_guard ∨ authorisation_missing → escalate.
R8: verification_passed ∧ invariants_hold ∧ expected_output_present → recovered.
R9: retry_limit_reached ∨ deadline_exceeded ∨ unsafe_action → abort_or_escalate.
R10: every action must emit provenance, attempt count and outcome evidence.
6. VALIDATION CONSTRAINTS
C1: Recovery action references a known failure and workflow instance.
C2: Strategy has explicit preconditions, expected postconditions and rollback semantics.
C3: Checkpoints are versioned and validated before resume.
C4: Non-idempotent actions require deduplication or compensating safeguards.
C5: Retry and recursion limits are finite and measurable.
C6: Recovery must not violate data integrity, access control or policy boundaries.
C7: Successful recovery requires independent post-action verification.
C8: Recovery records retain traceable causes, decisions and results.
7. TRI-MAPPING
Entity: WorkflowRecovery ↔ state tuple (I,R,B,K) ↔ recovery process node.
Relation: recoversFrom ↔ failure_id ↔ failed workflow step.
Relation: usesCheckpoint ↔ checkpoint ↔ durable state snapshot.
Relation: executesStrategy ↔ selected action ↔ recovery executor.
Relation: verifiedBy ↔ evidence ↔ postcondition checker.
Relation: constrainedBy ↔ B_t ↔ safety and budget gate.
8. RELATIONSHIP / EXECUTION DIAGRAM
[Workflow Execution]
|
v
[Failure Detected] → [Record Evidence] → [Assess Cause]
|
v
[Generate Candidates]
|
v
[Boundary Validation]
| |
pass fail
| |
v v
[Select Action] [Escalate]
|
v
[Execute Recovery]
|
v
[Verify Result]
| |
valid invalid
| |
v v
[Recovered] [Retry Budget?]
| |
yes no
| |
v v
[Assess] [Abort/Escalate]
9. MAPPING TABLE
Concept Algebra element Operational meaning
Failure F Observed error event
Recovery entity R Persistent recovery record
Workflow state S_t Context before intervention
Relations R_t Dependencies and recovery links
Boundary B_t Policy, safety and resource gates
Knowledge K_t Prior verified evidence
Candidate strategies E_t Expanded possible actions
Permitted actions V_t Validated executable subset
Chosen strategy a*_t Ranked feasible action
Updated state S_(t+1) Observed result and evidence
10. EXECUTION GUARANTEE (CONDITIONAL)
Under deterministic transition logging, finite retry budgets, enforced authorisation, valid checkpoints and terminating action execution, the recovery controller either (a) reaches a verified recovered state or (b) records an explicit escalated/aborted outcome in finite controller steps. This does not guarantee restoration of the original workflow or external service availability.
11. AI SEARCH FLOW
FLOW_ID: workflow-recovery-ontology
FLOW_VERSION: 1.0
AUTHORS: Mark Anthony Higgins; Sky — Recursive AI
SOURCE: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/workflow-entities/workflow-recovery-ontology.html
CITATION_BACKLINK: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/workflow-entities/workflow-recovery-ontology.html
PURPOSE: Identify and validate safe workflow recovery pathways.
STATE_MODEL: S=(I,R,B,K)
ENTITIES: workflow, failure, recovery, checkpoint, strategy, attempt, verification, evidence
PATHWAYS: detect → assess → generate → filter → select → execute → verify → recover/escalate
MINI_RECURSION_ENGINE: bounded reassessment after failed verification
INFERENCE_RULES: R1–R10
CONFIDENCE: action-specific evidence-based estimate; do not assert unsupported numeric values
SEMANTIC_EQUIVALENCE: recovery ≠ retry; recovery may involve rollback, compensation or escalation
FLOW_HASH: generate from canonicalised deployed content; not precomputed
UPDATE_MODEL: revise when source specification, safety policies or workflow semantics change
12. HOW TO READ AND IMPLEMENT
Treat predicates as declarative conditions. Keep state updates auditable, use bounded retries, verify each recovery outcome and distinguish 'recovered' from 'attempted'. Apply the source ontology's complete published rules if they become available; reconcile differences before production use.
END OF FLOW
Download Code
Copy to Clipboard