Skip to content

r2il-mask-abi-probe: V3 facet and V4 call as two readings of one buffer (Round 3) - #1349

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/sharp-bardeen-8nlu1z
Oct 6, 2026
Merged

AdaWorldAPI merged 1 commit into
mainfrom
claude/sharp-bardeen-8nlu1z

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

This is Round 3 of the arc whose Rounds 1–2 merged in #1347. It tests whether V3 data and V4 IR can be two readings of the same resident bytes, and finds where that holds and where it stops.

The probe

crates/r2il-mask-abi-probe/tests/v3_v4_dual_reading.rs has 8 tests. There is one owner: a 64-aligned buffer of two NodeRows (2 × 512 bytes). It is written once, at intake, by FunctionBody::write_into_value_slab. After that, two shipped readings are taken over it, with no translation step between them:

  • V3: node_rows_from_le_bytes reinterprets the buffer as NodeRows, and FacetCascade::ref_from_bytes reinterprets each 16-byte value slot.
  • V4: ogar_loco::call_in_slab reads each call in place under a LaneShape, and ogar_r2il::{r2il_mask, project} select the R2IL calls.

The two readings line up because V3's G6D2 rails and V4's LaneShape::Pairs are the same carving of a slot's 12 payload bytes. So tier k of slot l is call 6l+k, at the same address. The tests pin this as follows:

Claim Test
For all 180 calls, the V3 tier and the V4 call are the same bytes at the same address both_readings_address_the_same_bytes
The Triples and Quads carvings also read the slab in place every_lane_shape_reads_the_slab_in_place
A byte written by the owner is seen at once by the V3 facet, the V4 call and the R2IL mask an_owner_write_is_seen_by_both_readings
Taking every reading leaves the bytes unchanged reading_never_mutates_the_bytes
The readings allocate 0 heap bytes, and the heap meter is shown to fire readings_allocate_nothing
Rewriting all 30 per-slot classids changes no V4 call slot_classids_do_not_reach_the_v4_reading
The same bytes give different call streams under different shapes, so the bytes alone cannot say which reading applies the_reading_is_not_recoverable_from_the_bytes

Where the shared reading stops

  • Executing a stored body is not a reading. loco's Interpreter runs a Program, and Program { functions: Vec<FunctionBody> } owns its bodies. The only way to build one from the resident bytes is read_from_value_slab, which copies the 360 payload bytes into a second, heap-owned representation (loco_execution_needs_a_gathered_copy).
  • No shipped code picks the shape from a classid. Every caller passes the LaneShape in directly.

Build change

The probe crate gains a path dev-dependency on lance-graph-contract and a [patch]. The patch points the git lance-graph-contract that ogar-loco / ogar-r2il use at the local path, so the probe workspace compiles one contract, not two.

Verification

  • Disable runs: I broke each of 6 checks in turn and confirmed the matching test fails: V3 read through the copying from_bytes, an offset that skips the classid prefix, V4 reading a copy taken before the write, a write during reading, V4 consulting the slot classid, and the gather replaced by a borrow.
  • Gates: the full probe suite passes (36 tests), clippy with -D warnings and fmt are clean, and CI runs this crate at rust-test.yml:176.

Board entry: 2026-10-06-v3-v4-dual-reading-round3.md.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MHMvKHLhM6xwRswKY4s6vY


Generated by Claude Code

Round 3. One 64-aligned NodeRow buffer, read two ways with no
translation: V3 via node_rows_from_le_bytes + FacetCascade::ref_from_bytes,
V4 via ogar_loco::call_in_slab and ogar_r2il::{r2il_mask, project}.
G6D2 rails and LaneShape::Pairs are the same carving, so tier k of slot l
is call 6l+k at the same address. Owner writes are seen by both readings,
reading writes nothing and allocates nothing, and per-slot classids never
reach a V4 call.

Executing a stored body through loco is not a reading: Program owns a
gathered FunctionBody, a 360-byte copy. No classid -> LaneShape resolver
is shipped; the caller passes the shape.

The probe workspace patches the git lance-graph-contract to the local
path, so ogar-loco and the probe see one contract identity. Six disable
runs go red.

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

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

Next included review available in 29 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 66 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 1fd782e3-d082-46f4-91ba-6e19cb68e38b
📥 Commits

Reviewing files that changed from the base of the PR and between 32f6672 and ee2fdeb.

📒 Files selected for processing (4)
  • .claude/board/entries/2026-10-06-v3-v4-dual-reading-round3.md
  • .claude/board/entries/README.md
  • crates/r2il-mask-abi-probe/Cargo.toml
  • crates/r2il-mask-abi-probe/tests/v3_v4_dual_reading.rs
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.


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

@cursor

cursor Bot commented Oct 6, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: dc9162dc-23c6-45e2-a51d-25dbdbfadce6)

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review October 6, 2026 10:35
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 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-10-06T10:38:01.445973Z ee2fdeb 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