Skip to content

D-LGJ-MASK-PARENT-1: a mask is accepted only against its own resource (ABI minor 14) - #96

Merged
AdaWorldAPI merged 1 commit into
mainfrom
ccr-c83f9f2f-t0hyyt
Nov 12, 2026
Merged

AdaWorldAPI merged 1 commit into
mainfrom
ccr-c83f9f2f-t0hyyt

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

What changes

A mask may be read or written only against the resource it was created over. Nine mask arguments checked only the row count; they now compare the mask's parent with the resource by registry identity (Arc::ptr_eq), as the register sweeps already did.

lgj_op_eq_u32, lgj_op_gt_i32, lgj_plan_eval, lgj_reduce_sum_i32, lgj_reduce_i32, lgj_op_eq_classid, lgj_op_ternary_match, and the source and the destination of lgj_hop.

  • Status: the existing MASK_LENGTH_MISMATCH. No new status, no new symbol.
  • No new registry and no registry change. The parent is the one resolve_mask_with_parent already returns.
  • Unchanged: generation checks, PARENT_CLOSED, lock order, mask aliasing, every same-parent call.
  • Not touched: lgj_plan_scalar, mask-RISC, Quack, SoA, ClassView.

This is a contract change

docs/abi.md documented the lenient reading as deliberate, so this is not an internal refactor. §3.1 is new and normative and states the rule, the order of checks, and the compatibility effect.

Versioning decision, for review. §2 reserves the major for incompatible change, and narrowing accepted input is not additive. I did not bump the major: that would make every existing Java build refuse to load a library that serves it correctly, for a pairing no shipped caller makes. The minor goes 13 → 14 so the stricter rule is visible in the manifest, and §3.1 records this as a deliberate exception to §2. If you want the major instead, it is one constant on each side.

Who is affected. A raw-ABI caller that used one mask across two equally sized resources now gets MASK_LENGTH_MISMATCH where it got OK. No caller in this repository does that.

Falsifiers (provenance.rs, re-pinned)

case result
own parent success (11 of 12; the resolved sum refuses an all-rows mask for an unrelated, pre-existing reason)
sibling parent, same row count refused, all 12
other resource kind, same row count refused, all 12
shorter mask refused, all 12
closed parent PARENT_CLOSED, all 12
lgj_hop source and destination checked separately; aliasing an own mask still works
two readings of one resource still valid
a refused call the mask and every other output are unchanged (49 refusals checked)
cross-resource relabelling now refused at both steps

Anti-vacuity: for the six exports that write the mask under test, a successful call is shown to change an all-rows mask, so "unchanged after a refusal" is evidence.

Disable runs, each restored from the commit: removing the check in the pattern paths, in the classid/ternary paths, for the hop source, and for the hop destination. Four runs, four red.

Results

Against lance-graph 0683c74, ndarray 5fc71d7, JDK 28+23-ea, abi 0.14:

  • native: 212 tests; fmt and clippy -D warnings clean
  • AllTests: 617 checks
  • consumer mains: 70 / 68 / 3 / 12
  • TinkerPop harness: 25 + 55

Not run: bench/ (JMH), and OldAbiCompatTest against historical libraries.

Also in this PR

Board hygiene: the scalar-terminal entries in LATEST_STATE.md and STATUS_BOARD.md said "in a draft PR"; #95 is merged and they now say so.


Generated by Claude Code

Nine mask arguments checked only the row count: lgj_op_eq_u32,
lgj_op_gt_i32, lgj_plan_eval, lgj_reduce_sum_i32, lgj_reduce_i32,
lgj_op_eq_classid, lgj_op_ternary_match, and the source and destination
of lgj_hop. They now compare the mask's parent with the resource by
registry identity (Arc::ptr_eq), as the register sweeps already did.
Status stays MASK_LENGTH_MISMATCH. No new symbol, no registry change.

docs/abi.md section 3.1 is new and normative. The change narrows accepted
input, so it is not additive. The major is not bumped; the minor is
(13 -> 14), and 3.1 records that as a deliberate exception to section 2
together with its reason.

provenance.rs is re-pinned: all twelve exports refuse a sibling mask and a
mask of the other resource kind, every refusal leaves the mask and all
other outputs unchanged, lgj_hop is checked per mask, and the earlier
relabelling hazard is now a refusal. Four disable runs, four red.

Measured: native 212 tests; AllTests 617 checks; consumers 70 / 68 / 3 /
12; TinkerPop 25 + 55. bench/ not run.

Board: the scalar-terminal entries now say merged in #95.

Claude-Session: https://claude.ai/code/session_01XAqKMP36eRfzsppfaEWMVz
@coderabbitai

coderabbitai Bot commented Nov 12, 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: 5d610698-4416-4873-b532-e7928c87b283
  • 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 12, 2026 22:52
@AdaWorldAPI
AdaWorldAPI merged commit 343a71e into main Nov 12, 2026
4 checks passed
@chatgpt-codex-connector

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

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T22:53:30.643019Z 27c4d2a 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