You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue tracks sequencing and release gates. Concrete implementation should be split into child issues; do not turn this into one long-lived implementation branch.
Do not implement all of ADR 002 before ADR 005/006. ADR 002 contains several projects: the shared journal, Plan IR, executor, concurrency/actors, and self-refinement.
Persist facts before exposing read-side continuity; stabilize turn continuity before asking Plans and monitors to consume it.
Every phase must preserve the current horizon-1 tool loop as a feature-flagged fallback.
Expand the executable effect frontier one class at a time.
Exactly-once applies to effects, not model reasoning.
A handle is syntax, never authority; every resolution rechecks conversation, resource, and information-flow scope.
Goal
Land ADR 002, ADR 005, and ADR 006 as a sequence of independently useful, reversible vertical slices:
This issue tracks sequencing and release gates. Concrete implementation should be split into child issues; do not turn this into one long-lived implementation branch.
Design authorities:
Sequencing principles
E0 — Shared durability substrate
Dependency: #14.
agent_turns.turn_ordinalwithUNIQUE (conversation_id, turn_ordinal).execution_ordinalwithUNIQUE (turn_id, execution_ordinal).Exit gate: no user-visible behavior change; restart cannot duplicate a committed send or silently retry an outcome-unknown effect.
E1 — ADR 005 digest continuity
t#<turn_ordinal>handles.context_expand(t#)over normalized journal traces.steer.fork-fromturns.turn_edgesand inject a deterministic ambient delta.Exit gate: continuation works correctly at the digest tier with no provider-wire replay.
E2 — ADR 006 scheduler unification
Behavior-preserving first slice.
monitorsasTimeCron + canned.m#<monitor_ordinal>.monitor_fireadmission state, idempotency key, and reclaimable lease.Exit gate: all existing reminder behavior passes unchanged through the monitor scheduler.
E3 — ADR 006 elaborated continuations and LedgerMatch
TimeCronopen a fresh ordinary horizon-1 turn after fire-time revalidation.IngestClass = LiveDelivery | Backfillto the adapter envelope, platform-event reservation, and canonical row.Backfill; unknown ingest classes fail closed for monitor evaluation.LedgerMatchinside canonical ingest with unique(monitor_id, canonical_message_id)fire records.monitor_fire; keepfork-fromas turn provenance only.Exit gate: live inbound rows fire at most once; backfill never fires; a committed fire survives restart without admitting two turns.
E4 — ADR 005 replay tier
Exit gate: replay produces no more duplicate or outcome-unknown effects than digest continuity and does not reduce answer quality.
E5 — ADR 002 Plan core, offline first
Goal,Plan,Expr,Predicate,VerifierRef, andValueRefcodecs.Expr/Predicatetotal, pure, bounded, and host-call-free.Exit gate: offline fixtures quantify parse/validation rate, quality, context occupancy, total tree tokens/cost, and expected deoptimizations.
E6 — Read-only partial-plan runtime
t#<turn_ordinal>:r<execution_ordinal>through persisted alternate keys and current scope.Exit gate: no increase in duplicate/outcome-unknown effects; answer quality is no worse than the current loop; rollback is a flag flip.
E7 — Expand the effect frontier
Open one class per evaluated release:
Fork/Join.Each checkbox requires its own replay gate and crash/deoptimization tests.
E8 — Durable child actors and typed futures
Exit gate: child work cannot widen the initiating human principal's authority or leak hidden child context.
E9 — ADR 006 ExternalPoll
trigger_inputresult row linked tomonitor_fire.t#:rhandle.Exit gate: no ambient credentials or target widening; poll/fire/dispatch crash windows are idempotent.
E10 — Journaled self-refinement
HarnessScopewrites under ordinary effect and role policy.Exit gate: refinement is reversible, attributable, scoped by default, and cannot edit the kernel that validates it.
Cross-phase release gates
Every user-visible phase must report and compare:
No phase advances solely because it reduces LLM calls.