Move launch planning into core

This commit is contained in:
Meta Vens 2026-07-11 20:16:28 +01:00
commit e27d0dfcfe
7 changed files with 205 additions and 105 deletions

View file

@ -1820,6 +1820,16 @@ proof `.epiphany-smoke\repo-work-readiness-20260621-113714` and wrapper proof
The machine is no longer cleared to move outward. Free it from the Codex organ
first.
Native worker-launch planning has been extracted into
`epiphany-core/src/coordinator_launch.rs`. It owns revision refusal, prior
terminal-link discovery, heartbeat launch planning, binding replacement, and
the derived state update. The bridge delegates those decisions and a source
guard prevents the policy from growing back. The remaining launch wound is
transactional: runtime documents, the optional Substrate Gate grant, and
thread-state linkage are still separate compatibility writes. The next cut is
one prepared atomic launch commit with injected-failure proof; do not remove
the coordinator JSON-RPC dependency before that invariant is real.
## Immediate Re-entry Instruction
After compaction, first rehydrate and reorient from the listed files and git

View file

@ -170,6 +170,22 @@ interruption. Best-effort rollback across two files is not atomicity. A negative
smoke must inject failure after prerequisite receipts and after state write and
prove no unwitnessed accepted state becomes authoritative.
## Launch Transaction Wound
Launch planning now belongs to `coordinator_launch`: it validates the expected
thread revision, inspects the prior runtime binding, prepares the heartbeat
launch documents, and derives the new thread-state linkage without writing.
The Codex bridge is a compatibility actuator for that plan; it no longer owns
those policy decisions.
Persistence is not yet a coherent launch transaction. Runtime identity,
session, job, event, worker request, optional Substrate Gate grant, and thread
state linkage are still published through separate writes. None may become the
authoritative sign of a completed launch until one native commit primitive
publishes the prepared set atomically, or a typed prepared transaction gives
interruption a deterministic finish-or-refuse law. Rollback and reconciliation
are not owners.
## Invariants
- There is one durable thread-state owner and one runtime lifecycle owner.