ApiSurfaceTest: fence the raw register, name every array breach (T2/T3) - #74
Merged
Merged
Conversation
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
Bugbot couldn't run - usage limit reachedBugbot 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) |
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The enforcement half of the membrane-tier doctrine (paired: AdaWorldAPI/lance-graph# carries the doctrine +
bbb-wardenin lance-graph so every consumer inherits them).ApiSurfaceTestalready forbade FFM / membrane types in any public signature; two additive rules extend it to the T2/T3 membrane — names cross, byte positions never do.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 incheck()on the array component type; the existing package-prefix match never sees a primitive component. (ledger L6)materialize*orimport*. Folds theGraphHopTestallowlist 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 publicbyte[]exists (RowLayout.setsis private, unscanned). The two predicates' behaviour was proven standalone — abyte[]return and param are flagged, an unnamedint[]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.Enginewon't compile here. CI runs the suite. The change is a purely additive extension mirroring the existingcheck()/leaksIn()patterns.What this gate does NOT prove (honest)
Reflection cannot distinguish
int classid(a name, clean) fromint facet(a slot index, a leak) — same type.WideFieldMask.ofFacets(int... positions)(L1) and the servedLgjLaneDescstrides (L2) are the semantic leaks thebbb-wardenreviews; 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