feat: kanban×Rubicon SoA tenant + per-tenant counters + capstone plan + golden-image wiring#565
Conversation
…nsus The measurement companion to the kanban×Rubicon tenant arc. A MEASUREMENT plan, not a build plan — converts the operator's "99% present / 28% wiring gaps / 72% NaN" into three orthogonal measured quantities (piece-presence% / seam-wiring% / run-NaN%) over the phase-aligned cognitive loop, per the measurement-before- synthesis + probe-first iron rules. 7 seams, each a CONJECTURE until its probe runs green: - S1 kanban tenant (field-isolation) - S2 MUL→phase (flow-vs-mismatch GateDecision advances phase) - S3 version-arc→KanbanMove (scheduler) - S4 envelope route via BridgeSlot (surreal plan engaged by Cargo presence) - S5 batch push (measured GAP today: commit is pull-only, notifies optimizer) - S6 timeline zero-copy (GAP: val is opaque variable Binary, not FixedSizeBinary(512)) - S7 SoA self-NaN-census = the "Orchestration meta-awareness" (the capstone) Wave 0 measures the baseline on SHIPPED code — the honest number behind "72% NaN" (a hypothesis until measured). Overclaim guard: AGI-adjacency is the IF the census TESTS, never an asserted THEN; the novel measurable is S7 (a system aware of what it cannot yet do — the φ-1 humility ceiling made a number in the Meta tenant). Records the I-VSA-IDENTITIES decision: thinking-style is ClassView + Meta tenant, NOT a new 128-bit tenant (the 48+80 flat split duplicates Plasticity/Meta/Qualia). Board: AGENT_LOG (cont.16), INTEGRATION_PLANS prepend. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CcpLeEC3XK8Eye53GKBVvi
… (capstone S1)
Operator-greenlit canon-additive change: make the Rubicon kanban phase a per-node
SoA value tenant rather than an envelope field — pinning SoA↔kanban in the LE blob
and subsuming the envelope-pointer plan (G1).
- ValueTenant::Kanban = 9 at value-slab [112,120) (8 B: phase|exec|reserved|cycle),
U64 descriptor @ row_offset 144; added to ValueSchema::{Cognitive,Full}.
Reserve-don't-reclaim, layout-preserving: Full 112→120 B, NODE_ROW_STRIDE 512
untouched, no ENVELOPE_LAYOUT_VERSION bump.
- KanbanTenant Copy view (phase: KanbanColumn, exec: ExecTarget, cycle: u32) +
from_bytes/to_bytes (LE) + NodeRow::{kanban, set_kanban}. set_kanban is
owner-only by convention (MailboxSoaOwner/View split); surreal reads, never
writes (Rubicon). KanbanColumn::from_u8 + ExecTarget::from_u8.
- tenant_counter module + feature `tenant-counters` (default OFF; zero-cost no-op
via compile-time dispatch when off, one relaxed atomic per tenant write when
on) — the capstone NaN-census / cascade-wiring instrument. set_kanban bumps the
Kanban counter as the first wired cascade point.
- Updated the 3 byte-budget LOCK tests to the deliberate new layout (Cognitive
58→66, Full 112→120, contiguous carve 112→120) + added Kanban to full-covers;
new field-isolation matrix test + schema-membership test.
Decisions kept (I-VSA-IDENTITIES register-laziness + AGI-glove): thinking-style
is ClassView + the Meta tenant, NOT a new 128-bit tenant (the 48+80 flat split
was rejected — duplicates Plasticity/Meta/Qualia); plan-shape stays
ClassView-derived; the MUL flow-vs-mismatch trigger is a function over
Qualia/Meta/Plasticity → GateDecision → advance phase, not a stored tenant.
Verified: contract lib 714 (default) / 715 (tenant-counters) / 720 (guid-v2-tail);
clippy -D warnings --all-targets clean all three; fmt clean; Full-carve math 120 B
ends row 152 ≤ 512; no downstream crate hardcodes the old tenant count/budget.
(cargo-machete not installed in sandbox; the only Cargo.toml change is a dep-less
feature, so nothing to flag.) Capstone S1 → green (CONJECTURE→FINDING).
Board: AGENT_LOG (cont.17), LATEST_STATE IN-PR entry, EPIPHANIES
E-KANBAN-IS-A-VALUE-TENANT-SUBSUMES-G1, plan capstone S1 green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CcpLeEC3XK8Eye53GKBVvi
…t patch)
The golden image was missing lance-graph-ogar: symbiont git-dep'd raw
ogar-vocab/ogar-ontology/ogar-adapter-surrealql but NOT the activation crate, so
it never linked ogar-class-view (impl lance_graph_contract::ClassView) or the
codebook parity-guard — i.e. the unified binary wasn't proving the OGAR
Active-Record surface compiles.
- add `lance-graph-ogar = { path = "../lance-graph-ogar", features =
["surrealql-parser"] }` (transitively pulls ogar-class-view + the parity guard).
- add `[patch."https://github.com/AdaWorldAPI/lance-graph"] lance-graph-contract =
{ path = "../lance-graph-contract" }` — REQUIRED (PR #564 CONSUMER REQUIREMENT):
symbiont is the workspace root, so lance-graph-ogar's own patch is ignored;
ogar-class-view git-deps contract@main and must unify onto symbiont's path copy,
else OgarClassView's `impl ClassView` won't typecheck against the engine's.
Docker needs no change: the Dockerfile runs `cargo build` on symbiont's manifest
and lance-graph-ogar is in-repo (already COPY'd in) — cargo-missing == docker-missing.
Verified by resolve (`cargo metadata` exit 0): lance-graph-ogar + ogar-class-view
now in the golden-image graph; lance-graph-contract instances = 1 (the path copy)
→ patch folded the git contract onto one source; no "patch not used" warning.
Full compile is the Railway/CI build-validation job (protoc + lance7 + surrealdb).
Board: AGENT_LOG (cont.18).
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 51 minutes and 47 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 (2)
📝 WalkthroughWalkthroughAdds ChangesKanban ValueTenant + tenant_counter instrumentation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 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. 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.
Actionable comments posted: 2
🧹 Nitpick comments (1)
crates/lance-graph-contract/src/tenant_counter.rs (1)
23-23: ⚡ Quick winDerive tenant-array length from canonical metadata to avoid drift panics.
Line 23 hard-codes
N_TENANTS = 10, but indexing is done viatenant as usize. If a newValueTenantis added and this constant is missed, counter calls can panic out-of-bounds.Suggested patch
- pub const N_TENANTS: usize = 10; + pub const N_TENANTS: usize = crate::canonical_node::VALUE_TENANTS.len();🤖 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-contract/src/tenant_counter.rs` at line 23, Replace the hard-coded constant N_TENANTS with a value derived directly from the ValueTenant enum definition to prevent out-of-bounds panics when new variants are added. Instead of manually maintaining the constant at 10, calculate it based on the actual number of ValueTenant enum variants using an appropriate Rust technique such as a macro, derive macro, or const function that automatically counts the enum variants. This ensures N_TENANTS stays synchronized with the canonical ValueTenant metadata and eliminates drift-related panics during tenant indexing operations.
🤖 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 @.claude/plans/capstone-cognitive-loop-wiring-nan-census-v1.md:
- Around line 43-54: The markdown code fence on line 43 is missing an explicit
language identifier after the opening triple backticks. Add an explicit language
specifier such as `text` immediately after the opening fence (change ``` to
```text) to provide syntax context to markdownlint and renderers. This applies
to the opening fence of the SoA node Kanban diagram that starts on line 43.
- Around line 60-66: The S1 kanban claim uses `[144,152)` notation which creates
ambiguity with the status line that states "Full 112→120". The issue is that 144
refers to row_offset in the NodeRow/canonical_node structure while [112,120)
refers to the value-slab coordinate. In the S1 claim text, replace the
`[144,152)` reference with explicit notation distinguishing between `row_offset
144` (in the NodeRow structure) and `[112,120)` (in the value slab), making it
clear these are different coordinate systems. Then search for any
cross-references to this offset in section 6 and other parts of the document and
apply the same convention to prevent probe targeting errors.
---
Nitpick comments:
In `@crates/lance-graph-contract/src/tenant_counter.rs`:
- Line 23: Replace the hard-coded constant N_TENANTS with a value derived
directly from the ValueTenant enum definition to prevent out-of-bounds panics
when new variants are added. Instead of manually maintaining the constant at 10,
calculate it based on the actual number of ValueTenant enum variants using an
appropriate Rust technique such as a macro, derive macro, or const function that
automatically counts the enum variants. This ensures N_TENANTS stays
synchronized with the canonical ValueTenant metadata and eliminates
drift-related panics during tenant indexing operations.
🪄 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: 385c2ac6-3f26-44ce-9f45-2764d9c16006
📒 Files selected for processing (11)
.claude/board/AGENT_LOG.md.claude/board/EPIPHANIES.md.claude/board/INTEGRATION_PLANS.md.claude/board/LATEST_STATE.md.claude/plans/capstone-cognitive-loop-wiring-nan-census-v1.mdcrates/lance-graph-contract/Cargo.tomlcrates/lance-graph-contract/src/canonical_node.rscrates/lance-graph-contract/src/kanban.rscrates/lance-graph-contract/src/lib.rscrates/lance-graph-contract/src/tenant_counter.rscrates/symbiont/Cargo.toml
- tenant_counter: derive N_TENANTS from crate::canonical_node::VALUE_TENANTS.len() instead of the hard-coded 10 — drift-proof, no out-of-bounds on `tenant as usize` if a ValueTenant is later added (CodeRabbit quick-win). - capstone plan: bare ``` fence → ```text (markdownlint MD040). - capstone plan S1: clarify `row_offset 144` (`[112,120)` in the value slab) to remove the row-offset vs value-slab coordinate ambiguity CodeRabbit flagged. Validated: contract lib 714 (default) / 715 (tenant-counters), clippy -D warnings clean. Pure refinements, no behavior change (VALUE_TENANTS.len() == 10 today). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CcpLeEC3XK8Eye53GKBVvi
…h to .err().expect() PR #558 (openproject + redmine bridges via shared codebook) shipped two tests that call `.unwrap_err()` on the bridge constructor's `Result<Bridge, Error>`, but neither `OpenProjectBridge` nor `RedmineBridge` derives `Debug` (their field set includes `Arc<OntologyRegistry>` and `OntologyRegistry` doesn't derive Debug). `Result::<T, E>::unwrap_err(self)` requires `T: Debug` so the constructor's Ok variant is printable on panic — which breaks compilation as soon as `cargo test -p lance-graph-ontology --lib` walks the bridges module. Fix: use the `.err().expect("...")` pattern instead. `Result::err(self) -> Option<E>` consumes the Result without any bound on `T`, then `.expect` panics on `None`. Same behaviour for these tests (which both expect Err), no Debug cascade, matches the implicit pattern in the medcare/woa/odoo bridges (none of which have `.unwrap_err()` tests at all). Verified: - cargo test -p lance-graph-ontology --lib bridges: 19/19 pass - cargo test -p lance-graph-ontology --lib: 282/282 pass - behaviour unchanged: both tests still assert UnknownNamespace with the right namespace name Board: prepend EPIPHANIES E-ERP-DOMAINSPEC-IS-CANONICAL-NOT-ODOO-SPECIFIC, recording (a) the corollary finding that main's PR #565-#568 generic ERP DomainSpec correctly superseded my parallel ODOO_ERP attempt — same construction error pattern as E-OGAR-AR-SHAPE-REHOME, now generalized to "if it carries a CLASSID_* in the 0xDDCC range, name it for the canonical concept, not the curator", and (b) this Debug-bound fix. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xzyc27Nx3f8WC5KzwfWfjx
Three related commits advancing the phase-aligned cognitive loop from "pieces present" toward "wired + measurable", plus a golden-image gap fix.
1 — Capstone validation plan (
f3279410).claude/plans/capstone-cognitive-loop-wiring-nan-census-v1.md— a measurement plan (not a build plan), per the measurement-before-synthesis + probe-first iron rules. Encodes the operator's "99% present / 28% wiring gaps / 72% NaN" as three orthogonal measured quantities (piece-presence% / seam-wiring% / run-NaN%) over 7 seams (S1 kanban tenant … S7 SoA self-NaN-census = "Orchestration meta-awareness"), each a CONJECTURE until its probe is green. Overclaim guard: AGI-adjacency is the IF the census tests, never the asserted THEN.2 — kanban×Rubicon SoA value tenant + per-tenant counters (
dcdc1f9d) — capstone S1 greenValueTenant::Kanban = 9at value-slab[112,120)(8 B:phase|exec|reserved|cycle), added toValueSchema::{Cognitive,Full}. Reserve-don't-reclaim, layout-preserving (Full 112→120 B, stride 512 untouched, noENVELOPE_LAYOUT_VERSIONbump).KanbanTenantCopy view +NodeRow::{kanban,set_kanban}(owner-gated write / surreal read-only / Rubicon);KanbanColumn/ExecTargetfrom_u8. Subsumes the envelope-pointer G1 — the node carries its own phase+cycle, pinning SoA↔kanban in the LE blob (aFixedSizeBinary(512)store reads kanban zero-copy at any version).tenant_countermodule + featuretenant-counters(default OFF, zero-cost no-op via compile-time dispatch; one relaxed atomic per tenant write when on) — the capstone NaN-census instrument;set_kanbanis the first wired cascade point.Meta, not a new 128-bit tenant (48+80 flat split rejected — duplicates Plasticity/Meta/Qualia); plan-shape ClassView-derived; the MUL flow-vs-mismatch trigger is a function, not a tenant.3 — golden-image wiring fix (
f045d7fb)The golden image (
symbiont) was missinglance-graph-ogar— it git-dep'd rawogar-*but never linkedogar-class-view(impl ClassView) or the parity guard. Addedlance-graph-ogar(path) + the mandatory contract[patch](CONSUMER REQUIREMENT — one contract source). Resolve-verified:lance-graph-contractinstances = 1, no "patch not used" warning.Verification
tenant-counters) / 720 (guid-v2-tail); clippy-D warnings --all-targetsclean all three; fmt clean; Full-carve math 120 B ends row 152 ≤ 512.cargo metadataexit 0; one contract source; full compile is the Railway/CI build-validation job).Board: AGENT_LOG (cont.¹⁶/¹⁷/¹⁸), LATEST_STATE IN-PR entries, INTEGRATION_PLANS, EPIPHANIES (
E-KANBAN-IS-A-VALUE-TENANT-SUBSUMES-G1), capstone plan S1 green.🤖 Generated with Claude Code
Generated by Claude Code
Summary by CodeRabbit
New Features
tenant-countersfeature for per-tenant debug instrumentation and monitoring.Chores