Skip to content

feat: kanban×Rubicon SoA tenant + per-tenant counters + capstone plan + golden-image wiring#565

Merged
AdaWorldAPI merged 4 commits into
mainfrom
claude/jirak-math-theorems-harvest-rfii13
Jun 20, 2026
Merged

feat: kanban×Rubicon SoA tenant + per-tenant counters + capstone plan + golden-image wiring#565
AdaWorldAPI merged 4 commits into
mainfrom
claude/jirak-math-theorems-harvest-rfii13

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Jun 20, 2026

Copy link
Copy Markdown
Owner

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 green

  • ValueTenant::Kanban = 9 at value-slab [112,120) (8 B: phase|exec|reserved|cycle), added to ValueSchema::{Cognitive,Full}. Reserve-don't-reclaim, layout-preserving (Full 112→120 B, stride 512 untouched, no ENVELOPE_LAYOUT_VERSION bump).
  • KanbanTenant Copy view + NodeRow::{kanban,set_kanban} (owner-gated write / surreal read-only / Rubicon); KanbanColumn/ExecTarget from_u8. Subsumes the envelope-pointer G1 — the node carries its own phase+cycle, pinning SoA↔kanban in the LE blob (a FixedSizeBinary(512) store reads kanban zero-copy at any version).
  • tenant_counter module + feature tenant-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_kanban is the first wired cascade point.
  • Updated the 3 byte-budget lock tests to the deliberate new layout (Cognitive 58→66, Full 112→120) + new field-isolation matrix + schema-membership tests.
  • Decisions kept (I-VSA-IDENTITIES + AGI-glove): thinking-style is ClassView + 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 missing lance-graph-ogar — it git-dep'd raw ogar-* but never linked ogar-class-view (impl ClassView) or the parity guard. Added lance-graph-ogar (path) + the mandatory contract [patch] (CONSUMER REQUIREMENT — one contract source). Resolve-verified: lance-graph-contract instances = 1, no "patch not used" warning.

Verification

  • 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.
  • symbiont graph resolves clean (cargo metadata exit 0; one contract source; full compile is the Railway/CI build-validation job).
  • No downstream crate hardcodes the old tenant count/budget.

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

    • Added Kanban tenant support for value storage with read/write operations.
    • Added optional tenant-counters feature for per-tenant debug instrumentation and monitoring.
  • Chores

    • Updated planning and validation documentation.

claude added 3 commits June 20, 2026 23:00
…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
@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

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 @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 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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 385e61e0-761c-4b60-9fc4-c0e50fb2a651

📥 Commits

Reviewing files that changed from the base of the PR and between f045d7f and 379f7ba.

📒 Files selected for processing (2)
  • .claude/plans/capstone-cognitive-loop-wiring-nan-census-v1.md
  • crates/lance-graph-contract/src/tenant_counter.rs
📝 Walkthrough

Walkthrough

Adds ValueTenant::Kanban (8-byte Rubicon phase cursor at slab bytes [112,120)) with a KanbanTenant type and NodeRow::kanban/set_kanban accessors. Introduces a feature-gated tenant_counter module for per-tenant relaxed-atomic update tracking. Fixes Cargo workspace dependency unification for lance-graph-ogar/lance-graph-contract in symbiont. Adds a capstone cognitive-loop validation plan.

Changes

Kanban ValueTenant + tenant_counter instrumentation

Layer / File(s) Summary
Cargo workspace dependency fix and feature flag
crates/symbiont/Cargo.toml, crates/lance-graph-contract/Cargo.toml
symbiont gains lance-graph-ogar as an in-repo path dependency with a [patch] block redirecting lance-graph-contract to the in-repo copy; lance-graph-contract gains the tenant-counters feature flag (default off).
KanbanColumn and ExecTarget from_u8 decoders
crates/lance-graph-contract/src/kanban.rs
KanbanColumn::from_u8 and ExecTarget::from_u8 are added to decode stored discriminant bytes to their respective enum variants, falling back to Planning/Native for unknown values.
ValueTenant::Kanban, KanbanTenant type, NodeRow accessors, and schema masks
crates/lance-graph-contract/src/canonical_node.rs
ValueTenant::Kanban (index 9) is appended to the enum and VALUE_TENANTS carve table; KanbanTenant with LE encode/decode is introduced; NodeRow::kanban() and set_kanban() are wired in; ValueSchema::Cognitive and Full field masks include Kanban; byte-budget and schema-coverage tests are updated to the new 120-byte Full carve.
feature-gated tenant_counter module
crates/lance-graph-contract/src/tenant_counter.rs, crates/lance-graph-contract/src/lib.rs
New tenant_counter module exposes tenant_update (compile-time no-op when tenant-counters is off; relaxed AtomicU64 increment when on), plus feature-gated tenant_count and snapshot APIs over a lazily initialized N_TENANTS-sized array; includes per-tenant isolation test.
AI board docs and capstone validation plan
.claude/board/*, .claude/plans/capstone-cognitive-loop-wiring-nan-census-v1.md
Agent log, epiphanies, integration plans, and latest-state board files receive 2026-06-20 entries; the new capstone plan defines three dashboard metrics, seven seam probes (S1–S7), four validation waves, and an anti-overclaim guard with module cross-references.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • AdaWorldAPI/lance-graph#496: Introduced the ValueSchema/ValueTenant substrate and Full POC default that this PR extends with ValueTenant::Kanban and the set_kanbantenant_counter wiring.

Poem

🐇 Hops through byte slabs, eight bytes wide,
A kanban phase now tucked inside!
Atomic counters tick—when you please—
Relaxed and gated, OFF by default keys.
With seams and probes the plan is laid,
Zero NaN ahead—don't be afraid! 🥕

🚥 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 and concisely summarizes the main changes: introduction of a Kanban SoA tenant for Rubicon phase tracking, per-tenant counter instrumentation, a capstone validation plan, and dependency/golden-image fixes.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.

✏️ 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.

❤️ Share

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

@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: 2

🧹 Nitpick comments (1)
crates/lance-graph-contract/src/tenant_counter.rs (1)

23-23: ⚡ Quick win

Derive tenant-array length from canonical metadata to avoid drift panics.

Line 23 hard-codes N_TENANTS = 10, but indexing is done via tenant as usize. If a new ValueTenant is 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

📥 Commits

Reviewing files that changed from the base of the PR and between 98c0cf2 and f045d7f.

📒 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.md
  • crates/lance-graph-contract/Cargo.toml
  • crates/lance-graph-contract/src/canonical_node.rs
  • crates/lance-graph-contract/src/kanban.rs
  • crates/lance-graph-contract/src/lib.rs
  • crates/lance-graph-contract/src/tenant_counter.rs
  • crates/symbiont/Cargo.toml

Comment thread .claude/plans/capstone-cognitive-loop-wiring-nan-census-v1.md Outdated
Comment thread .claude/plans/capstone-cognitive-loop-wiring-nan-census-v1.md Outdated
- 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
@AdaWorldAPI AdaWorldAPI merged commit 213e3a6 into main Jun 20, 2026
5 checks passed
AdaWorldAPI pushed a commit that referenced this pull request Jun 21, 2026
…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
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