SEMANTIC LIBRARY — FLOW ALGEBRA v1.0
RECOVERY ACTION ONTOLOGY
Category: AI Core / Entity Graph / AI Entities / Error and Failure Entities
Source: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/error-and-failure-entities/recovery-action-ontology.html
Source attribution: Mark Anthony Higgins — Sky Recursive AI
Companion formalisation prepared: 2026-11-04
Status: Derived companion model; the source page's expanded AI Search specification was not accessible in the retrieved page text. The following rules are a proposed formalisation, not a verbatim transcription.
1. PURPOSE
Represent a recovery action as an auditable, authorised state transition designed to contain, correct, retry, roll back, or escalate a detected failure without concealing unresolved risk.
2. ENTITY DEFINITION
RecoveryAction := (action_id, incident_id, target, kind, preconditions, authority, procedure, postconditions, evidence, status, provenance).
kind ∈ {contain, retry, repair, restore, rollback, fallback, escalate, terminate_safely}.
status ∈ {proposed, validated, authorised, executing, verifying, succeeded, failed, escalated, cancelled}.
An action is distinct from a FailureEvent (what happened), FailureState (current impairment), and RecoveryState (system condition during recovery).
3. HST STATE MODEL
S_t = (I_t, R_t, B_t, K_t)
I_t := incident observations, telemetry, diagnosis and action candidates.
R_t := causal, dependency, policy and recovery relations.
B_t := permissions, safety boundaries, resource limits, time limits and irreversible-operation restrictions.
K_t := verified knowledge, past recovery evidence, checkpoints and provenance.
E_t = expand(I_t, R_t)
V_t = {a ∈ E_t | preconditions(a) ∧ authorised(a) ∧ within_boundary(a)}
a*_t = argmax_{a ∈ V_t} P(success(a) | I_t,R_t,B_t,K_t) adjusted for expected harm, reversibility and cost.
If V_t = ∅, emit escalation or safe halt; do not infer permission.
S_(t+1) = update(S_t, outcome(a*_t), verification_evidence).
4. FORMAL FLOW
OBSERVE failure -> IDENTIFY affected entities -> CLASSIFY failure ->
GENERATE candidate recovery actions -> CHECK prerequisites and authority ->
ASSESS safety, dependencies and reversibility -> SELECT permitted action ->
EXECUTE with bounded retries -> VERIFY postconditions ->
{SUCCESS: record resolution | FAILURE: contain and escalate/replan} ->
PERSIST provenance and audit trace.
5. TRANSITION RELATION
T ⊆ RecoveryActionStatus × Event × RecoveryActionStatus.
(proposed, checks_pass, validated)
(validated, approval_granted, authorised)
(authorised, start, executing)
(executing, operation_finished, verifying)
(verifying, postconditions_true, succeeded)
(verifying, postconditions_false, failed)
(failed, escalation_required, escalated)
(proposed|validated|authorised, cancellation, cancelled)
No transition to succeeded is valid without independent postcondition evidence.
6. INFERENCE RULES
R1: detected_failure(f) ∧ affected(f,x) => recovery_candidate(x,f).
R2: candidate(a) ∧ not_authorised(a) => prohibit_execution(a).
R3: candidate(a) ∧ violates_boundary(a) => reject(a).
R4: transient(f) ∧ retry_safe(a) ∧ attempts(a)<limit(a) => retry_eligible(a).
R5: persistent(f) ∨ retry_limit_reached(a) => escalate_or_fallback(a).
R6: checkpoint_valid(c) ∧ rollback_authorised(a,c) => rollback_eligible(a,c).
R7: action_completed(a) ∧ verified_postconditions(a) => succeeded(a).
R8: action_completed(a) ∧ ¬verified_postconditions(a) => unresolved(a).
R9: irreversible(a) ∧ ¬explicit_approval(a) => block(a).
R10: unknown_impact(a) => prefer_containment_and_review(a).
7. ENTITY RELATIONSHIPS
RecoveryAction --responds_to--> FailureEvent
RecoveryAction --targets--> AI System / Model / Tool / Dataset / Workflow
RecoveryAction --requires--> Preconditions / Authority / Checkpoint
RecoveryAction --constrained_by--> SafetyPolicy / Boundary
RecoveryAction --produces--> ExecutionResult / VerificationEvidence
RecoveryAction --transitions_to--> RecoveryState / SafeState
RecoveryAction --recorded_in--> IncidentHistory / AuditLog
RecoveryAction --may_trigger--> HumanHandoff / Escalation
8. TRI-MAPPING
Semantic: failure, recovery action, permission, evidence, outcome.
Structural: incident -> candidate -> gate -> execution -> verification -> closure/escalation.
Operational: inspect -> select -> authorise -> apply -> test -> log.
9. MAPPING TABLE
Input incident | FailureEvent | establishes trigger
Current system state | FailureState | establishes impairment
Candidate operation | RecoveryAction | defines proposed intervention
Permission check | Authority/Boundary | gates execution
Stored checkpoint | RecoveryResource | supports restoration
Observed result | VerificationEvidence| tests postconditions
Resolved outcome | RecoveryState | records restored capability
Unresolved outcome | Escalation | requests further control
10. MINI RECURSION ENGINE
function RECOVER(S, incident, depth, budget):
if depth >= max_depth or budget <= 0: return SAFE_HALT_OR_ESCALATE
C = generate_candidates(incident, S)
V = filter(C, preconditions AND authority AND safety)
if empty(V): return SAFE_HALT_OR_ESCALATE
a = select_risk_adjusted(V)
result = execute_bounded(a)
evidence = verify(result, a.postconditions)
log(incident, a, result, evidence)
if evidence confirms recovery: return VERIFIED_RECOVERY
if result requires containment: contain_if_authorised()
return RECOVER(update(S,result,evidence), incident, depth+1, budget-cost(a))
11. EXECUTION GUARANTEE (CONDITIONAL)
Under an implemented policy gate, bounded executor, reliable logging and independent verification, this flow guarantees that no action is marked successful without recorded verification and that recursion terminates at a configured limit. It does NOT guarantee successful recovery, complete fault detection, absence of harm, or correctness of external tools.
12. AI SEARCH FLOW
FLOW_ID: semantic-library.ai-core.error-and-failure.recovery-action
VERSION: 1.0
LANGUAGE: en-GB
AUTHORS: Mark Anthony Higgins; Sky — Recursive AI
SOURCE: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/error-and-failure-entities/recovery-action-ontology.html
CITATION_BACKLINK: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/error-and-failure-entities/recovery-action-ontology.html
PURPOSE: Define, retrieve and reason over authorised AI failure-recovery actions.
STATE_MODEL: S=(I,R,B,K)
ENTITIES: RecoveryAction, FailureEvent, FailureState, RecoveryState, Authority, Boundary, Checkpoint, VerificationEvidence, Escalation.
PATHWAYS: detect>classify>propose>validate>authorise>execute>verify>record.
MINI_RECURSION_ENGINE: bounded RECOVER procedure (section 10).
INFERENCE_RULES: R1-R10 (section 6).
CONFIDENCE: Evidence-dependent; never assign a numeric confidence without calibrated evidence.
SEMANTIC_EQUIVALENCE: recovery operation; remediation action; corrective intervention (context-dependent, not exact synonyms).
FLOW_HASH: Compute SHA-256 over the final UTF-8 bytes when publishing; intentionally not prefilled.
UPDATE_MODEL: versioned, provenance-preserving, human-reviewed revisions.
13. HOW TO READ
A recovery action is a proposed operation, not proof that a failure is fixed. Preconditions and permission must be checked before execution; observed postconditions determine whether the system has actually recovered.
14. EXAMPLE
A retrieval service times out. A bounded retry is proposed, but only if the request is idempotent and the retry budget remains. If the retry succeeds, a test retrieval verifies service restoration. If it fails, the workflow switches to an authorised fallback or escalates, preserving the failure record.
15. DIAGRAM
[Failure Event]
|
v
[Candidate Recovery Action] --> [Policy / Authority Gate]
| reject
+--> [Safe Halt / Escalation]
| permit
v
[Bounded Execution]
|
v
[Verification]
/ \
verified unverified
| |
[Recovered] [Contain / Escalate]
\ /
[Audit Record]
END OF FLOW ALGEBRA
Download Code
Copy to Clipboard