Recover exact receipt-free coordinator deaths

This commit is contained in:
Meta Vens 2026-08-10 09:51:10 +01:00
commit e97ee1fa1b
9 changed files with 1250 additions and 92 deletions

View file

@ -2860,6 +2860,63 @@ bind the opened session to exact process or resident lease identity, prove that
identity dead, and terminalize or quarantine the session through a dedicated
receipt-grounded recovery path before retention can see it as closed.
#### Receipt-free coordinator death authority map
- Owner: resident Self owns the exact child lease and its process-incarnation
observation; runtime Continuity owns terminal recovery of the corresponding
orphaned coordinator session.
- Inputs: the persisted active resident lease, its immutable child claim and
terminal grant, an exact `Missing` or `Exited` observation for that process
incarnation, and the runtime's matching Active coordinator session plus
deterministic start event.
- Outputs: one typed coordinator-death recovery receipt and one deterministic
recovery event, atomically replacing the runtime session as Completed. Self
then uses its existing exact-grant cancellation transaction to requeue the
pressure.
- Identity split: the cognitive thread remains request-owned context. A
resident coordinator session is a distinct run incarnation derived from the
exact resident launch digest; ordinary non-resident runs retain the simple
`coordinator-{thread}` identity. Requeue therefore creates a new session
without rewriting or reusing the cognitive thread.
- Derived state: timestamps, session age, receipt absence, PID presence, and
operator projections remain observations only. None can establish death.
- Forbidden writers: retention, legacy coordinator repair, the coordinator
itself after death, generic runtime session closure, and timeout policy may
not synthesize this terminal family. A normal coordinator receipt and a
death-recovery receipt are mutually exclusive.
- Shared paths: zero exit without a receipt, nonzero exit without a receipt,
and restart observation of a missing exact child share one settlement
classifier. Death before runtime opening proves that exact incarnation family
wholly absent and requeues without inventing runtime state. Death after
opening uses the recovery transaction. Normal exits with an exact fully bound
run receipt retain the normal finalizer path.
- Typed-work boundary: authenticated terminal typed fulfillment lets the
death-recovery authority close the original grant exactly once without a
duplicate launch. No typed attempt permits canonical requeue. A typed launch
attempt without terminal fulfillment remains active and
`awaiting-fulfillment`; Continuity does not yet own orphan-worker terminality
or supersession, so timeout or brake cannot manufacture a retry.
- Cut line: replace direct receipt-free resident cancellation with runtime
recovery followed by canonical resident cancellation, and stop using the
cognitive thread as the resident run identity; do not add an age-based
scavenger or let session retention repair Active state.
- Verification: exact lease/claim/session/thread/objective/start-event binding,
hostile substitution refusal, live or indeterminate process refusal,
single-use replay, full-snapshot CAS refusal, mutual exclusion with normal
receipts, restart recovery, pressure requeue without grant resurrection, and
eventual archive of the recovered terminal family.
Retry artifacts are grant-incarnation-owned rather than thread-owned. Prepared
argv carries `artifact_root/{grant_id}`, so a new launch on the same cognitive
thread cannot erase the prior attempt's sealed directory.
Source verification for this cut is complete: the serial core suite passed 653
tests with one intentional ignore, followed by all 17 coordinator-binary tests
and all 8 swarm tests. The detached receipt is
`.epiphany-run/continuity-death-recovery-source`; stderr is empty and exit is
zero. Exact packaging and copied-live process-death falsification remain the
acceptance boundary.
### Semantic logical lifecycle implementation
`retain_memory_semantic_projection_lifecycles` now realizes the safe unattempted

View file

@ -2075,3 +2075,48 @@ Normal coordinator lifecycle ownership is accepted. The next distinct fault is
a hard process death after atomic opening but before any receipt. Continuity
must ground that repair in exact process/lease authority; age, retention, and
absence of a receipt cannot infer death.
## Receipt-free coordinator death recovery source cut — 2026-08-10
The Continuity owner is now implemented but not yet packaged. Resident Self
requires its exact persisted active lease, immutable child claim, active
unterminated grant, and an independent native observation proving the exact
process incarnation exited, disappeared, or was replaced. Exact-alive,
inaccessible, and indeterminate observations refuse recovery. Runtime
Continuity then atomically replaces only the matching Active jobless
coordinator session as Completed while appending one typed death-recovery
receipt and one deterministic recovery event. A normal coordinator receipt and
a death-recovery receipt cannot coexist. Replays are exact and snapshot races
leave the Active family unchanged.
The cut exposed and removed a deeper identity conflation. The cognitive thread
is request-owned context and must survive retries; it is not a run identity.
Ordinary coordinators retain `coordinator-{thread}` sessions, while resident
coordinator sessions are now derived from the exact launch digest. A cancelled
grant therefore terminalizes and requeues through the existing resident CAS,
then the new grant produces a distinct session incarnation on the same
cognitive thread. Archived session tombstones and terminal families still
refuse exact incarnation reuse.
The receipt-free classifier distinguishes three crash boundaries. If the exact
process died before atomic runtime opening, the entire incarnation family must
be absent and resident cancellation may requeue without synthetic runtime
state. If a typed result is already authenticated, runtime death recovery can
terminalize the process and the original grant closes as
`recovered-fulfilled`. If a typed worker launch exists without terminal
fulfillment, the active lease remains `awaiting-fulfillment`; duplicate launch
is forbidden until orphan-worker terminality and explicit supersession have a
real owner. This last Continuity seam remains open. Retry artifact directories
are keyed by grant incarnation, not cognitive thread, preserving prior attempt
evidence byte-for-byte.
Focused death-recovery, resident requeue/new-incarnation, and legacy retention
tests pass. Final serial verification under
`.epiphany-run/continuity-death-recovery-source` passed 653 library tests with
one intentional ignore, all 17 coordinator-binary tests, and all 8 swarm tests;
stderr is empty and the detached suite recorded exit zero. The first parallel
full-library run had exposed one real eager-fallback archive bug plus two Git
fixture flakes; the archive bug is fixed, the serial suite removes the fixture
contention, and the complete corrected source pass is green. Commit, exact
packaging, and copied-live hard-death proof remain. Active c005 remains
untouched.