Skip to content

Branch main Algo state classification

github-actions[bot] edited this page Jun 20, 2026 · 102 revisions

Algorithm: State Classification

Back to Branch Overview

Field Value
Branch main
Source specs/algorithms/state_classification.pseudo.md
Commit 5b2aac39fcf8
Synced (UTC) 2026-06-20T05:49:16Z

Visual Context

Algorithm pages define deterministic platform-neutral behavior that downstream repos implement behind native adapters.

flowchart LR
  Input["Input contract"] --> Preconditions["Preconditions"]
  Preconditions --> Decision["Deterministic decision"]
  Decision --> Output["Output contract"]
  Decision --> Diagnostic["Diagnostic envelope"]
  Diagnostic --> Audit["Audit chain"]
Loading

Reading Checklist

Question Where to look
What is deterministic? Read the pseudocode branch table and preconditions.
What blocks unsafe behavior? Look for blocked, ambiguous, policy, or precondition paths.
How is the decision reconstructable? Trace diagnostic and audit requirements.

Source Content

State Classification

FUNCTION classify_system_state(diagnostic, context) -> SystemStateClass
  IF context.safeHalt == true: RETURN SAFE_HALT
  IF context.contained == true: RETURN CONTAINED
  IF diagnostic.admissibilityStatus == VALID AND diagnostic.normalizationStatus == ALREADY_VALID: RETURN STABLE
  IF diagnostic.admissibilityStatus == TRANSFORMATION_COMPATIBLE AND diagnostic.normalizationStatus == NORMALIZABLE: RETURN CORRECTABLE
  IF diagnostic.admissibilityStatus == TRANSFORMATION_INCOMPATIBLE: RETURN DEGRADED
  RETURN FAILED
END FUNCTION

Clone this wiki locally