-
Notifications
You must be signed in to change notification settings - Fork 0
Branch main Algo state normalization
github-actions[bot] edited this page May 15, 2026
·
102 revisions
| Field | Value |
|---|---|
| Branch | main |
| Source | specs/algorithms/state_normalization.pseudo.md |
| Commit | a8bea152e7f9 |
| Synced (UTC) | 2026-05-15T05:39:47Z |
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"]
| 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. |
Normalization is deterministic on the full 9-bit ASH state.
FUNCTION normalize_state(candidate_state, canonical_codeword_set) -> NormalizationResult
REQUIRE candidate_state has exactly 9 binary coordinates
diagnostic = diagnose_state_validity(candidate_state)
IF diagnostic.admissibilityStatus == VALID:
RETURN {status: ALREADY_VALID, normalizedState: candidate_state, diagnostic}
IF diagnostic.admissibilityStatus == TRANSFORMATION_COMPATIBLE:
path = deterministic_lowest_lexicographic_codeword_path(candidate_state, canonical_codeword_set)
IF path exists:
RETURN {status: NORMALIZED, normalizedState: apply(path), diagnostic}
RETURN {status: BLOCKED, diagnostic}
END FUNCTION