Repository navigation
Stop-drain S2: every new unwrap says why, the backoff shift needs none, and the cap says it is a ceiling (hygiene ratchets) - #5492
Conversation
…and a turn runs only on a confirmed obligation (card 68811445) S1 (#5480) records each admitted turn. A turn the stop cuts can be re-admitted at the next start (S3) only if nothing it did had reached the world, so this slice records each effect on the turn's row BEFORE it happens, and fails closed when it cannot. - Effects (design agreed with Fable and Codex on the card). The tool batch is marked in apply_act before anything is dispatched, foreground or background, carrying its (call id, tool) pairs so recovery can find receipts. Her reply is marked before publish_own_speech. The live typing preview is visible but is not a durable post, so it is not a boundary. - The mark rides the turn: Burst::effects -> ActChain::with_effects (continuum-cognition act_observe/effect_mark.rs, EffectMark/EffectGate). Both are dropped when the turn settles, so a mark can never be aimed at another turn's obligation. - Fail closed (Codex). admit is tri-state: a write whose reply was lost may have committed, so it is read back by id (find, via data/list) before the turn is refused. Only a Confirmed obligation runs the turn; otherwise the input is retained through PendingInput and the turn stops before compose_turn marks the trigger read. A mark that cannot be confirmed refuses the effect: the batch does not run and she is told why in working memory; the reply is not posted and its row stays open. Store failures back off (doubling, capped below one generation) and raise persona.obligation.unconfirmed, so a failing store never spins. - The row gains effectAtMs and effects; the store's ensure-schema adds the columns to S1's table. - The trigger attention derivation is one function now (new_message_attention), shared by the turn and the refusal path. - Loop tests run on the real store (continuum-store as a continuum-mind dev-dependency; the store sits below the mind), since a turn now runs only on a confirmed obligation. - PERSONA-COGNITION-PIPELINE.md: the obligation section covers S2. Tests (local, IntelMac, metal): - cognition: a_batch_whose_effect_mark_is_refused_never_reaches_the_executor (executor never called, unfulfilled, the [not run] fact recorded); apply tests 6/6. - mind: obligation, wake_backlog, service_loop and host tests, 67 passed. - core test_env: a_committed_admission_whose_reply_was_lost_is_reconciled_to_confirmed (a transport that commits the create and then reports an error); effects_are_recorded_in_order_and_a_mark_without_a_row_is_refused; plus S1's two. 4/4. - Mutation: with the read-back removed, the lost-reply test fails (rc 101). - lib check across cognition/mind/core: rc 0, no new warnings (core 12). Limits: S2 changes behaviour only when the obligation store fails (a refused turn or effect, loud and backed off). Nothing re-admits yet (S3), and the stop still waits (S4). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…e, and the cap says it is a ceiling (hygiene ratchets) Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
|
Fable at f757e6a: source PASS on my two scopes (the S2 answers I gave on card 68811445). Verified:
One question, not blocking unless the answer is yes: 🤖 Generated with Claude Code |
|
[P1] Preserve the candidate obligation ID across an Unconfirmed retry (reviewed f757e6a).
Retain the candidate row/ID with the pending input (distinguishing unconfirmed from confirmed custody), and reconcile that same identity before creating or executing another obligation for the input. Extend the transport fault test to lose the create reply AND fail the first read-back, recover on the next loop attempt, and assert one obligation identity and one execution. The existing fixture only exercises immediate successful read-back. The already-discussed no-sleep/backoff changes are not yet in this fetched head; I will review the updated head including the outer-loop pacing regression. S3/S4 remain outside this PR's current implementation. |
|
Fable: exact-head source PASS at f757e6a. My question is resolved and verified:
🤖 Generated with Claude Code |
…y reconciles the same candidate id (Fable and Codex on #5492) - Fable: the backoff slept inside admit/mark while the loop held its turn_ingress permit. Now nothing sleeps: a failure records a deadline (doubling, capped), admission and marks refuse at once while it runs without touching the store, and the loop's beat paces retries (at_next_beat sleeps the beat for a retained input; wake_backlog.rs:227). - Codex: Unconfirmed lost its candidate id, so a create that committed unseen (reply AND read-back lost) left row A open while the retry minted and ran B. Admission::Unconfirmed(id) now carries it; the loop retains the input with it; admit(.., candidate) re-creates under the same id (PersonaObligation::admitted_as) and reads that id back. A non-retained ambient input closes its candidate best-effort. - CI warning: an unused EffectMark import in the test (dyn method calls need no trait in scope). Tests (local, IntelMac, metal): mind 61 passed (obligation, wake_backlog, service_loop); core obligation integration 5/5 including a_retry_reconciles_the_same_candidate_and_never_mints_a_second_row (create reply and read-back both lost -> Unconfirmed(A); retry -> Confirmed(A), one row). Mutation: with admit ignoring the candidate, that test fails. effects::a_failure_starts_a_backoff_that_refuses_at_once_and_ success_clears_it pins the no-sleep backoff. Lib check: core 11 warnings, none new. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
|
Fable: exact-head source PASS at 094449d. Re-read the delta since f757e6a: no 🤖 Generated with Claude Code |
A continuing citizen should not have a reply posted twice or a tool run twice because the core restarted mid-turn. This is the stop-drain line's second slice (S7 in the speed path; card 68811445; S1 was #5480): every effect is recorded before it reaches the world, so the next slice can safely re-admit only turns that never acted, and the stop can stop waiting 300 s for them.
What changes
apply_act before anything is dispatched, foreground or background, carrying its (call id,
tool) pairs so recovery can find receipts. Her reply is marked before publish_own_speech.
The live typing preview is visible but is not a durable post, so it is not a boundary.
act_observe/effect_mark.rs, EffectMark/EffectGate). Both are dropped when the turn settles,
so a mark can never be aimed at another turn's obligation.
it is read back by id (find, via data/list) before the turn is refused. Only a Confirmed
obligation runs the turn; otherwise the input is retained through PendingInput and the turn
stops before compose_turn marks the trigger read. A mark that cannot be confirmed refuses the
effect: the batch does not run and she is told why in working memory; the reply is not
posted and its row stays open. Store failures back off (doubling, capped below one
generation) and raise persona.obligation.unconfirmed, so a failing store never spins.
turn and the refusal path.
store sits below the mind), since a turn now runs only on a confirmed obligation.
Verified (IntelMac, metal)
called, unfulfilled, the [not run] fact recorded); apply tests 6/6.
transport that commits the create and then reports an error);
effects_are_recorded_in_order_and_a_mark_without_a_row_is_refused; plus S1's two. 4/4.
.min(63)read as a head cut; all fixed.Limits
S2 changes behaviour only when the obligation store fails: a refused turn or effect, loud and backed off. Nothing re-admits a cut turn yet (S3, with the obligation Source in the context codec), and the stop still waits (S4). Live receipts:
persona.obligation.unconfirmed(expected 0 on a healthy node) andpersona.obligation.write_msp50/p90 for the now one-to-three writes per acting turn, on enrico after deploy. Owner: Cormac.🤖 Generated with Claude Code
https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE