Close canonical RepoModel organ loop

This commit is contained in:
Meta Vens 2026-07-13 22:29:10 +01:00
commit 0c90e4471d
28 changed files with 4070 additions and 278 deletions

View file

@ -27,6 +27,14 @@ roadmap mythology, and Self preserved dependency order without flattening those
different judgments into one running narrative. This is positive evidence for
durable organ-to-organ cognition, not merely for role-flavored prompting.
Do not substitute the first linear frontier identity proof for that larger
lesson. `Modeling -> Mind -> Self -> Hands -> Soul -> Modeling` proves that one
wound can retain causal identity. The awakened anatomy also needs typed backward
pressure: Eyes findings that challenge model claims, Imagination revisions that
change campaign shape, Soul rejections that create new evidence requirements,
and Self rerouting based on those admitted artifacts. Modeling is the shared
situational substrate, not the whole organism and not the product.
Persistence is the connective-tissue gap exposed by that success. Modeling's
repo anatomy, confirmed/changed/invalidated claims, freshness, frontier, and
semantic-index consequences must live in typed searchable state; Self must route
@ -44,14 +52,44 @@ or lost to concurrent valid patches: CultCache now provides exact-envelope CAS
and insert-if-absent beneath its cross-process sidecar lock, with hostile race
proofs. Soul rejected two earlier cuts before accepting this authority boundary.
Do not call this the complete Aetheria loop. Modeling worker output still cannot
carry a reviewed `RepoModelPatch`; Mind has no model-admission receipt binding
patch/result/evidence; Self does not select and bind one frontier identity into a
Hands grant; Hands consequences and Soul verdicts do not yet carry that same
model revision/hash/item identity; and Modeling therefore cannot close exactly
the wound Soul judged. The next cut is that closed identity chain, not more index
polish: `Modeling patch -> Mind admission -> Self route F -> Hands consequence F
-> Soul verdict F -> Modeling resolves F`.
The first causal-identity slice of that Aetheria loop is now closed. Modeling
emits a typed `RepoModelPatch`; Mind admits the exact immutable worker result,
patch bytes, evidence, review, and replacement model under one conditional
store transaction; Self selects one eligible Active frontier item from the
admitted current model; and the resulting route freezes model revision/hash,
item hash, claims, dependency order, and path scope. Hands intent, review,
Substrate grant, frontier authority, patch, command, and commit documents are
immutable insert-once records. Soul receives a typed verification request bound
to that complete chain. A later typed Modeling request binds the accepted Soul
result and permits exactly one verdict-incorporation revision of the same item:
`pass` yields `Resolved`; `needs-review`, `needs-evidence`, or `fail` yields
`Blocked`. Self derives Hands readiness from the same selection predicate, so
Blocked/Resolved items cannot be routed and no default implementation authority
survives without an admitted actionable frontier.
Soul found and forced cuts of four plausible green bypasses before accepting
the slice: ordinary Evolution could mutate routed frontier lifecycle; Hands
receipts and their intent/review/grant foundation were mutable by identity; the
Modeling request trusted caller-supplied temporal acceptance; and a split model
admission/thread-state commit could wedge on retry. Evolution is now barred
while a current-model route exists and cannot manufacture Blocked or terminal
frontier lifecycle. Every causal companion uses absent-only cross-process CAS
with exact retry. Final verdict admission replays the full authority and
consequence chain immediately before the model CAS. Verification acceptance is
reloaded from canonical thread state, and stable review identity makes the
split commit recoverable. Hostile substitution, stale-model, counterfeit,
concurrent-writer, crash-window retry, pass/nonpass, and nonselection tests are
green; the full core library proof is 303 passed and 1 ignored.
This is still not the whole Aetheria lesson. It proves durable causal identity
and backward Soul pressure, not the complete multi-organ correction ecology.
Eyes challenges and Imagination campaign revisions still need typed admission
and Self routes. The older `RepoWorkModelingRequest/Route/Finding` path is also
misnamed parallel closure machinery: it models one already-executed work item,
not repository anatomy. Preserve useful plan/execute receipts, but converge
that workflow on canonical RepoFrontier route/Hands/Soul/Modeling authority and
demote `RepoWorkMapEntry` to derived closure history. Do not let item-slug routes
or the legacy special Modeling worker close work independently of RepoModel.
The next artifact-contract audit then cut `epiphany.persona_chat.v0`: its live
writer and catalog had disagreed on field vocabulary, evidence fields, and

View file

@ -0,0 +1,91 @@
# Repo Frontier Organ Loop
## Objective
Preserve the Aetheria-shaped engineering loop as typed causal identity, not as
coordinator memory or prompt roleplay. One repository wound must remain the same
wound while Modeling describes it, Mind admits it, Self routes it, Hands acts on
it, Soul judges it, and Modeling closes or revises it.
This closed route is the first proof slice, not the whole Aetheria lesson. The
larger success was corrective circulation between distinct organs: Eyes could
invalidate substrate assumptions, Imagination could revise campaign shape, Soul
could reject a locally green implementation, and Self could reorder work from
those durable artifacts. RepoModel is connective tissue for that cognition; it
is not a substitute for it. Later slices must admit typed challenges and plan
revisions from those organs without giving any of them direct model-write
authority.
## Authority Map
- Owner: the canonical `RepoModel` entry inside the runtime-spine CultCache.
- Inputs: immutable Modeling worker result, exact patch bytes and base model
identity, accepted evidence, and—when resolving work—the exact frontier route,
Hands consequence chain, and Soul verdict.
- Outputs: a replacement model plus immutable specialized Mind review and model
admission receipt committed in one conditional batch.
- Derived state: thread-state graphs/frontier/checkpoint are continuity and UI
projections; semantic indexes rank eligible typed claims; prompt context and
gate JSON explain admitted authority but never create it.
- Forbidden writers: sibling-store refresh, generic Modeling `statePatch`
anatomy, coordinator reason strings, `frontierNodeIds`, evidence-id prefix
matching, and dashboard/operator projections.
- Shared path: `Modeling patch -> Mind admission -> Self route F -> Hands intent
and consequence F -> Soul request and verdict F -> Modeling resolves F`.
- Deletion line: remove sibling `memory-graph.msgpack` as a live authority after
one explicit import; remove Modeling graph/frontier writes from generic role
acceptance; refuse `ContinueImplementation` without an admitted current route;
replace prefix-based Hands-chain inference with typed reload and validation.
## Atomic Boundaries
1. Modeling result is immutable worker evidence.
2. Exact current-model compare-and-swap plus specialized Mind review and model
admission receipt is one runtime-spine store transaction.
3. Self route insertion verifies the same current model and frontier item under
the conditional store lock.
4. Hands preflight verifies current route before consequence; immutable receipts
preserve historical truth afterward.
5. Soul request binds one complete typed Hands chain; accepted verdict binds that
request and route.
6. Resolution admission validates the same route and verdict before replacing the
model and making the frontier ineligible for subsequent selection.
## Invariants
- No model effect exists without its admission receipt in the same snapshot.
- No admission receipt can claim a model revision/hash absent from that snapshot.
- A route freezes model revision/hash, frontier item hash, target claims, source
scope, and selected organ.
- Hands cannot act from prompt prose or gate JSON; it requires the persisted route.
- Soul cannot judge a substituted or partial Hands chain.
- A resolution patch can affect only the routed frontier item in the first closed
loop slice.
- Once F is resolved, retired, or superseded, Self cannot select F again.
## Landed Causal Slice
1. Conditional atomic batches and absent-only insertions protect the single-file
CultCache store under its cross-process lock.
2. Runtime-spine owns the imported canonical RepoModel and specialized Modeling
result plus Mind admission documents.
3. Self selects an eligible frontier item and binds the main-agent Hands gate to
an immutable route; no actionable route means no Hands authority.
4. Immutable Substrate, Hands, Soul verification, and Modeling request documents
preserve exact causal identity. Final admission replays the complete chain.
5. Verdict incorporation changes exactly the routed frontier item. Pass resolves;
nonpass blocks. Hostile substitution, concurrent identity, stale model,
split-retry, and terminal nonselection proofs pass, and independent Soul review
accepts this slice.
## Next Deletion Line
`RepoWorkModelingRequest`, `RepoWorkModelingRoute`, and
`RepoWorkModelingFinding` describe post-execution workflow closure, not repository
anatomy. Their item-slug route and `RepoWorkMapEntry` closure ledger must not
remain a second Modeling/Self/Mind truth. Preserve useful repo-work planning and
execution receipts only behind canonical `RepoFrontierRoute` and
`RepoFrontierHandsAuthority`; use the canonical Hands/Soul/verdict-incorporation
path; demote the old map to derived closure history or delete it. After that,
admit typed Eyes challenges and Imagination campaign revisions so blocked
frontier pressure can circulate to the correct organ.