Skip to content

bench: the §5 gate instrument — production accessor in two builds, verdict table as a tool (D-LGJ-MMV-1a-bench) - #64

Merged
AdaWorldAPI merged 3 commits into
mainfrom
claude/mmv-1a-bench
Sep 3, 2026
Merged

AdaWorldAPI merged 3 commits into
mainfrom
claude/mmv-1a-bench

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

What

D-LGJ-MMV-1a-bench, the hard prerequisite of the RowStore half of ISS-LGJ-EPOCH-UNCHECKED. Component H is void as the §5 gate (Codex P1, #55): both its arms call Engine.describeLane directly and bypass RowStore.classidAt. Component I times the production accessor, and which arm it is comes from the build, not a flag.

The seam (production code, one file)

java/.../LaneProbe.java — a package-private no-op that RowStore.lane() now calls on every cached read. An empty static call inlines to nothing; there is no branch and no flag, so nothing is hoistable (§5.5). Ships as a no-op: RowStore's cached lanes stay guarded only by closed, and ISS-LGJ-EPOCH-UNCHECKED stays OPEN for RowStore.

bench/variants/probed/LaneProbe.java — the same class with the per-access probe (re-describe + epoch/length compare, the Mask.words() shape from #53). Not on the production classpath. If the gate ever passes, the swap into java/src/main is one file copy.

The runner and the instrument

  • bench/gate-run.sh compiles java/src/main twice, as shipped and with that single file swapped, and runs I_ProductionAccessorGate against each. That is ISS-LGJ-BENCH-GATE-PRECEDES-ITS-SUBJECT's two-build consequence taken literally, with the same JDK / .so / machine pinned by the script's own structure. It refuses to run if the variant equals the shipped file.
  • I_ProductionAccessorGate: one @Benchmark, store.classidAt(row, facet), Blackhole, @Fork(5), 65,536 rows, CALLS_PER_OP = 1. Emits one CSV; decides nothing.

The verdict function

bench/gate.py is the §5 table and nothing else: delta_ns, hw_delta = sqrt(hw_a² + hw_b²), ex-ante power hw_delta < N/2, PASS / FAIL / UNDERPOWERED from the delta interval, the "below resolution" label when the interval contains 0, the 2× ratio as a non-blocking flag. --selftest pins the plan's own worked examples including the three struck verdict rules (10/10). It refuses N ≤ 0, refuses any CSV under 5×8 samples (so LGJ_BENCH_QUICK=1 smoke runs can never be mistaken for evidence), and requires the amendment sha — a run whose N was chosen after the numbers is not pre-registered and the tool will not bless it.

What was verified

  • Java suite 360/360 with the seam in place.
  • gate.py --selftest 10/10. Two pins fired on first write and both were my case data, not the function: the −20 example sits exactly at hw = N/2 for N=10 (strict, correctly refused), and the label attaches to an interval containing 0 even when underpowered.
  • Quick-mode smoke run: before ≈ 11.0 ns/call, after ≈ 41.0 ns/call, consistent with H's +35.5 ns bare crossing. gate.py refused the CSVs (2 samples < 40) as designed. Not banked, not evidence.

What has NOT happened

The gate has not run. No amendment names N, and §5.2 requires that commit to precede both runs. N is a cost budget, an operator number, not something a measurement produces. The board says so: the sole remaining blocker on D-LGJ-MMV-1a-rowstore is the amendment.

Board

STATUS_BOARD rows for -bench (In PR) and -rowstore (blocker narrowed to the amendment); ISSUES.md dated append on the two-build entry; PR_ARC_INVENTORY records #63's merge sha f1c8aef. Arc entry for this PR follows once it has a number.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DCfrD5y19cvFc4AoyydXYv


Generated by Claude Code

…d the verdict table as a tool

D-LGJ-MMV-1a-bench. Component H measured a bare lgj_lane_describe crossing and is
void as a gate: its arms bypass RowStore.classidAt. Component I times the PRODUCTION
accessor, and which arm it is comes from the build, not a flag:

- java/.../LaneProbe.java: a package-private no-op seam RowStore.lane() calls on
  every cached read. Ships as a no-op; an empty static call inlines to nothing.
- bench/variants/probed/LaneProbe.java: the per-access liveness probe (re-describe
  + epoch/length compare, the Mask.words() shape from #53). NOT on the production
  classpath.
- bench/gate-run.sh: compiles java/src/main twice — as shipped, and with that ONE
  file swapped — and runs I_ProductionAccessorGate against each. §5.5's build-time
  variant swap and ISS-LGJ-BENCH-GATE-PRECEDES-ITS-SUBJECT's two-build consequence,
  taken literally. Refuses to run if the variant equals the shipped file.
- bench/gate.py: the §5 verdict table and nothing else. delta/hw_delta/ex-ante
  power/PASS-FAIL-UNDERPOWERED/label/ratio-flag. --selftest pins the plan's own
  worked examples, including the three struck verdict rules. Refuses N <= 0, a CSV
  under 5x8 samples (quick smoke runs can never be evidence), and a missing
  amendment sha.
- Harness: -Dlgj.bench.result for per-arm CSVs; LGJ_BENCH_QUICK=1 for smoke runs.

Smoke-verified the swap takes (quick mode, refused by gate.py by design):
before ~11 ns/call, after ~41 ns/call, consistent with H's +35.5 ns crossing.
Not banked, not evidence.

The gate has NOT run. No amendment names N; §5.2 requires that commit to precede
both runs. Board: STATUS_BOARD rows for -bench/-rowstore, ISSUES append on the
two-build entry, #63 merge sha recorded. Java suite 360/360 with the seam in.

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

coderabbitai Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 39 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 81 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: aef78df3-fba0-4891-948c-6c624517ace4

📥 Commits

Reviewing files that changed from the base of the PR and between f1c8aef and 31576e0.

📒 Files selected for processing (12)
  • .claude/board/ISSUES.md
  • .claude/board/PR_ARC_INVENTORY.md
  • .claude/board/STATUS_BOARD.md
  • .gitignore
  • bench/README.md
  • bench/gate-run.sh
  • bench/gate.py
  • bench/src/main/java/com/adaworldapi/lancegraph/bench/Harness.java
  • bench/src/main/java/com/adaworldapi/lancegraph/bench/I_ProductionAccessorGate.java
  • bench/variants/probed/LaneProbe.java
  • java/src/main/java/com/adaworldapi/lancegraph/LaneProbe.java
  • java/src/main/java/com/adaworldapi/lancegraph/RowStore.java

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

@cursor

cursor Bot commented Sep 3, 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_7cc25f17-7658-45fc-abea-74bcde8a7538)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DCfrD5y19cvFc4AoyydXYv
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DCfrD5y19cvFc4AoyydXYv
@AdaWorldAPI
AdaWorldAPI merged commit c2b9344 into main Sep 3, 2026
1 check passed

@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: 55b7648550

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

Comment on lines +71 to +73
.forks(quick ? 1 : -1)
.warmupIterations(quick ? 1 : -1)
.measurementIterations(quick ? 2 : -1)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Apply JMH overrides only in quick mode

When LGJ_BENCH_QUICK is unset—the documented full/evidence run—these calls pass -1 to OptionsBuilder. JMH's programmatic setters reject negative fork and iteration counts rather than treating them as “inherit the annotations,” so Harness throws while constructing the options and never reaches Runner; this also breaks ordinary bench/run.sh runs. Build the base options normally and invoke these three setters only when quick mode is enabled.

Useful? React with 👍 / 👎.

Comment thread bench/gate.py
Comment on lines +127 to +128
if not re.fullmatch(r"[0-9a-f]{7,40}", a.amendment):
ap.error("--amendment must be a commit sha")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Bind the amendment to the run before collecting results

The advertised pre-registration safeguard only checks that the argument looks like hexadecimal text. A typo, a nonexistent commit, an unrelated commit, or an amendment created after inspecting the CSVs is accepted and printed alongside a PASS because gate-run.sh never records the amendment/N before starting and gate.py verifies neither the commit nor its relationship to the run. Consequently the tool can bless exactly the post-hoc threshold that §5 declares void; require the amendment at run time, record it with both arms, and verify that binding during verdict calculation.

Useful? React with 👍 / 👎.

AdaWorldAPI pushed a commit that referenced this pull request Sep 3, 2026
…non-quick path fixed

Results commit citing Amendment A1 (43a08d1, which precedes this commit):
  before  8.645 ± 0.284 ns/call   (5 forks x 8 iterations, 65,536 rows)
  after  61.405 ± 1.464 ns/call
  delta  +52.760 ± 1.492          hw_delta 1.49 < N/2 = 20: powered
  VERDICT FAIL: delta - hw = 51.27 >= 40. Ratio 7.10 flagged (blocks nothing).
Banked: gate-before.csv, gate-after.csv, gate-run.txt, gate-verdict.txt.

Also fixes Harness: the quick-mode change in #64 passed -1 to JMH's
forks/warmup/measurement setters as "use the annotation"; JMH rejects a
negative count, so every NON-quick run died at startup, run.sh included.
The quick smoke never walked that path. Setters are now only called in
quick mode.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DCfrD5y19cvFc4AoyydXYv
AdaWorldAPI pushed a commit that referenced this pull request Sep 3, 2026
…idue kept open, #64 sha + its shipped defect recorded

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DCfrD5y19cvFc4AoyydXYv
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