Repository navigation
test: pin layout parity across native descriptors and Java for both store layouts - #103
Merged
Merged
Conversation
…tore layouts
P0 gate, first half. No ABI change and no production behaviour change.
Rust: every lane descriptor of the row-major and facet-major stores equals the
documented geometry at n in {16, 257, 4096}, in the row store and through the
ABI; facet-major lanes tile the store exactly; every lane and every row is
equal across layouts at n = 257; the strided equality kernel gives the same
mask at base offsets 1, 3 and 7; field offsets of LgjLaneDesc, LgjResourceInfo
and LgjOpDesc are pinned to literals.
Java: DescriptorParityTest checks the same geometry as Java reads it, the same
struct offsets, and all 257 x 32 reads equal across layouts and equal to an
independent generator used as a test oracle. Disable run: a wrong lo64 offset
turns 6 checks red.
Docs: abi.md section 18 and rowstore.rs claimed every facet-major block offset
is a multiple of 64 for any n_rows. That was false (block 1 starts at byte
1028 at n = 257). The text and the test now state when it holds.
Valhalla lab: R11 re-captured; its prose disagreed with its own table.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VysoWJ6vsyg3wEGc5v7T5v
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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
Tests and one documentation correction. No ABI change, no new symbol, no production behaviour change.
This is the first half of a layout-parity gate set by the consumer's owner: show that ndarray's strided primitives, the native lane descriptors and Java's Panama reads agree on layout for both store layouts, before a persistent writer is chosen. It extends the existing row-major and facet-major tests rather than replacing them.
Added
Rust
rowstore.rs, and through the ABI (lgj_rowstore_open,lgj_rowstore_open_columnar,lgj_lane_describe). Until now only row-major descriptors were asserted.512n.offset_of!pins for every field ofLgjLaneDesc,LgjResourceInfoandLgjOpDesc. Until now only sizes and alignments were asserted.Java
DescriptorParityTest(inAllTests): the same geometry as Java reads it, the same struct offsets as Rust's literals, and all 257 × 32 reads equal across layouts and equal to an independent re-implementation of the generator, used only as a test oracle. No production visibility was widened.Corrected
docs/abi.md§18 and theRowLayout::FacetMajordoc claimed every per-facet block offset is a multiple of 64 "for anyn_rows". That was false: classid and hi32 blocks are all aligned only when n is a multiple of 16, lo64 blocks when n is a multiple of 8. At n = 257, block 1 starts at byte 1028. Answers were never affected (kernels and Java use unaligned reads). The text now says when alignment holds, and the test that supposedly pinned the old claim (it checked only n in {64, 128, 4096}) is replaced by one with a negative arm.Valhalla lab:
R11-observed.txtre-captured. Its prose (1.30–1.33 ns/row, ~9.2×) disagreed with its own table. The new text states the measured table and that the ratio varies by run and machine.Evidence
cargo test: 213 passed in the library, other test binaries green.cargo fmt --checkandcargo clippy --all-targets -- -D warningsclean.AllTests: 678 checks (631 before, plus 47).Not covered here
OldAbiCompatTestis still not inAllTests.Generated by Claude Code
Summary by CodeRabbit