Skip to content

nexgen: mask-histogram thresholds harvest, E-NXG-1..16, expansion plan v1 - #1176

Merged
AdaWorldAPI merged 6 commits into
mainfrom
claude/pr-294-ragged-path-validation-170zcy
Sep 5, 2026
Merged

nexgen: mask-histogram thresholds harvest, E-NXG-1..16, expansion plan v1#1176
AdaWorldAPI merged 6 commits into
mainfrom
claude/pr-294-ragged-path-validation-170zcy

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

What this adds (board + docs only, no code in my commit)

What is NOT in this PR

  • No Rust code, no bench, no removal or demotion of any public surface (operator ruling 2026-09-04 stands).
  • The plan lives under .claude/nexgen/plans/, outside supersession_index.py / plan_dids.py scan paths, so its D-ids are on STATUS_BOARD but invisible to the index coverage column. Stated in the plan header on purpose.

Inherited commits on this branch — please read before merging

The designated branch already carried two unmerged commits from another session with no open PR (ae34721a blasgraph: route two Hamming sites through the shared SIMD dispatch; a11fd64b examples: sigma-probe for masked_traverse selectivity). Per the branch rules I kept them and merged main in rather than discarding or rewriting them. They are not mine and not validated by me (no cargo run in this session). If they should not ship with this, say so and I will move my commit to a fresh branch on your word.

Gates run locally

  • append_only_gate.py origin/main: OK, 9 files checked, four grew (EPIPHANIES 26397→26570, AGENT_LOG 4086→4095, INTEGRATION_PLANS 3199→3214, STATUS_BOARD 1766→1786)
  • citation_decay.py: no input files matched
  • plan_dids.py: no added plan files under .claude/plans/
  • supersession_index.py: regenerated after the board writes, byte-identical

🤖 Generated with Claude Code

https://claude.ai/code/session_016WkNBjHc2e3zuyz9i8qJEv


Generated by Claude Code

claude and others added 4 commits September 4, 2026 18:34
`hdr::words_hamming` and `clam_neighborhood::scent_hamming_distance` each
carried their own scalar `count_ones()` fold, bypassing
`ndarray_bridge::dispatch_hamming` — the module tree's existing
SIMD-dispatched kernel (VPOPCNTDQ -> AVX-512BW -> AVX2 -> scalar, routed
to `ndarray::hpc::bitwise` under `ndarray-hpc`). Two implementations of a
kernel the crate already owned.

`words_hamming` takes `&[u64]`; it now views the words as their byte image
before the call. XOR-then-popcount is invariant under byte order, so the
same bits are compared regardless of endianness — only traversal order
differs. The cast is sound because `u8` has alignment 1 and no invalid bit
patterns; a SAFETY comment records this.

`words_hamming_sampled` deliberately stays scalar: it compares every
`step`-th word, and a strided access pattern cannot route through a
contiguous byte kernel.

cargo test -p lance-graph --lib graph::blasgraph: 191 passed, 0 failed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WkNBjHc2e3zuyz9i8qJEv
`typed_graph::masked_traverse` computes the FULL A*A product, then filters
every nonzero against a `Vec<bool>` label mask and rebuilds a COO. Whether
pushing the mask inside the product could remove real work — rather than
only the filter+rebuild overhead — is decided by selectivity, which is
measurable before any inward-mask implementation exists.

This probe changes no library code: it calls `mxm` directly for the
unmasked baseline and `masked_traverse` for the masked result, and reports
per-call rows. Two selectivities are kept separate:

  sigma_result  = nnz(masked(A^2)) / nnz(A^2)
  sigma_columns = |M| / N

Their ratio is the concentration factor: >1 means the mask's columns hold
more than their share of the product.

Measured (n=96, debug):

  A/dense-random d=0.15    concentration 1.00 / 1.02 / 1.00
  B/uniform-sparse d=0.02  concentration 0.99 / 0.55 / 0.89
  C/clustered rand-mask    concentration 1.00 / 0.99 / 1.03
  C/clustered block-mask   concentration 0.84 / 0.92 / 0.98

sigma_result tracks sigma_columns in every row: for these distributions the
mask removes exactly its share and no more, so mask pushdown would buy the
structural mask_density factor and no concentration bonus. Notably a
block-ALIGNED mask over a block-clustered graph is inert (0.84-0.98) — the
run is paired with a random mask of identical density precisely to isolate
that, and community structure alone does not produce concentration.

Scope limit, stated because it bounds the conclusion: none of these three
generators has degree heterogeneity, so none can produce a concentration
effect. A preferential-attachment generator with a hub-correlated mask is
the missing arm, and until it is added this probe is silent on that case —
it does not falsify concentration, it fails to test for it.

`mxm` is O(N^3) over 2 KB BitVec values, so N defaults to 96 to stay
runnable in a debug build; SIGMA_PROBE_N overrides it for --release.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WkNBjHc2e3zuyz9i8qJEv
…n v1

- .claude/nexgen/harvest/: 11 verbatim read-only Sonnet reports (4 code/doctrine
  readers; PR sweeps lance-graph #1126-#1175, OGAR #274-#298, ndarray #277-#301)
- .claude/nexgen/plans/nexgen-mask-histogram-thresholds-v1.md: the exposure
  meter as a nested mask set; T0..T3 entropy shape; 27-row expansion table with
  a falsifier per row; D-NXG-1..12; probe-first sequencing
- EPIPHANIES: E-NXG-1..16 (prepended); AGENT_LOG, INTEGRATION_PLANS,
  STATUS_BOARD rows; supersession index regenerated last (no diff)

No code touched. No public surface removed or demoted.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WkNBjHc2e3zuyz9i8qJEv
@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 58 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 67 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Essentials

Run ID: 56da1217-5acc-4c41-b08b-f713b22bfa14

📥 Commits

Reviewing files that changed from the base of the PR and between 9f8aa77 and cf89110.

📒 Files selected for processing (21)
  • .claude/board/AGENT_LOG.md
  • .claude/board/EPIPHANIES.md
  • .claude/board/INTEGRATION_PLANS.md
  • .claude/board/STATUS_BOARD.md
  • .claude/nexgen/README.md
  • .claude/nexgen/harvest/00-INDEX.md
  • .claude/nexgen/harvest/01-cascade-rolling-floor-hdr.md
  • .claude/nexgen/harvest/02-prozentrang-shannon-doctrine.md
  • .claude/nexgen/harvest/03-proprioception-ewa-mexican-mask-surface.md
  • .claude/nexgen/harvest/04-sigker-power-kernels.md
  • .claude/nexgen/harvest/10-pr-sweep-lance-graph-1175-1166.md
  • .claude/nexgen/harvest/11-pr-sweep-lance-graph-1165-1156.md
  • .claude/nexgen/harvest/12-pr-sweep-lance-graph-1155-1146.md
  • .claude/nexgen/harvest/13-pr-sweep-lance-graph-1145-1136.md
  • .claude/nexgen/harvest/14-pr-sweep-lance-graph-1135-1126.md
  • .claude/nexgen/harvest/15-pr-sweep-ogar-298-274.md
  • .claude/nexgen/harvest/16-pr-sweep-ndarray-301-277.md
  • .claude/nexgen/plans/nexgen-mask-histogram-thresholds-v1.md
  • crates/lance-graph/examples/sigma_probe_masked_traverse.rs
  • crates/lance-graph/src/graph/blasgraph/clam_neighborhood.rs
  • crates/lance-graph/src/graph/blasgraph/hdr.rs

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

@cursor

cursor Bot commented Sep 5, 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_d876022f-58a9-4b11-9001-92729ecfda9f)

AdaWorldAPI and others added 2 commits September 5, 2026 10:38
citation-decay flagged the only new decay in #1176: E-NXG-3 pointed at
legacy_outliers.rs:27 with a phrase that sits on the next line. Per the
gate's own instruction the fix is a stable anchor, not a corrected number.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WkNBjHc2e3zuyz9i8qJEv
Formatting only, on the inherited sigma-probe example carried by this
branch; no semantic change. cargo fmt --all -- --check is clean after this.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WkNBjHc2e3zuyz9i8qJEv
@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review September 5, 2026 11:18

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cf8911026b

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

let sigma_result = if nnz_full == 0 {
f64::NAN
} else {
nnz_masked as f64 / nnz_full as f64

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Instrument multiplication work instead of output cardinality

For sparse graphs with multiple two-hop paths per output—or many probed columns that produce no output—this ratio is not a proxy for work removable by mask pushdown. In the checked GrBMatrix::mxm, every (i, j) is visited and every entry in a.row(i) triggers a lookup, while all successful products for (i, j) collapse into at most one stored nonzero (matrix.rs:206-220). Consequently, workloads with the same sigma_result can have very different masked multiplication costs, making the probe's stop and speedup conclusions unreliable; count column probes/successful semiring operations or time an inward-mask implementation instead.

Useful? React with 👍 / 👎.

Comment on lines +115 to +116
fn mask_blocks(count: usize) -> Vec<usize> {
(0..count).collect()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Align the block mask to generated community boundaries

With the default n=96 and blocks=8, each generated community spans 12 node IDs, but the three counts passed here are 1, 9, and 38. Therefore (0..count) cuts through a community in every row rather than selecting whole communities, so the random/block delta does not isolate block alignment as claimed. Pass the community size into this helper and select complete communities, or use densities whose counts are exact multiples of that size.

Useful? React with 👍 / 👎.

@AdaWorldAPI
AdaWorldAPI merged commit a7520a1 into main Sep 5, 2026
10 checks passed
AdaWorldAPI added a commit that referenced this pull request Sep 5, 2026
…obe (#1176)

Recorded, not fixed: the example is not this session's work and #1176 is
merged. Ledger row names both findings (block mask cuts communities;
nnz ratio is not multiplication work) and the fix shapes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WkNBjHc2e3zuyz9i8qJEv
AdaWorldAPI pushed a commit that referenced this pull request Sep 5, 2026
The PR went mergeable_state=dirty when #1176 landed a
`nexgen-mask-histogram-thresholds-v1` section at the top of STATUS_BOARD.md --
the same insertion point this branch's `bindspace-mailbox-soa-wiring-v1`
section uses. Two sessions prepending to one append-only ledger conflict by
construction; the resolution is never a choice between them.

Both sections survive verbatim, newest write first: D-BSW-0..4 (5 rows) and
D-NXG-1..12 (12 rows), each count matched against its own parent. The file
grew past BOTH parents (1791 mine / 1786 theirs -> 1811), which is the check
that distinguishes a real merge from a side silently dropped.

Worth recording because it explains a false signal: GitHub creates no
`pull_request` workflow runs while a PR is unmergeable, so the last two pushes
produced zero checks and only CodeRabbit's status remained. That looked like a
billing cap -- CodeRabbit had reported one minutes earlier -- but a sibling PR
got a full run one minute after my push, which falsified it. The conflict was
the cause. An absent check is not a passing check, and it is not a broken
runner either; read the PR's own mergeable_state before theorising.

Index regenerated AFTER the board write, per the #1085 ordering: byte-identical.
All four gates re-run locally exactly as the workflows invoke them -- append-only
OK (9 checked), no new citation decay since base, dids green on the
merge-base-diffed added set, index reproduces byte-identical, zero files under
crates/.
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