Skip to content

Entropy-ladder plateau: EdgeCodecFlavor selector + bgz17 OOB fix + SPO rung-ladder plan#494

Merged
AdaWorldAPI merged 3 commits into
mainfrom
claude/wonderful-hawking-lodtql
Jun 14, 2026
Merged

Entropy-ladder plateau: EdgeCodecFlavor selector + bgz17 OOB fix + SPO rung-ladder plan#494
AdaWorldAPI merged 3 commits into
mainfrom
claude/wonderful-hawking-lodtql

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

Plateau — entropy-ladder SPO rung decomposition (lance-graph half)

Matched pair with the AdaWorldAPI/ndarray PR (the math/codec foundation). This is the lance-graph half: the per-class selector, a memory-safety fix, and the plan capturing the shipped work + the R2–R6 roadmap.

Delivered

  • EdgeCodecFlavor selector (lance-graph-contract): {CoarseOnly, CoarseResidue, Pq32x4} + a defaulted ClassView::edge_codec_flavor(class) — the class→schema mapping that picks how a node's 16-byte edge block is interpreted. Iron invariant (tested): flavor is interpretation, not layout — every variant leaves NODE_ROW_STRIDE = 512 untouched, so no ENVELOPE_LAYOUT_VERSION bump (canon "registry-resolved via classid → ClassView"). Non-breaking: the trait method is defaulted, so RegistryClassView inherits it.
  • bgz17 SIMD gather OOB guard (P1): the AVX2/AVX-512 batch palette lookup used an i32 gather (scale 2) over the u16 distance matrix, over-reading one u16 past dm_data on the final row/entry. Both paths now route the worst-case row to the scalar path. +regression test.

Plan (the plateau record)

.claude/plans/entropy-ladder-spo-rung-v1.md — the Staunen↔Wisdom entropy coordinate that unifies the SPO rungs, NARS truth, and syntax→semantics→pragmatics; the shipped foundation (R1); and the sequenced roadmap: R2 store entropy_class in CausalEdge64 spare bits (version-gated), R3 CAM-PQ AMX assignment, R4 helix-basin probe, R5 Markov rung-ladder probe, R6 energy axis / particle↔wave, COCA superposition pruning. Board updated in the same commit (INTEGRATION_PLANS + STATUS_BOARD D-EL-1..6 + D-EL-COCA).

Tests

contract 609 lib green (+3 flavor tests); bgz17 simd 6 green (+1 regression); clippy -D warnings clean.

Architecture decisions locked

  • Read the 3×palette-256 SPO already inside CausalEdge64no re-quantization.
  • Pearl 2³ causal mask = the 8 SPO iterations.
  • COCA superposition pruning must bundle identity fingerprints, not PQ codes (I-VSA-IDENTITIES).

https://claude.ai/code/session_01D2WSmezQBNC3bUdHuGfGmo


Generated by Claude Code

claude added 3 commits June 14, 2026 09:14
The AVX2/AVX-512 batch palette lookup uses an i32 gather with scale=2 over
the u16 distance matrix, loading each lane's target u16 PLUS the following
u16 into the high half (masked off). On the last valid index of dm_data
(query==k-1, candidate k-1) that high half reads one u16 past the backing
slice — an out-of-bounds read.

Guard both the AVX2 and AVX-512 paths: when the row's worst-case over-read
(row_offset + k, candidate k-1's high half) is not strictly inside dm_data,
route the whole batch through the scalar path, which only ever touches
row_offset + c. Affects at most the final row of a tight k×k matrix
(<=1/k of queries).

Adds test_batch_last_row_full_width regression: k=64 (exact multiple of
both SIMD widths), last row, full-width batch including candidate k-1.

https://claude.ai/code/session_01D2WSmezQBNC3bUdHuGfGmo
Adds canonical_node::EdgeCodecFlavor { CoarseOnly, CoarseResidue, Pq32x4 } and a
defaulted ClassView::edge_codec_flavor(class) selector, so a class/schema picks
how its 16-byte EdgeBlock (+ optional value-slab residue) is interpreted.

Iron invariant (tested): the flavor is INTERPRETATION, not layout — every variant
leaves NODE_ROW_STRIDE = 512 untouched, so adopting one needs no
ENVELOPE_LAYOUT_VERSION bump (canon "registry-resolved via classid -> ClassView").
Default CoarseOnly matches the all-zero bootstrap reading. The trait method is
defaulted, so RegistryClassView inherits it (non-breaking); per-class override is
follow-up wiring in lance-graph-ontology.

Encode/measure kernels live in ndarray (hpc::edge_codec + hpc::reliability,
commit d3b608f) per the hardware/thinking split. Board: LATEST_STATE contract
inventory + AGENT_LOG updated in this commit (mandatory board hygiene).

+3 tests; contract lib 609 green; clippy -D warnings clean.

https://claude.ai/code/session_01D2WSmezQBNC3bUdHuGfGmo
Plan doc capturing the shipped entropy-ladder foundation (R1) and the sequenced
roadmap (R2–R6 + COCA), all anchored on the Staunen↔Wisdom entropy coordinate
(syntax→semantics→pragmatics). Records the locked architecture decisions: read
the 3×palette256 SPO already in CausalEdge64 (no re-quant), Pearl 2³ = the 8 SPO
iterations, flavors/classes are interpretation not layout, COCA pruning bundles
identities not PQ codes (I-VSA-IDENTITIES).

Board hygiene (same commit): INTEGRATION_PLANS prepend + STATUS_BOARD D-EL-1..6
+ D-EL-COCA rows.

https://claude.ai/code/session_01D2WSmezQBNC3bUdHuGfGmo
@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@AdaWorldAPI, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 59 minutes and 51 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c221e184-0d0e-4261-923b-49a04a506d66

📥 Commits

Reviewing files that changed from the base of the PR and between 8624cf3 and e07ed23.

📒 Files selected for processing (9)
  • .claude/board/AGENT_LOG.md
  • .claude/board/INTEGRATION_PLANS.md
  • .claude/board/LATEST_STATE.md
  • .claude/board/STATUS_BOARD.md
  • .claude/plans/entropy-ladder-spo-rung-v1.md
  • crates/bgz17/src/simd.rs
  • crates/lance-graph-contract/src/canonical_node.rs
  • crates/lance-graph-contract/src/class_view.rs
  • crates/lance-graph-contract/src/lib.rs

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

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

@AdaWorldAPI AdaWorldAPI merged commit 8342ecb into main Jun 14, 2026
6 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