Skip to content

ABI Layer 3: rest-for-one restart strategy (idempotence + child-set preservation)#36

Merged
hyperpolymath merged 3 commits into
mainfrom
claude/new-session-znxgm7
Jun 28, 2026
Merged

ABI Layer 3: rest-for-one restart strategy (idempotence + child-set preservation)#36
hyperpolymath merged 3 commits into
mainfrom
claude/new-session-znxgm7

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

Layer 3 (second, deeper invariant): models the OTP rest_for_one strategy and proves idempotence (restForOne t . restForOne t = restForOne t — an algebraic fixpoint law), child-id-set preservation, and prefix-untouched (children before the target survive identically). Distinct from and deeper than the Layer-2 one-for-one "siblings untouched" theorem.

New module Otpiser.ABI.Invariants (imports the Layer-2 Semantics model). Sound+complete Dec, 5 positive + 3 non-vacuity controls.

Testing

Idris2 0.7.0 --build → exit 0, zero warnings. Adversarial rejection confirmed. build/ removed. No believe_me/postulate/sorry.

🤖 Generated with Claude Code

https://claude.ai/code/session_01A6PSzJWpRxtzGDjUCEh7Mx


Generated by Claude Code

claude and others added 3 commits June 27, 2026 19:50
Add Otpiser.ABI.Semantics: a faithful Idris2 model of a one-for-one OTP
supervisor (children keyed by id, each Running/Failed) and a restart step,
with machine-checked proofs of the headline fault-tolerance invariant:

  - restartPreservesChildSet: restarting any child leaves the ordered set
    of supervised child ids unchanged (real propositional equality).
  - restartLeavesOthersUntouched: every sibling whose id differs from the
    target survives the restart byte-for-byte identical (Elem soundness).
  - restartHeadRuns / RestartedRunning: the targeted child is set Running.

Positive controls exhibit concrete witnesses over a 3-worker supervisor;
the negative control (negativeSiblingNotReset) refutes, by machine, the
OneForAll-style claim that a failed sibling is reset — establishing the
property is non-vacuous. No believe_me / postulate / assert_total.

Registered in otpiser-abi.ipkg; ABI builds clean with zero warnings.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A6PSzJWpRxtzGDjUCEh7Mx
…hed)

Add Otpiser.ABI.Invariants, a second machine-checked theorem distinct from
and deeper than the Layer-2 one-for-one flagship. Reuses the Semantics model
(Child/ChildStatus/Supervisor) and reasons about the rest_for_one transition:

  T1 IDEMPOTENCE (algebraic law): restForOne target . restForOne target
     = restForOne target  -- a genuine fixpoint, proven via a triggered-branch
     lemma; not a restatement of "siblings untouched".
  T2 child-id-set preservation across the rest-for-one transition.
  T3 prefix-untouched: children strictly before the target survive identically
     (the directional core of rest-for-one), via a BeforeTarget certificate.
  T4 sound+complete Dec (decIsTargetHead) + certifier.

Five positive controls (concrete witnesses incl. Refl-checked transition shape
and idempotence) and three negative/non-vacuity controls (Not-Elem refutation,
decision refutation, not-the-identity). No believe_me/postulate/assert_total;
%default total; SPDX MPL-2.0. Registered last in otpiser-abi.ipkg. Clean build
(0 warnings); adversarial false-equality check rejected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A6PSzJWpRxtzGDjUCEh7Mx
@hyperpolymath hyperpolymath marked this pull request as ready for review June 28, 2026 05:42
@hyperpolymath hyperpolymath merged commit 625d2b3 into main Jun 28, 2026
22 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants