Skip to content

ApiSurfaceTest: fence the raw register, name every array breach (T2/T3) - #74

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/membrane-tiers-bbb-fence
Sep 4, 2026
Merged

ApiSurfaceTest: fence the raw register, name every array breach (T2/T3)#74
AdaWorldAPI merged 1 commit into
mainfrom
claude/membrane-tiers-bbb-fence

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

What

The enforcement half of the membrane-tier doctrine (paired: AdaWorldAPI/lance-graph# carries the doctrine + bbb-warden in lance-graph so every consumer inherits them). ApiSurfaceTest already forbade FFM / membrane types in any public signature; two additive rules extend it to the T2/T3 membrane — names cross, byte positions never do.

  1. Raw-register fence — a byte[] in any public signature (return, param, field) is a raw content register (a [u8;12] rail array / payload bytes) crossing the consumer wall. Caught in check() on the array component type; the existing package-prefix match never sees a primitive component. (ledger L6)
  2. Named-breach rule — a public method returning any array must be named materialize* or import*. Folds the GraphHopTest allowlist into the compiled-surface scan, so a bridge or inherited array return can't slip past a source grep. (ledger L7)

Green by construction

The current surface passes both: only Mask.materializeRows() returns an array (named), and no public byte[] exists (RowLayout.sets is private, unscanned). The two predicates' behaviour was proven standalone — a byte[] return and param are flagged, an unnamed int[] return is flagged, materialize*/import* pass — 5/5.

What was NOT run, stated plainly

The full Java suite was not run in-session: the environment has JDK 21; the repo targets JDK 27 + preview FFM + Valhalla, so internal.ffm.Engine won't compile here. CI runs the suite. The change is a purely additive extension mirroring the existing check() / leaksIn() patterns.

What this gate does NOT prove (honest)

Reflection cannot distinguish int classid (a name, clean) from int facet (a slot index, a leak) — same type. WideFieldMask.ofFacets(int... positions) (L1) and the served LgjLaneDesc strides (L2) are the semantic leaks the bbb-warden reviews; this gate catches the mechanical subset only. The doctrine says so; this PR does not overclaim it.

🤖 Generated with Claude Code

https://claude.ai/code/session_016WkNBjHc2e3zuyz9i8qJEv


Generated by Claude Code

Extends the consumer-surface fence to the T2/T3 membrane
(.claude/knowledge/membrane-tiers.md in lance-graph; wardens there too): a
public consumer signature may carry NAMES (handle, classid, field name,
version), counts and statuses — never a raw content register or an un-named
array population.

- Raw-register fence: a byte[] anywhere in a public signature is a [u8;12]
  rail array / payload crossing the wall. check() now flags an array whose
  component is byte (the package-prefix match never sees a primitive
  component). Ledger L6.
- Named-breach rule: a public method returning any array must be named
  materialize*/import* — the GraphHopTest allowlist, enforced on the
  COMPILED surface so a bridge/inherited return can't slip a source grep.
  Ledger L7.

Green on the current surface by construction (only Mask.materializeRows()
returns an array, named; no public byte[]). Predicate behaviour proven
standalone 5/5 (byte[] return+param flagged, unnamed int[] return flagged,
materialize*/import* pass). Full Java suite not run in-session (JDK 21 here
vs repo's JDK 27 + preview FFM + Valhalla); CI runs it. The gate catches the
mechanical subset only — ofFacets(int...) (L1) and served strides (L2) are
semantic leaks the bbb-warden reviews, stated honestly in the doctrine.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WkNBjHc2e3zuyz9i8qJEv
@cursor

cursor Bot commented Sep 4, 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: serverGenReqId_bba0b6c5-f61a-4f89-b3f9-0512ec5ce10e)

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review September 4, 2026 21:33
@AdaWorldAPI
AdaWorldAPI merged commit c0bf3aa into main Sep 4, 2026
2 checks passed
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