Skip to content

V3 W1 START: Fable-5 preflight deltas (10-point), WAL-shaped writer probes, adoption-scan baseline, D-PERT-1#630

Merged
AdaWorldAPI merged 15 commits into
mainfrom
claude/v3-substrate-migration-review-o0yoxv
Jul 2, 2026
Merged

V3 W1 START: Fable-5 preflight deltas (10-point), WAL-shaped writer probes, adoption-scan baseline, D-PERT-1#630
AdaWorldAPI merged 15 commits into
mainfrom
claude/v3-substrate-migration-review-o0yoxv

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Jul 2, 2026

Copy link
Copy Markdown
Owner

What

Starts the V3 W1 wave (the keystone) on top of merged #629, carrying the operator-authorized Fable-5 preflight pass so every other session converges on the same deltas.

Docs / governance (landed)

  • Post-merge hygiene for board+handover+contract: post-#628 hygiene, V3/flip integration guide, mailbox-ownership doctrine + SoaEnvelope::mailbox_owner #629 — LATEST_STATE row + PR_ARC_INVENTORY entry.
  • Preflight addendum (.claude/v3/INTEGRATION-PLAN.md Addendum 2026-07-02, E-V3-PREFLIGHT-1): ten deltas, headline ones:
    • M24 — the kanban board IS the write-ahead log: cast = move = intent record, ack = confirmation; W1b/W1c collapse into one WAL-shaped writer; crash recovery = replay unacked casts.
    • M7 ruling recommendation: SoaEnvelope re-scoped as the spec/certification surface (zero production impls; verify_layout + field-isolation matrix are the value).
    • Baseline inversion: the W6a adoption scanner runs at W1 start so "adoption 100%" has a measured t₀ denominator.
    • W3 oracle ratchet: oracle-hit rate must trend down vs template-catalogue size, or deterministic-first is silently dead.
    • W2 reorder: dispatch probe → budget → arms; probe at batch 1/64/4096; loser owns the slow/plan path.
    • Ractor batching by API shape (Vec<KanbanMove> per message — helper-scope by construction), D-PERT-1 + M21 pull-forwards, gate-run rule, supervisor stays thin.
  • STATUS_BOARD: D-V3-W1b/c/d/e flipped to In progress.

Code (landing on this branch as the fleet completes)

  • D-V3-W1e probe-first: batch_writer skeleton + 3 ignored failing probes (ahead-ordering, kill-after-cast replay, delegation miss).
  • D-V3-W6a counting logic in contract (ClassidForm, count_adoption) — all three legacy shapes via the compat-reader procedure, no bit math.
  • D-PERT-1: mechanical ResonanceDtoPerturbationDto (+ deprecated alias); perspectival awareness_dto.rs untouched.

Why

The preflight collapses were all reorders/merges of machinery the plan already carried (the V3-shape test) — landing them before W1 code means every later wave consumes them instead of rediscovering them.

Verification

  • cargo test -p lance-graph-supervisor --features supervisor — 22 green (ractor ownership attestation, AdaWorldAPI fork).
  • Fleet code lands with targeted per-crate cargo test + central /v3-audit gate-run before each push (results in AGENT_LOG).

🤖 Generated with Claude Code

https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM


Generated by Claude Code

Summary by CodeRabbit

  • New Features

    • Added class ID adoption-scanning support to measure canonical vs. legacy formats.
    • Introduced batch-writer scaffolding for tracking pending actions and replayable state.
    • Updated thinking-engine outputs to use the new perturbation DTO naming across engine paths.
  • Bug Fixes

    • Corrected documentation and planning notes to reflect production behavior and current integration status.
    • Clarified ownership, replay, and scan-order expectations in release notes and status boards.
  • Tests

    • Added probe-style tests covering cast/ack flow, replay visibility, and owner resolution caching.

claude added 3 commits July 2, 2026 11:49
Records the merged V3 substrate entry-point arc: .claude/v3/ tree,
mailbox-kanban doctrine locks, ractor helper-scope ruling, and the
mailbox-as-owner compile attestation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM
WAL-shaped W1 writer (M24: board = write-ahead log), M7 re-scope
ruling recommendation, W6a baseline inversion, W3 oracle ratchet
metric, W2 probe-first reorder, ractor batching by API shape,
D-PERT-1 + M21 pull-forwards into W1, gate-run rule, supervisor
stays thin. EPIPHANIES E-V3-PREFLIGHT-1.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM
…ht deltas applied)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@AdaWorldAPI, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 43 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

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, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9e4f8ef5-f66e-44a2-8ed9-e81f9677e323

📥 Commits

Reviewing files that changed from the base of the PR and between 9dfaf40 and 6038e92.

📒 Files selected for processing (5)
  • .claude/board/EPIPHANIES.md
  • .claude/v3/ENTROPY-MILESTONES.md
  • .claude/v3/INTEGRATION-PLAN.md
  • crates/lance-graph-planner/src/batch_writer.rs
  • crates/lance-graph-planner/tests/w1_probes.rs
📝 Walkthrough

Walkthrough

This PR bundles V3 planning/board documentation updates, a new classid adoption-scan counting module in lance-graph-contract, a stubbed BatchWriter skeleton with probe tests in lance-graph-planner, and a rename of ResonanceDto to PerturbationDto (with deprecated alias) across thinking-engine and its callers.

Changes

V3 Planning Documentation

Layer / File(s) Summary
Board and milestone tracking
.claude/board/EPIPHANIES.md, .claude/board/LATEST_STATE.md, .claude/board/PR_ARC_INVENTORY.md, .claude/board/STATUS_BOARD.md, .claude/v3/ENTROPY-MILESTONES.md
New epiphany notes, PR #629 shipped-record, status updates for W1b–W1e, and M7 resolution plus new M24/M25 milestone entries.
Integration plan addenda
.claude/v3/INTEGRATION-PLAN.md
Six sequential addenda/corrections covering writer semantics, scanner ordering, planner-SoA audit findings, benchmarks, M25 design, and W1b design closure.

Classid Adoption Scan

Layer / File(s) Summary
Classification and aggregation logic
crates/lance-graph-contract/src/classid_scan.rs, crates/lance-graph-contract/src/lib.rs
New ClassidForm, classify_form, AdoptionCounts, and count_adoption implementing single-pass classid classification/aggregation, plus tests and module export.

Batch Writer Skeleton

Layer / File(s) Summary
BatchWriter type and stubs
crates/lance-graph-planner/src/batch_writer.rs, crates/lance-graph-planner/src/lib.rs
New CastId and BatchWriter<P> types with cast/ack/unacked/intent_moves/resolve_owner stubbed via todo!, exported from the crate.
Probe tests
crates/lance-graph-planner/tests/w1_probes.rs
Ignored tests specifying expected ordering, replay, and delegation-cache behavior for BatchWriter.

ResonanceDto → PerturbationDto Rename

Layer / File(s) Summary
DTO definition
crates/thinking-engine/src/dto.rs
PerturbationDto struct replaces ResonanceDto; ResonanceDto becomes a deprecated type alias.
Engine call sites
crates/thinking-engine/src/bf16_engine.rs, composite_engine.rs, dual_engine.rs, engine.rs, f32_engine.rs, signed_engine.rs
think, think_with_temperature, and commit methods updated to construct/return PerturbationDto.
Docs rename
crates/cognitive-shader-driver/src/engine_bridge.rs
Documentation and section headers updated to reference PerturbationDto.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Caller
  participant BatchWriter
  participant Board as "Board (moves)"
  participant AckSet

  Caller->>BatchWriter: cast(on_behalf, moves, payload)
  BatchWriter->>Board: record intent moves (ahead of ack)
  BatchWriter-->>Caller: CastId
  Caller->>BatchWriter: intent_moves(cast_id)
  BatchWriter->>Board: read recorded moves
  Board-->>Caller: moves (crash-replay visible)
  Caller->>BatchWriter: ack(cast_id)
  BatchWriter->>AckSet: mark cast acked
  Caller->>BatchWriter: unacked()
  BatchWriter-->>Caller: remaining un-acked casts
Loading

Poem

A rabbit hops through docs and code today,
Renaming DTOs along the way. 🐇
classid_scan counts the old from new,
BatchWriter waits, todo! in view.
Cast, then ack — replay if crashed we fall,
Board keeps the truth, the WAL of all! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: W1 preflight deltas, WAL-shaped writer probes, adoption-scan work, and the DTO rename.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…ph handler (M25)

Operator-directed rs-graph-llm + rig evaluation folded into W2e/W3b/W3c;
Session transitions persist as KanbanMoves through the W1b writer, so
replay = rebuild from the board (unifies with M24 board-as-WAL).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 185425a601

ℹ️ 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".

Comment on lines +141 to +144
2. **M7 ruling recommendation:** re-scope `SoaEnvelope` as the spec/descriptor
certification surface (`verify_layout` + field-isolation matrix are the
value; trait polymorphism has zero production impls). Doc-line ruling,
unblocks W1 without refactor.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Account for the existing SoaEnvelope implementation

This re-scopes SoaEnvelope on the premise that trait polymorphism has zero production impls, but the contract already has a non-test implementation at crates/lance-graph-contract/src/canonical_node.rs:1275 for NodeRowPacket<'a>, which exposes NodeRow slices to Lance through this trait. W1 implementers following this addendum could incorrectly treat the trait as descriptor-only and skip preserving/testing the live NodeRowPacket envelope path and its owner/byte-layout behavior.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed and corrected in e2ee6fbd — the premise was wrong. impl<'a> SoaEnvelope for NodeRowPacket<'a> (canonical_node.rs:1275) is a live production impl: the Lance-facing zero-copy envelope exposing &[NodeRow] as LE bytes (NODE_ROW_COLUMNS / NODE_ROW_STRIDE / as_le_bytes over repr(C, align(64)) with const size asserts).

Revised M7 ruling (plan Correction section + ENTROPY M7 row + E-V3-PREFLIGHT-1-CORRECTION): the two surfaces are complementary, not duplicatesSoaEnvelope is the storage-boundary surface (certification + the canonical Lance byte path, NodeRowPacket as its live impl); MailboxSoaView/Owner is the runtime read/mutate surface. W1 implementers MUST route storage bytes through the NodeRowPacket envelope path and preserve/test its owner/byte-layout behavior — the trait is explicitly NOT descriptor-only. Also folded the process lesson: negative-existence claims in rulings now carry the same exhaustive-grep declaration required of worker reports (the original claim was inherited from a fleet inventory row and repeated unverified).


Generated by Claude Code

claude added 7 commits July 2, 2026 12:01
…robes

WAL-shaped BatchWriter<P> skeleton (M24: cast = intent record, ack =
confirmation, unacked = replay surface, resolve_owner = W1c delegation
cache) with todo! bodies. Three #[ignore]d probes fail as designed
(ahead-update ordering, kill-after-cast replay, delegation miss-then-hit)
— the W1b implementation commit un-ignores them.

Uses the SHIPPED contract types (KanbanMove kanban.rs:151, KanbanColumn,
MailboxId collapse_gate.rs:121) — no mint needed; the brief's
conditional mint did not fire.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM
…urbationDto (M2)

The mechanical Morton-tile inverse-pyramid field (Psi) renames to
PerturbationDto with a deprecated ResonanceDto alias at the definition
site; the perspectival (Piaget Three-Mountains) ResonanceDto in
awareness_dto.rs KEEPS its name, untouched. 8 files; cascade key-tier
vocabulary untouched. thinking-engine 362 tests green; shader-driver
(with-engine) 100 green; zero in-crate deprecated-alias usage remains.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM
…ormant; 3 deltas

KanbanMove already unifies mailbox/witness/libet/exec at the contract
level; supervisor + core + symbiont WIRED; planner crate is the gap
(zero SoA-view refs, zero classid awareness, GATE-1 false friend).
W2b gains real-owner integration probe; M15 upgraded to blocking
before any planner->kanban emission.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM
… count_adoption

Mirrors classid_canon_compat's decision procedure exactly (zero bit
math): CanonHigh vs the three documented legacy shapes (zero-prefix,
pre-flip V3-marker-high, render-prefix-high) per routing.md §5.
Ambiguous variant reserved (#[non_exhaustive]) for the documented
0x1000-domain collision bound; never constructed today. Tests via
sanctioned composers only (F12). 10/10 new tests; full contract suite
771 green. Baseline finding: no real classid-keyed Lance corpora in
this container (toy fixture only) — t0 baseline runs where data lives
once the CLI wrapper lands.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM
… M25 design finalized

~0.4-0.5 us/step measured; KanbanSessionStorage = snapshot upsert +
move cast via W1b writer; the append-only move log already exists
(graph-flow-kanban KanbanPlanEnvelope). rig = oracle-frequency only.
AdaWorldAPI/burn 403 build wall recorded.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM

Copy link
Copy Markdown
Owner Author

W1 fleet complete — all four workers landed; verdicts and numbers

Fleet landings (each centrally verified, gates in AGENT_LOG):

Worker Landed Verification
D-V3-W1e probes 6301bc83BatchWriter<P> WAL skeleton + 3 deliberately-RED #[ignore]d probes (ahead-ordering, kill-after-cast replay, delegation miss) compiles; --ignored run = 3 todo! panics (correct probe-first state)
D-PERT-1 047024a1 — mechanical ResonanceDtoPerturbationDto, 8 files, deprecated alias; perspectival awareness_dto.rs untouched thinking-engine 362 + shader-driver 100 green
D-V3-W6a 9c55646econtract::classid_scan (ClassidForm, count_adoption) mirroring classid_canon_compat, all 3 legacy shapes, zero bit math 10/10 new + full contract 771 green; no real classid-keyed corpora in this container — t₀ baseline runs against q2 data once the CLI wrapper lands
rs-graph-llm + rig bench bench committed to rs-graph-llm @ same branch (4d468d7) isolated release build (workspace-root 403 wall, see below)

Planner-SoA reality audit (E-V3-PLANNER-SOA-AUDIT-1, 59080cc2): type-level real, wiring-level dormant. KanbanMove already unifies mailbox/witness/libet/exec; supervisor + lance-graph core + symbiont are WIRED. The planner crate is the gap: zero MailboxSoaView references, zero classid awareness, style_strategy pass-through, and the GATE-1 false friend (planner mul/gate.rs GateDecision{Proceed,Sandbox,Compass} ≠ contract {Flow,Hold,Block}). Deltas: W2b gains a spawn-over-real-MailboxSoA<N> probe (today: TestBoard-only); M15 rename is now BLOCKING before any planner→kanban emission.

graph-flow speed (W2e input, release, steady-state batch 4096): ~408–471 ns/task-step (ContinueAndExecute) vs ~512–538 ns stepwise — the ~80–100 ns delta is the per-step SessionStorage round-trip. Two-speed ruling confirmed with data: graph-flow = the replayable orchestration layer; sub-µs hot dispatch stays with ExecTarget.

M25 KanbanSessionStorage design finalized: SessionStorage is overwrite-semantics (all 3 impls upsert the whole Session), so replay-from-moves needs a delta layer — which already exists: rs-graph-llm/graph-flow-kanban's KanbanPlanEnvelope accumulates an append-only Vec<KanbanMove> consuming this repo's contract kanban types + GateDecision. Wire it to the W1b writer; invent nothing. Replay = Session snapshot + move log.

rig: Task-wrapping production-proven (recommendation_flow.rs:180-248, generic-over-CompletionModel); per-call cost = 2 full chat-history clones + tool-def fetch even with zero tools → oracle-frequency only (W3c), never per kanban transition. Fork is upstream-faithful 0.39.0 + 3 infra commits (kv-lance wiring).

Ops finding: workspace-root cargo in rs-graph-llm/rig 403s on the AdaWorldAPI/burn git submodule via surreal-lance optional deps (lock resolution pulls manifests even with features off). Sandboxed builds use isolated path-dep crates until a lockfile/vendor lands.

Next: W1b implementation (turns the 3 probes green, un-ignores them) → M15 rename → W2b real-owner integration probe.

🤖 Generated with Claude Code


Generated by Claude Code

claude added 4 commits July 2, 2026 12:33
…elope impl (codex #630 P2)

canonical_node.rs:1275 ships the Lance-facing zero-copy LE envelope over
&[NodeRow]. Revised ruling: SoaEnvelope (storage boundary) and
MailboxSoaView/Owner (runtime view) are complementary surfaces; W1
routes storage bytes through the NodeRowPacket path and preserves/tests
its byte-layout behavior. Negative-existence claims in rulings now
require the exhaustive-grep declaration (guardrails rule 10, applied
to the orchestrator).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM
…n, mutual masking via phase machine

The cast carries a descriptor (mailbox, dirty row-range, cycle), never
bytes; the sink reads deltas through NodeRowPacket::as_le_bytes at
flush; rows in sink phase are mutation-frozen until ack while thinking
proceeds elsewhere — write masks thinking and vice versa. M24 gate
extended with descriptor-not-bytes + mutation-freeze tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM
…L entries (Addendum-7)

Corrects Addendum-6's mutation-freeze over-design (it contradicted
'updates reprioritize, never gate'). The thinker reports and moves on;
>=3 stacked writes per row are stacked WAL entries with independent
acks; the sink coalesces naturally by reading the live store at flush.
Probe 4 (probe_stacked_casts_never_refused) pins it — 4 ignored probes
now define W1b green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM
… WAL ruling (Addendum-8)

Stacked-casts-never-refused is provable (Strict readers cannot observe
past their V_ref horizon); M24/M25/time-travel collapse into ONE
mechanism (QueryReference::at + deinterlace); W1b ack carries the
assigned LanceVersion as the WAL<->temporal join; the ractor actor's
payload is its V_ref reading-horizon.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM
@AdaWorldAPI AdaWorldAPI merged commit 9a6df2a into main Jul 2, 2026
4 of 5 checks passed
AdaWorldAPI pushed a commit that referenced this pull request Jul 2, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
crates/lance-graph-planner/src/batch_writer.rs (1)

79-114: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

No fallible surface for ack/resolve_owner on malformed input.

ack(&mut self, _cast: CastId) and the rest of the write-path API return no Result, so once implemented there's no defined way to signal an unknown/already-acked CastId (double-ack) or a resolver failure. Since the API surface is still open at the stub stage, it may be worth deciding now whether these should return Result<_, SomeSnafuError> per the repo's error-handling convention, rather than silently no-op'ing or panicking once real bodies land.

As per coding guidelines, crates/**/*.rs should "reuse snafu error patterns" for error handling.

🤖 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/lance-graph-planner/src/batch_writer.rs` around lines 79 - 114, The
write-path API in BatchWriter currently has no way to report malformed input or
resolver failures, so decide the error contract before implementing the stubs.
Update the `ack`, `unacked`, `intent_moves`, and `resolve_owner` methods in
`batch_writer.rs` to use the crate’s `snafu`-based error pattern where
appropriate, especially for unknown or double-acked `CastId` and any resolver
failure, rather than silently no-op’ing or panicking. Keep the signatures and
internal handling consistent with the existing `BatchWriter`/`resolve_owner`
design so callers can distinguish success from failure.

Source: Coding guidelines

crates/lance-graph-planner/tests/w1_probes.rs (1)

1-105: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Integration-style probes vs. #[cfg(test)] guideline.

These probes live in tests/w1_probes.rs as a separate integration test crate rather than a #[cfg(test)] module alongside batch_writer.rs. This is a deliberate probe-first design choice (the doc comments in batch_writer.rs reference this file directly), and testing the exported BatchWriter API as a black box has some merit, but it runs counter to the stated repo convention.

As per coding guidelines, crates/**/*.rs should "Add Rust unit tests alongside implementations via #[cfg(test)] modules; prefer focused scenarios over broad integration tests."

🤖 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/lance-graph-planner/tests/w1_probes.rs` around lines 1 - 105, The
probe tests in w1_probes.rs are written as a separate integration test crate,
which conflicts with the repo’s `#[cfg(test)]` unit-test convention. Move these
scenarios into a `#[cfg(test)]` module alongside `BatchWriter` in the
implementation area, keeping the same focused checks for `cast`, `ack`,
`unacked`, `intent_moves`, and `resolve_owner`. Preserve the black-box
assertions against the public `BatchWriter` API, but relocate them so they run
as unit tests rather than under tests/w1_probes.rs.

Source: Coding guidelines

🤖 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.

Inline comments:
In `@crates/lance-graph-planner/src/batch_writer.rs`:
- Around line 35-67: The BatchWriter fields are only initialized in
BatchWriter::new and not yet read because the methods are still todo!(), so
rustc/clippy will report dead_code on next_id, board, acked, delegation_cache,
and pending_payloads. Add a temporary dead_code suppression on the BatchWriter
struct (or otherwise gate it for the W1b work) and leave a short note pointing
to the pending implementation in BatchWriter so the lint doesn’t block CI until
the fields are actually used.

---

Nitpick comments:
In `@crates/lance-graph-planner/src/batch_writer.rs`:
- Around line 79-114: The write-path API in BatchWriter currently has no way to
report malformed input or resolver failures, so decide the error contract before
implementing the stubs. Update the `ack`, `unacked`, `intent_moves`, and
`resolve_owner` methods in `batch_writer.rs` to use the crate’s `snafu`-based
error pattern where appropriate, especially for unknown or double-acked `CastId`
and any resolver failure, rather than silently no-op’ing or panicking. Keep the
signatures and internal handling consistent with the existing
`BatchWriter`/`resolve_owner` design so callers can distinguish success from
failure.

In `@crates/lance-graph-planner/tests/w1_probes.rs`:
- Around line 1-105: The probe tests in w1_probes.rs are written as a separate
integration test crate, which conflicts with the repo’s `#[cfg(test)]` unit-test
convention. Move these scenarios into a `#[cfg(test)]` module alongside
`BatchWriter` in the implementation area, keeping the same focused checks for
`cast`, `ack`, `unacked`, `intent_moves`, and `resolve_owner`. Preserve the
black-box assertions against the public `BatchWriter` API, but relocate them so
they run as unit tests rather than under tests/w1_probes.rs.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7cd0214e-4c17-4ed7-a16b-b49bc70b0b90

📥 Commits

Reviewing files that changed from the base of the PR and between 28f17cd and 9dfaf40.

⛔ Files ignored due to path filters (1)
  • crates/thinking-engine/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (19)
  • .claude/board/EPIPHANIES.md
  • .claude/board/LATEST_STATE.md
  • .claude/board/PR_ARC_INVENTORY.md
  • .claude/board/STATUS_BOARD.md
  • .claude/v3/ENTROPY-MILESTONES.md
  • .claude/v3/INTEGRATION-PLAN.md
  • crates/cognitive-shader-driver/src/engine_bridge.rs
  • crates/lance-graph-contract/src/classid_scan.rs
  • crates/lance-graph-contract/src/lib.rs
  • crates/lance-graph-planner/src/batch_writer.rs
  • crates/lance-graph-planner/src/lib.rs
  • crates/lance-graph-planner/tests/w1_probes.rs
  • crates/thinking-engine/src/bf16_engine.rs
  • crates/thinking-engine/src/composite_engine.rs
  • crates/thinking-engine/src/dto.rs
  • crates/thinking-engine/src/dual_engine.rs
  • crates/thinking-engine/src/engine.rs
  • crates/thinking-engine/src/f32_engine.rs
  • crates/thinking-engine/src/signed_engine.rs

Comment on lines +35 to +67
pub struct BatchWriter<P> {
/// Monotonic id generator for the next cast.
next_id: u64,
/// Board: intent moves recorded per cast, keyed by `CastId`, alongside the
/// mailbox the cast was recorded on behalf of. Visible between `cast()`
/// and `ack()` (and beyond, for crash-replay via `unacked()`).
board: HashMap<CastId, (MailboxId, Vec<KanbanMove>)>,
/// Casts that have been confirmed (acked). A cast present in `board` but
/// absent from `acked` is the crash-replay surface (`unacked()`).
acked: std::collections::HashSet<CastId>,
/// W1c delegation cache: `on_behalf` mailbox -> resolved owner mailbox.
delegation_cache: HashMap<MailboxId, MailboxId>,
/// Payloads recorded per cast (payload-generic; the writer never inspects `P`).
pending_payloads: Vec<(CastId, P)>,
}

impl<P> Default for BatchWriter<P> {
fn default() -> Self {
Self::new()
}
}

impl<P> BatchWriter<P> {
/// Construct an empty batch writer.
pub fn new() -> Self {
Self {
next_id: 0,
board: HashMap::new(),
acked: std::collections::HashSet::new(),
delegation_cache: HashMap::new(),
pending_payloads: Vec::new(),
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

All struct fields are currently unread → expect dead_code warnings.

Every method body is todo!(), so next_id, board, acked, delegation_cache, and pending_payloads are written in new() but never read anywhere in the crate yet. rustc's dead_code lint fires on private fields that are never read (independent of the containing struct being pub), so cargo clippy --all-targets --all-features will likely flag all five fields until the method bodies are filled in. If CI treats warnings as errors this could block the pipeline before the W1b implementation lands.

Consider a temporary #[allow(dead_code)] with a comment pointing to the W1b tracking item, or confirm CI doesn't deny warnings on this crate during the probe-first phase.

🔧 Suggested temporary suppression
+#[allow(dead_code, reason = "fields wired up in the W1b implementation commit; see tests/w1_probes.rs")]
 pub struct BatchWriter<P> {

As per coding guidelines, "Run cargo clippy --all-targets --all-features to catch lint regressions in Rust code."

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
pub struct BatchWriter<P> {
/// Monotonic id generator for the next cast.
next_id: u64,
/// Board: intent moves recorded per cast, keyed by `CastId`, alongside the
/// mailbox the cast was recorded on behalf of. Visible between `cast()`
/// and `ack()` (and beyond, for crash-replay via `unacked()`).
board: HashMap<CastId, (MailboxId, Vec<KanbanMove>)>,
/// Casts that have been confirmed (acked). A cast present in `board` but
/// absent from `acked` is the crash-replay surface (`unacked()`).
acked: std::collections::HashSet<CastId>,
/// W1c delegation cache: `on_behalf` mailbox -> resolved owner mailbox.
delegation_cache: HashMap<MailboxId, MailboxId>,
/// Payloads recorded per cast (payload-generic; the writer never inspects `P`).
pending_payloads: Vec<(CastId, P)>,
}
impl<P> Default for BatchWriter<P> {
fn default() -> Self {
Self::new()
}
}
impl<P> BatchWriter<P> {
/// Construct an empty batch writer.
pub fn new() -> Self {
Self {
next_id: 0,
board: HashMap::new(),
acked: std::collections::HashSet::new(),
delegation_cache: HashMap::new(),
pending_payloads: Vec::new(),
}
}
#[allow(dead_code, reason = "fields wired up in the W1b implementation commit; see tests/w1_probes.rs")]
pub struct BatchWriter<P> {
/// Monotonic id generator for the next cast.
next_id: u64,
/// Board: intent moves recorded per cast, keyed by `CastId`, alongside the
/// mailbox the cast was recorded on behalf of. Visible between `cast()`
/// and `ack()` (and beyond, for crash-replay via `unacked()`).
board: HashMap<CastId, (MailboxId, Vec<KanbanMove>)>,
/// Casts that have been confirmed (acked). A cast present in `board` but
/// absent from `acked` is the crash-replay surface (`unacked()`).
acked: std::collections::HashSet<CastId>,
/// W1c delegation cache: `on_behalf` mailbox -> resolved owner mailbox.
delegation_cache: HashMap<MailboxId, MailboxId>,
/// Payloads recorded per cast (payload-generic; the writer never inspects `P`).
pending_payloads: Vec<(CastId, P)>,
}
🤖 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/lance-graph-planner/src/batch_writer.rs` around lines 35 - 67, The
BatchWriter fields are only initialized in BatchWriter::new and not yet read
because the methods are still todo!(), so rustc/clippy will report dead_code on
next_id, board, acked, delegation_cache, and pending_payloads. Add a temporary
dead_code suppression on the BatchWriter struct (or otherwise gate it for the
W1b work) and leave a short note pointing to the pending implementation in
BatchWriter so the lint doesn’t block CI until the fields are actually used.

Source: Coding guidelines

AdaWorldAPI pushed a commit that referenced this pull request Jul 2, 2026
…nstruct it in the dispatch test) + rustfmt sweep

The C6 fixture's TemplateGet variant was matched but never constructed,
tripping dead_code under -D warnings in CI. Exercise it through the same
generic consumer instead of allow()ing it. rustfmt also reflows
classid_scan.rs (fmt-dirty since #630) and the new modules.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MLBnPuScZy6w9di2QEjsXM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants