Repository navigation
Suspend a persona through its owned parts in one call - #6131
Merged
joelteply merged 3 commits intoNov 18, 2026
Merged
Conversation
joelteply
added a commit
that referenced
this pull request
Nov 18, 2026
…nces are tagged; a partial unit cannot be built (Codex on #6130) - Roles::stage returns the unit and its copy-in fence on every refusal (Refused { reason, returned }) and refuses a fence for another persona, epoch or direction. - Roles::handoff takes no fence: it binds next once her copy-in lands and leaves the previous mind AwaitingCopyOut, so no read of her blocks starts before she stops being active. The completion owner begins the copy-out after the bind and attaches it with begin_retire, which returns the fence on refusal (nobody retiring, already moving, wrong tag). release_retired waits for it to land; the next handoff waits for the release. - Fence carries a FenceTag (persona, epoch, direction). - PersonaUnit::assemble and PartialMove are gone: the only constructor takes a complete PersonaParts (Codex's single declaration, #6131), so a partial move is unrepresentable. - Contract tests use non-Clone, drop-counted units and fences: a refusal that drops custody fails. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply
merged commit Nov 18, 2026
bbdecfc
into
fable/persona-engine-objects
49 of 50 checks passed
joelteply
added a commit
that referenced
this pull request
Nov 18, 2026
…API before integration) (#6130) * The persona engine's objects: PersonaUnit moves whole, Roles holds exactly one active mind, Tier and NextPolicy are traits CONTINUUM-ENGINE 4.14, API before integration (Codex). One mind decodes at a time by construction: Roles has one active place; the next is staged as data under its copy-in fence; handoff binds her only after that fence and moves the previous mind to retiring under its copy-out fence; release_retired gives her back to her tier only once it lands. PersonaUnit owns her five parts and assemble() refuses a partial move by name. Tier (one contract for device, host, unified and flash) and NextPolicy (who is next, learnable) are the traits the native adapters over the fork's llama_persona_* / llama_state_seq_* calls implement next. The engine is libllama called through its API in-process: no llama-server, no launch flags, no slot count. Contract tests (pipeline/tests.rs): one active mind and the next staged not decoding; fence-before-ready; retire-after-handoff with the previous retirement landing first; refuse-partial; no mind in two places. Lints deny unwrap/expect/panic. Replaces #6129 (a lane count on llama-server's --parallel), closed per Joel: objects, not flags. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * Cascade persona suspension through its declared parts * Poll sibling suspension futures together while fences are pending * Exercise the independent persona engine in CI scope fixtures * Every refusal returns custody; the copy-out begins after the bind; fences are tagged; a partial unit cannot be built (Codex on #6130) - Roles::stage returns the unit and its copy-in fence on every refusal (Refused { reason, returned }) and refuses a fence for another persona, epoch or direction. - Roles::handoff takes no fence: it binds next once her copy-in lands and leaves the previous mind AwaitingCopyOut, so no read of her blocks starts before she stops being active. The completion owner begins the copy-out after the bind and attaches it with begin_retire, which returns the fence on refusal (nobody retiring, already moving, wrong tag). release_retired waits for it to land; the next handoff waits for the release. - Fence carries a FenceTag (persona, epoch, direction). - PersonaUnit::assemble and PartialMove are gone: the only constructor takes a complete PersonaParts (Codex's single declaration, #6131), so a partial move is unrepresentable. - Contract tests use non-Clone, drop-counted units and fences: a refusal that drops custody fails. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * The Core describes the exact copy-out to begin; Tier::begin takes that typed descriptor (Codex on #6130) Tier::copy_in/copy_out(PersonaId) become Tier::begin(FenceTag): the adapter is handed her persona, epoch and direction, and the fence it returns carries the same tag. Roles::awaiting_copy_out returns the FenceTag of the mind awaiting her copy-out, so the completion owner begins exactly that transfer with no second lookup by id that could name another generation. Test: a test tier begins the described copy-out (accepted, released with her epoch); a transfer of a stale epoch is refused with its fence returned. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * Persona engine tests: the test part's behaviours are one enum, and each test expect names its precondition (state_as_flags, unjustified_unwraps) Codex's lifecycle fixture held release_after_retry and failure as two bools (four states, three used): now Behaviour { Ready, PendingOnce, Fails }. Each expect in the pipeline contract tests carries its same-line justification. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #6130. PersonaUnit delegates suspend to its declared PersonaParts. The same declaration supplies the child traversal and typed results. A pending or failed child retains custody and siblings report their own results. Six crate tests passed locally, including a failure and pending learning fence in the same traversal followed by a retry. Native adapters and the serving caller still belong to the engine integration. This change does not put suspension on the warm handoff path.