Skip to content

dt64+report: one field basis for the lane socket; test-only scope admission (D-LANESOCK-3) - #1970

Merged
AdaWorldAPI merged 3 commits into
mainfrom
ccr-fd2682ed-sai06j-lanesock-harden
Nov 6, 2026
Merged

AdaWorldAPI merged 3 commits into
mainfrom
ccr-fd2682ed-sai06j-lanesock-harden

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

Hardens D-LANESOCK-2 (#1969, merged 53e849a) in two places. It also reconciles the board after #1969 and hands off the consumer contract the report-rs surfaces will eventually use. DT64 stays the only BindStore.

A. One field basis

RED (49d11c2, a_disagreeing_field_basis_never_returns_the_wrong_lane): DT64 validated ClassView A, while AbiLanes resolved its own ClassView B. B has the same class, revision and field count as A, but its first two fields are swapped. The bind succeeded, and A's revenue field borrowed B's region lane, which holds a different, nonzero value:

A's revenue field resolved to another lane: U32([0, 1, 2, 3, 4, 0, 1, …])

DT64's basis check compares only the field count, so it cannot see a reorder.

Fix: the smallest contract delta. LaneSource::lane_of gains one parameter, basis: &FieldRef. This is the entry DT64 resolved at that position through the ClassView it validated, and DT64 passes it at bind and on every check. A source maps that field, never a position. AbiLanes no longer holds a ClassView, so it cannot disagree with DT64.

All three existing implementers are updated:

  • AbiLanes;
  • the dt64 test source;
  • the dir-sim lab (the last two map by position in a single-view world and ignore basis).

After the fix:

  • Bound under A, the lane is A's revenue lane.
  • A check or lane through B refuses with MappingChanged.
  • Bound under B, the lane is region.
  • Disable run: accepting a changed mapping in LaneBinding::check turns the test red.

B. Structural test-only admission

AbiLanes::unwitnessed takes the reader scope from the caller. It is now #[cfg(test)] pub(crate), and its suite has moved from tests/lane_socket.rs into a crate-local unit module (src/lane_source/tests.rs). The unwitnessed-scope feature and its [[test]] gate are removed. No build of the library, including one with --all-features, can construct an AbiLanes.

The counting allocator needs unsafe. The crate therefore forbids unsafe_code outside tests and only denies it in tests, where the allocator has one #[allow].

All earlier tests are kept, now 11 in the module: the original nine, the column cap, and the basis test. Pointer equality, scalar parity, the generation and route refusals, and zero hot allocations are unchanged. The report crate runs 55 tests, and the plain CI line now covers the lane-socket suite.

C. Consumer contract with report-rs #43 (handoff only)

Spec §8 in .claude/plans/d-lanesock-dr-dt64-lane-socket-v1.md records the chain the Cockpit, Hub and Matrix would consume:

authoritative role/customer scope → admitted source population and frame → DT64 property binding → borrowed source-owned lanes → Quack → authorized projection → Cockpit / Hub / Matrix

It adds no lens-specific binding, KPI evaluator, SoA or storage. It also inventories the reader-scope authority, read in code:

  • OGAR RbacAuthority → RbacBinding;
  • lance-graph-rbac::authorize_scoped / authorize_memberships, which return a decision, a row scope and a field mask;
  • ogar_rbac::authorize_identity.

The missing seam is a witness that seals such a decision into dr::Scope. The section states the rules that witness must keep:

  • a numeric Scope authorizes nothing by itself;
  • scope: None is never widened automatically into customer-wide access;
  • report-rs's ZITADEL login and RoleScopeAuthority are a downstream integration point, not a second upstream authority;
  • a source status is reported only from observed evidence.

D. Board

Still closed

  • value ingress and the durable workbook writer;
  • D4/S-INGRESS and layout admission;
  • text/codebook authority;
  • exact decimal;
  • production CRM_COMPANY XVERWEIS;
  • cross-coordinate Gather, ADMISSION B, NotASide, OP-14;
  • the RegistryClassView DOLCE entity_type_id defect.

There is no production admission: this remains a read adapter with a test-only constructor. report-rs #33 and the #43 Cockpit are untouched.

Verification

  • cargo test for lance-graph-report (55), lance-graph-dt64 and lance-graph-dir-sim;
  • cargo clippy --all-targets -D warnings for report (default and --all-features), dt64 and dir-sim;
  • cargo fmt --check.

Generated by Claude Code

…ong lane

DT64 validates ClassView A; AbiLanes resolves its own ClassView B (same
class, revision and field count, first two fields swapped). The bind
succeeds and A's revenue field borrows B's region lane.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMMJzKZrYnckXRC8x2U
…idated

LaneSource::lane_of now takes the basis entry DT64 resolved through the
ClassView it checked; AbiLanes drops its own ClassView and maps that
field's predicate through the Catalog. A check through a reordered
ClassView (same class, revision, count) now refuses MappingChanged
instead of returning another lane.

The unwitnessed-scope constructor and its suite move into a crate-local
#[cfg(test)] module; the public test feature is removed, so no build of
the library can construct an AbiLanes. Implementers updated: dt64's test
source and the dir-sim lab (both ignore the basis; they map by position
in a single-view world).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMMJzKZrYnckXRC8x2U
…r contract handoff

STATUS_BOARD marks D-LANESOCK-2 Shipped (#1969) and adds D-LANESOCK-3.
PR_ARC_INVENTORY records #1969. LATEST_STATE records main after #1969 and
this branch. Spec: lane_of carries the validated basis (amendment) and
§8 hands off the Cockpit/Hub/Matrix consumer chain and the reader-scope
witness inventory, without wiring either.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMMJzKZrYnckXRC8x2U
@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5c474384-5854-438f-937e-6ea44fd5342c
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

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

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review November 6, 2026 13:01
@AdaWorldAPI
AdaWorldAPI merged commit fb27c46 into main Nov 6, 2026
17 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T13:02:44.685386Z 7cd1392 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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