Make coordinator launch atomic
This commit is contained in:
parent
e27d0dfcfe
commit
41f5a3dceb
8 changed files with 386 additions and 103 deletions
|
|
@ -1820,15 +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.
|
||||
Native worker launch is now one transaction. `coordinator_launch` owns revision
|
||||
refusal, prior terminal-link discovery, heartbeat planning, binding replacement,
|
||||
derived state, and atomic publication of runtime identity/session/job/event,
|
||||
worker request, optional Research Substrate Gate grant, and thread state. The
|
||||
bridge delegates planning and commit; its former runtime/grant/state writers are
|
||||
deleted and guarded against regrowth. Focused proof reads every document from
|
||||
the shared snapshot, while an injected batch refusal preserves the prior state
|
||||
with no partial job, worker request, or grant. The next cut is direct native
|
||||
`epiphany-mvp-coordinator` operation and removal of its `thread/epiphany/*`
|
||||
JSON-RPC dependency.
|
||||
|
||||
## Immediate Re-entry Instruction
|
||||
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ 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 Transaction Law
|
||||
|
||||
Launch planning now belongs to `coordinator_launch`: it validates the expected
|
||||
thread revision, inspects the prior runtime binding, prepares the heartbeat
|
||||
|
|
@ -178,13 +178,13 @@ 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.
|
||||
`commit_coordinator_job_launch` is the single launch publication owner. It
|
||||
prepares runtime identity, session, job, opened event, worker request, optional
|
||||
Research Substrate Gate grant, and linked thread state against one loaded
|
||||
CultCache snapshot, then publishes the heterogeneous set in one atomic batch.
|
||||
The compatibility bridge cannot write any member separately. Injected batch
|
||||
refusal proves the prior snapshot survives with no job, worker request, grant,
|
||||
or new state linkage. Rollback and reconciliation are not owners.
|
||||
|
||||
## Invariants
|
||||
|
||||
|
|
|
|||
Reference in a new issue