Skip to content

dt64: D-LANESOCK-1 property-to-lane socket and joint route/frame witness - #1967

Merged
AdaWorldAPI merged 4 commits into
mainfrom
ccr-fd2682ed-sai06j-lane-socket
Nov 6, 2026
Merged

AdaWorldAPI merged 4 commits into
mainfrom
ccr-fd2682ed-sai06j-lane-socket

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

Summary

Implements D-LANESOCK-1 from the merged spec (#1966, .claude/plans/d-lanesock-dr-dt64-lane-socket-v1.md). The code lives in lance-graph-dt64 (src/lane.rs). The crate still depends only on the zero-dependency contract crate.

  • LaneSource, implemented by the source owner.
    • It maps (classid, SchemaRev, field position) to a LaneAddr: the lane, its CoordSpace (whose row order the lane is in) and the reader Scope it serves.
    • It lends its own lane through an associated type (type Lane<'a>), for example mask-RISC LaneRef. dt64 never names mask-RISC.
  • BindStore::bind_lanes (cold), producing a LaneBinding that holds addresses only.
    • It checks the frame against its FrameStore.
    • It checks the route at the requested version, and against the store's current version.
    • It checks the basis at SchemaRev, then takes one lane per field of the WideFieldMask.
  • LaneBinding::check / lane (hot, no allocation). They re-check route, frame, basis and mapping, then borrow the lane.
  • Versions are a pair. The route is checked against BindStore's own log, the frame against the FrameStore that issued it. No merged clock is introduced.

Refusals: the existing Refusal and FrameRefusal arms, plus:

  • RouteChanged, FieldNotInBasis, Unbound;
  • CoordinateSpace: a lane in another row order than the selection;
  • Scope, MappingChanged, Vanished, NotBound.

Not changed: no store, clock, GUID index, writer or per-row DTO. The Gather ban, ADMISSION B, NotASide, OP-14, DRISA M1/M2 and D4/S-INGRESS are untouched. Cross-space reads refuse; no mapping is admitted.

Proof

lance-graph-dt64/tests/lane_socket.rs (8 tests):

  • two fields of one ClassView basis are bound and borrowed; ptr::eq shows the lanes are the source's own slices, not copies;
  • the CoordinateSpace refusal, and that the same field binds under its own row order;
  • wrong SchemaRev and a changed basis;
  • a field outside the basis, and an unbound field;
  • a foreign scope;
  • a changed mapping, and a vanished lane;
  • a foreign frame, and a stale frame (MapChanged);
  • a re-route under an unchanged frame, which refuses both on use and on rebind.

dir-sim lab, tests/ordinal_chain_lab.rs (4 new tests, 19 total):

  • The Ruler-plane selection in AD slot space, AD-owned department and cost-centre lanes bound through one basis and one WideFieldMask. Over three seeds:
    • a DT64-admitted MethodRef (its reads names the lane) drives Agg::SumI32;
    • the same binding drives confirmed ∧ cost > 150 → Agg::Count;
    • both equal the independent scalar scan oracle;
    • anti-vacuity: the count is strictly between 0 and the number of confirmed slots.
  • An Entra-order lane under the AD selection is refused with CoordinateSpace.
  • After the source reorders its rows and advances the frame, the old binding refuses (CoordinatesChanged), and a rebind under the new frame works.
  • 64K slots: 0 hot allocations over 200 passes of check + borrow + fold.

Disable runs (committed first, each guard removed, then restored); each turns its named test red:

  • coordinate-space guard;
  • scope guard;
  • mapping-changed guard;
  • route check in check;
  • frame check in check;
  • basis guard.

Measured (release, 64K slots; reported, not gated)

cost
check + borrow 34–140 ns
check + borrow + SumI32 over a 64K i32 lane ~12 µs (the fold reading 256 KB of values)
hot allocations 0

Checks run

  • cargo clippy -p lance-graph-dt64 --all-targets -- -D warnings: clean.
  • cargo test -p lance-graph-dt64: all green.
  • Lab clippy (-D warnings): clean. Lab tests: 19/19. fmt: clean.

Board


Generated by Claude Code

…CK-1)

LaneSource is implemented by a source owner: it maps (classid, SchemaRev,
field position) to a LaneAddr (lane, coordinate space, reader scope) and
lends its own lane. BindStore::bind_lanes resolves the class at a route,
checks the basis and the frame, and takes one lane per requested field
into a LaneBinding that holds addresses only. LaneBinding::check
revalidates route (against the store's current version), frame, basis and
mapping without allocating.

Refuses: schema/basis/route errors, a re-route, foreign or stale frames,
fields outside the basis, unbound fields, a lane in another row order
than the selection (CoordinateSpace), another reader scope, a changed
mapping and a vanished lane.

dir-sim lab: two AD-owned property lanes bound through one ClassView
basis, folded with Quack under the Ruler-plane selection (oracle parity),
an Entra-order lane refused under the AD selection, reorder refusal, and
zero hot allocations at 64K slots.

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

The scan oracle is quadratic at 64K slots; its parity stays pinned at 300
slots across three seeds. Reports check+borrow separately from the fold.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMMJzKZrYnckXRC8x2U
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: 159ee9d3-bfe2-4574-bbee-f0e95d26ee09
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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 08:55
@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-06T08:56:39.270510Z 7ac4254 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.

@AdaWorldAPI
AdaWorldAPI merged commit 9ca5daa into main Nov 6, 2026
16 checks passed
AdaWorldAPI pushed a commit that referenced this pull request Nov 6, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMMJzKZrYnckXRC8x2U
AdaWorldAPI added a commit that referenced this pull request Nov 6, 2026
board: record #1964–#1967 and OGAR #371; D-LANESOCK-1 shipped
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