feat(supervisor): S4 owner-advance KanbanActor (ractor mailbox-as-owner)#576
Conversation
…wner) First real OUT-leg wire (enabled by the cont.30 ractor unblock). New lance-graph-supervisor::kanban_actor (feature = "supervisor"): - KanbanActor<O: MailboxSoaOwner>: a ractor actor whose State IS the owner (mailbox-as-owner — "every SoA is ractor-owned", operator). On KanbanMsg::Advance the owner advances ITSELF via the contract's checked try_advance_phase; illegal Rubicon edge -> typed RubiconTransitionError, no mutation. KanbanMsg::Phase reads back. - Single-writer by construction: ractor serializes one message at a time, so &mut state can't alias = the E-CE64-MB-4 no-race guarantee via &mut + mailbox, no lock. No bridge-held owner, no no-owner case. 2 tests green (advance + illegal-edge-no-mutation) under --features supervisor; clippy + fmt clean; light build (no lance/datafusion, no disk/symbiont gate). This is the owner-advance HALF of capstone S4. Remaining: the delivery edge (kanban.* -> where_is -> cast(Advance)) + S2/S3 drivers, which compose on top. Plan S4 row annotated; AGENT_LOG cont.31. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CcpLeEC3XK8Eye53GKBVvi
|
Warning Review limit reached
More reviews will be available in 20 minutes and 37 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bceb0799f8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| KanbanMsg::Advance { to, reply } => { | ||
| // Single-writer by construction: one message at a time. The owner | ||
| // advances ITSELF; nothing else holds it. | ||
| let result = state.try_advance_phase(to); |
There was a problem hiding this comment.
Reject stale phase-advance messages
When Advance is derived from a planned/scheduled KanbanMove, this handler only receives the target column and re-validates it against the actor's current phase. If another queued advance runs first, targets that are legal from multiple phases (notably Prune in KanbanColumn::next_phases, from both Planning and Evaluation) are accepted as a different transition instead of rejected, so a stale veto can prune the mailbox at the wrong lifecycle point. Carry and check the expected from phase (or the whole KanbanMove) before calling try_advance_phase.
Useful? React with 👍 / 👎.
…cast), S4 complete Completes S4 on top of #576's owner-advance actor. New in lance-graph-supervisor::kanban_actor: - parse_kanban_step("kanban.<mailbox>.<phase>") -> (mailbox, KanbanColumn) (snake_case phase vocabulary). - deliver_kanban_step(step_type): resolve the mailbox via the actor system's OWN name registry (ractor::registry::where_is) and cast KanbanMsg::Advance; relay the owner's try_advance_phase result. Address source = the step string + the registry — no bespoke bridge registry, no UnifiedStep field (the codex-#574-corrected design). - KanbanRouteError: BadStepType / NoMailbox (routing miss, not a no-owner case) / Illegal (relayed RubiconTransitionError) / Rpc. +2 tests (4 total green): parse shapes + delivery (legal advance via where_is, unknown mailbox -> NoMailbox, illegal edge -> Illegal, malformed -> BadStepType). clippy clean (fixed unnecessary_to_owned) + fmt; light build, no disk/symbiont. S4 mechanism is now COMPLETE end-to-end (owner-advance + delivery edge); only the S2/S3 drivers that SEND Advance remain, composing on top. AGENT_LOG cont.32. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CcpLeEC3XK8Eye53GKBVvi
…-trigger e2e test The five OUT/IN-leg drivers shipped across #576-#580 were reachable only by module path; lib.rs re-exported just KanbanActor + KanbanMsg. Promote the consumer surface so the live S3 consumer (when it lands in the symbiont golden-image harness, where the lance build fits) can `use` them directly: deliver_kanban_step, drive_mul_advance, drive_scheduled_tick, drive_version_tick, run_to_absorbing, KanbanRouteError. +1 test (15 total green): mixed_triggers_compose_on_one_owner_s2_gate_then_s3_ticks — the capstone integration. The S2 MUL gate takes the first Rubicon step (Flow qualia → Planning->CognitiveWork) and S3 version ticks (run_to_absorbing) carry the rest to Commit, proving the two different triggers compose on one mailbox-as-owner: no panic, no spurious rejection, lands absorbing. clippy + fmt clean; light build (no lance/datafusion/disk). Board hygiene: AGENT_LOG cont.37 prepended. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CcpLeEC3XK8Eye53GKBVvi
…-trigger e2e test The five OUT/IN-leg drivers shipped across #576-#580 were reachable only by module path; lib.rs re-exported just KanbanActor + KanbanMsg. Promote the consumer surface so the live S3 consumer (when it lands in the symbiont golden-image harness, where the lance build fits) can `use` them directly: deliver_kanban_step, drive_mul_advance, drive_scheduled_tick, drive_version_tick, run_to_absorbing, KanbanRouteError. +1 test (15 total green): mixed_triggers_compose_on_one_owner_s2_gate_then_s3_ticks — the capstone integration. The S2 MUL gate takes the first Rubicon step (Flow qualia → Planning->CognitiveWork) and S3 version ticks (run_to_absorbing) carry the rest to Commit, proving the two different triggers compose on one mailbox-as-owner: no panic, no spurious rejection, lands absorbing. clippy + fmt clean; light build (no lance/datafusion/disk). Board hygiene: AGENT_LOG cont.37 prepended. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CcpLeEC3XK8Eye53GKBVvi
S4 owner-advance —
KanbanActor(first real OUT-leg wire)"go" → the first real code on the OUT-leg (not docs/stubs), enabled by the #575 ractor unblock. A ractor actor that realizes your ownership model: every SoA is owned by its ractor actor; the owner advances itself.
What landed
lance-graph-supervisor::kanban_actor(feature =supervisor):KanbanActor<O: MailboxSoaOwner>— aractor::ActorwhoseStateis the owner (mailbox-as-owner). OnKanbanMsg::Advance { to, reply }the owner advances itself via the contract's checkedMailboxSoaOwner::try_advance_phase; an illegal Rubicon edge → typedRubiconTransitionError, no mutation.KanbanMsg::Phasereads back.&mut stateduringhandlecannot alias another writer — the E-CE64-MB-4 "no aliasing / no data race" guarantee, realized by&mut+ the mailbox, no lock, no bridge-held owner, no no-owner case (exactly your correction).Verified
--features supervisor:actor_advances_its_own_phase_on_message(Planning→CognitiveWork) andillegal_edge_is_a_typed_error_no_mutation(Planning→Commit rejected, phase unchanged).symbiontgate).Scope (honest)
This is the owner-advance half of S4 — the mechanism. Remaining: the delivery edge (
kanban.*step → mailbox id →ractor::registry::where_is→cast(Advance)) and the S2/S3 drivers that sendAdvance— both compose on top of this actor.Changes
crates/lance-graph-supervisor/src/kanban_actor.rs(new) +lib.rsre-export.claude/plans/capstone-out-leg-wiring-v1.md— S4 "owner-advance HALF shipped".claude/board/AGENT_LOG.md— cont.³¹🤖 Generated with Claude Code
Generated by Claude Code