test(surreal_container): additive seam falsifier — SurrealMailboxView → VersionScheduler → KanbanMove#510
Conversation
… → VersionScheduler → KanbanMove The scheduler→kanban→view path (version tick lowers to the next Rubicon move over a MailboxSoaView) existed only as doc-comment prose + one single-tick in-crate unit test against a hand-rolled FakeView. Nothing asserted the REAL SurrealMailboxView read-glove across the full Rubicon lifecycle. This adds that bench — additive, zero source change, and the first integration-test file in this crate. Five kill-condition-first tests (each pins the CONTRACT the doc-comment claims, not current behaviour — avoiding the stale-test trap): - full_rubicon_arc_lowers_to_legal_successors: every forward tick emits a DAG-sanctioned edge (can_transition_to); walks Planning→CognitiveWork→ Evaluation→Commit + Plan→Planning. - absorbing_columns_schedule_no_move: Commit/Prune yield None (lifecycle terminates). - libet_anchor_only_on_sigma_commit_crossing: -550_000µs stamped only on Planning→CognitiveWork; 0 elsewhere. - lowering_is_deterministic: same (view, version, exec) → same move. - exec_target_rides_onto_the_move: backend selector survives lowering. Scope: IN-direction seam only (contract-space; not the gated planner-emit half per #496 §9). Verified locally: 5/5 pass; fmt clean.
📝 WalkthroughWalkthroughA new test file ChangesScheduler Seam Falsifier Tests
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
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.
🧹 Nitpick comments (1)
crates/surreal_container/tests/scheduler_seam.rs (1)
37-49: ⚡ Quick winConsider verifying
mailboxandwitness_chain_positionpassthrough.The test verifies that
mv.from,mv.to, and the legality of the transition are correct, but does not check thatmv.mailboxmatchesview.mailbox_id()or thatmv.witness_chain_positionmatchesview.current_cycle(). According to the scheduler implementation, these fields should be populated from the view.Since the test suite includes a dedicated test for
execpassthrough (lines 117-125), consider adding similar verification formailboxandwitness_chain_positionto ensure these fields are correctly wired through the lowering pipeline.Suggested assertion additions
assert_eq!(mv.from, *from, "move.from must echo the observed phase"); assert_eq!(mv.to, *want_to, "{from:?} must lower to {want_to:?}"); + assert_eq!(mv.mailbox, 7, "move.mailbox must match view.mailbox_id()"); + assert_eq!(mv.witness_chain_position, 13, "move.witness_chain_position must match view.current_cycle()"); // The DAG itself must sanction the emitted edge — the falsifier.Alternatively, extract a dedicated test similar to
exec_target_rides_onto_the_movethat verifies mailbox and witness_chain_position passthrough across multiple phases.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@crates/surreal_container/tests/scheduler_seam.rs` around lines 37 - 49, The test loop iterating through arc.iter() verifies that mv.from, mv.to, and transition legality are correct, but omits assertions for the mailbox and witness_chain_position fields of the Move returned by on_version. Add assertions within the loop to verify that mv.mailbox matches view_at(*from).mailbox_id() and that mv.witness_chain_position matches view_at(*from).current_cycle(), ensuring these fields are correctly propagated from the view through the scheduler's lowering pipeline alongside the existing transition assertions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@crates/surreal_container/tests/scheduler_seam.rs`:
- Around line 37-49: The test loop iterating through arc.iter() verifies that
mv.from, mv.to, and transition legality are correct, but omits assertions for
the mailbox and witness_chain_position fields of the Move returned by
on_version. Add assertions within the loop to verify that mv.mailbox matches
view_at(*from).mailbox_id() and that mv.witness_chain_position matches
view_at(*from).current_cycle(), ensuring these fields are correctly propagated
from the view through the scheduler's lowering pipeline alongside the existing
transition assertions.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 70a8e946-4858-46b5-98cc-294053cf1da8
📒 Files selected for processing (1)
crates/surreal_container/tests/scheduler_seam.rs
PR #510 merged 2026-06-16 16:36 UTC (merge commit 0e6452c) on main — +125/-0 additive seam falsifier in crates/surreal_container/tests/ scheduler_seam.rs (first integration-test file in surreal_container). Five kill-condition-first tests pin the IN-direction of the surreal↔ kanban↔scheduler wiring (SurrealMailboxView → NextPhaseScheduler:: on_version → KanbanMove) against the real view (not FakeView): 1. full_rubicon_arc_lowers_to_legal_successors 2. absorbing_columns_schedule_no_move 3. libet_anchor_only_on_sigma_commit_crossing 4. lowering_is_deterministic 5. exec_target_rides_onto_the_move Out of scope (deferred, explicit in PR body): the OUT-direction = planner-emit KanbanMove (CognitiveCycle sequencer + §9 LOCKED from #496). D-MBX-A6-P3 remains the next unblock for closing the loop. This PR proves the downstream half; upstream still hand-rolled. Retroactive board update (merge landed before the same-commit hygiene rule could fire). Two files: PR_ARC_INVENTORY (prepend), LATEST_STATE (dated bullet + table row). https://claude.ai/code/session_01Xzyc27Nx3f8WC5KzwfWfjx
PR #510 merged 2026-06-16 16:36 UTC (merge commit 0e6452c) on main — +125/-0 additive seam falsifier in crates/surreal_container/tests/ scheduler_seam.rs (first integration-test file in surreal_container). Five kill-condition-first tests pin the IN-direction of the surreal↔ kanban↔scheduler wiring (SurrealMailboxView → NextPhaseScheduler:: on_version → KanbanMove) against the real view (not FakeView): 1. full_rubicon_arc_lowers_to_legal_successors 2. absorbing_columns_schedule_no_move 3. libet_anchor_only_on_sigma_commit_crossing 4. lowering_is_deterministic 5. exec_target_rides_onto_the_move Out of scope (deferred, explicit in PR body): the OUT-direction = planner-emit KanbanMove (CognitiveCycle sequencer + §9 LOCKED from #496). D-MBX-A6-P3 remains the next unblock for closing the loop. This PR proves the downstream half; upstream still hand-rolled. Retroactive board update (merge landed before the same-commit hygiene rule could fire). Two files: PR_ARC_INVENTORY (prepend), LATEST_STATE (dated bullet + table row). https://claude.ai/code/session_01Xzyc27Nx3f8WC5KzwfWfjx
PR #510 merged 2026-06-16 16:36 UTC (merge commit 0e6452c) on main — +125/-0 additive seam falsifier in crates/surreal_container/tests/ scheduler_seam.rs (first integration-test file in surreal_container). Five kill-condition-first tests pin the IN-direction of the surreal↔ kanban↔scheduler wiring (SurrealMailboxView → NextPhaseScheduler:: on_version → KanbanMove) against the real view (not FakeView): 1. full_rubicon_arc_lowers_to_legal_successors 2. absorbing_columns_schedule_no_move 3. libet_anchor_only_on_sigma_commit_crossing 4. lowering_is_deterministic 5. exec_target_rides_onto_the_move Out of scope (deferred, explicit in PR body): the OUT-direction = planner-emit KanbanMove (CognitiveCycle sequencer + §9 LOCKED from #496). D-MBX-A6-P3 remains the next unblock for closing the loop. This PR proves the downstream half; upstream still hand-rolled. Retroactive board update (merge landed before the same-commit hygiene rule could fire). Two files: PR_ARC_INVENTORY (prepend), LATEST_STATE (dated bullet + table row). https://claude.ai/code/session_01Xzyc27Nx3f8WC5KzwfWfjx
What
Adds a seam falsifier for the
SurrealMailboxView → VersionScheduler::on_version → KanbanMovepath — the IN-direction of the surreal↔kanban↔scheduler wiring.Additive: one new test file, zero source change. It is also the first integration-test file in
surreal_container(the crate had none).Why
The scheduler→kanban→view path (a Lance version tick lowering to the next Rubicon
KanbanMoveover aMailboxSoaView) existed only as doc-comment prose plus one single-tick in-crate unit test against a hand-rolledFakeView. Nothing asserted the realSurrealMailboxViewread-glove across the full Rubicon lifecycle. This puts that seam on a test bench.Each test is kill-condition-first — it pins the contract the doc-comment claims, not current behaviour (deliberately avoiding the stale-test trap that produced the 3 stale
bgz-tensorassertions fixed in #506):full_rubicon_arc_lowers_to_legal_successorscan_transition_to == false); walks Planning→CognitiveWork→Evaluation→Commit + Plan→Planningabsorbing_columns_schedule_no_moveCommit/Pruneschedule an advance → a non-terminating lifecyclelibet_anchor_only_on_sigma_commit_crossing-550_000µsreadiness anchor lands anywhere but the Planning→CognitiveWork Σ-commit crossinglowering_is_deterministic(view, version, exec)→ different move → hidden state leaked inexec_target_rides_onto_the_moveExecTargetbackend selector is dropped/rewritten during loweringScope (deliberate)
IN-direction seam only — contract-space (
SurrealMailboxView+NextPhaseScheduler, both reachable without the gated surrealdb cold-build path). This does not touch the contested planner-emit half (theCognitiveCyclesequencer + the §9 LOCKED decisions from #496), which is the planner-owning session's lane. This bench is the template that half can be verified against once it lands.Verification (local — sandbox has the full lance-7 toolchain)
Note
surreal_containeris not in any CI workflow, so — like the crate itself — this test runs locally / on-demand only. Another data point for the standing CI-coverage-gap follow-up (CI tests 4 of ~30 crates; two CI-invisible reds —causal-edge,bgz-tensor— have already been found and fixed this session).Generated by Claude Code
Summary by CodeRabbit