Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 125 additions & 0 deletions .claude/board/ISSUES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,130 @@
# Issues Log — Open + Resolved (double-entry, append-only)

## ISS-LGJ-CACHED-DESCRIPTOR-CROSS-THREAD-WINDOW (2026-08-28) — OPEN

**Opened late, and the lateness is the first thing worth recording.** v3 W4
requires this issue to be opened **in the same commit** that re-scopes
`ISS-LGJ-EPOCH-UNCHECKED` to `RowStore` — *"Two entries, never one — a scoped
resolution must not absorb an unfixed window."* #53 shipped the `Mask` half and
#55 first tried to close the `RowStore` half; neither opened this. Found while
re-reading W4 to check the unwind against it, one commit after the re-scoping
rather than in it. The failure shape is the arc's own: **a paired obligation
left standing beside a discharged one.**

**What it is.** The W1.1 `Mask` probe narrows the cached-descriptor staleness
window; it does not close it, and the residue is cross-thread. Three facts,
each re-verified in-tree today rather than carried forward from the plan:

1. `RowStore.closed` (`RowStore.java:35`) and `Mask.closed` (`Mask.java:26`)
are **non-volatile and lock-free** — so the Java-side guard carries both a
check-then-act race and a *visibility* race, facade-wide and pre-existing.
2. `Engine.windowOf` builds `MemorySegment.ofAddress(addr).reinterpret(byteLen)`
(`Engine.java:403`) — an **unbounded-lifetime** segment with no FFM scope
check. Nothing in the segment itself can observe the resource closing.
3. `Engine.close(long)` is `public static` (`Engine.java:73`), so it is
reachable **outside** the owning facade object.

Together: a Java-side lock would be sound only under an unstated *"this object
is the sole closer of this handle"* assumption. **Writing that assumption down
is arm (ii)'s deliverable, and it is still unwritten.**

**Stated rather than smoothed over.** That deliverable is a **documented
contract, not an enforced one** — facts 2 and 3 are exactly why no Java-side
mechanism can enforce it. The probe's own read is a native acquire through the
registry `RwLock`, which is why it *narrows* the window; a second thread
closing between the probe's return and the segment read is still unguarded.

**Not a regression, and not newly introduced by W1.1.** The ABI states its own
position: concurrency is unbenchmarked and *"a concurrent Java writer would
need a documented protocol, which this ABI version does not define"*
(`exports.rs`, cf. `abi.md` concurrency section). This entry exists so the
window is **tracked** rather than absorbed into a scoped resolution that does
not cover it.

**Closure terms.** Closes when the sole-closer contract is written into
`docs/abi.md` and the facade javadoc, *or* when the ABI defines a concurrent
access protocol that makes the contract enforceable. Not gated on any
measurement — nothing here is a cost question.

## ISS-LGJ-ROWSTORE-PER-ACCESS-MEASURED — EXPLORATORY, decides nothing

> ⊘ Retitled (Codex P1a on #55). The header read *"the answer is 'not at
> all'"*. It is not an answer: the run below is void by §5.2 and its arms are
> not the production accessor (§5.4). See the struck Consequences.

The gate §5 named and never had. `bench/.../H_CachedAccessorProbe.java`,
5 forks x 8 iterations, `rows=65536`, release `.so`:

| arm | ns/accessor-call | 99.9% half-width | % of own score |
|---|---|---|---|
| `cached` (probe absent) | **9.398** | ±0.362 | 3.85% ✓ |
| `probed` (probe present) | **44.932** | ±0.931 | 2.07% ✓ |

`delta_ns = 35.534`, `hw_delta = sqrt(0.362² + 0.931²) = 0.999`, delta CI
**[34.54, 36.53]**, `ratio = 4.78` (**flagged**, threshold 2.0). Both arms
clear the per-arm acceptance rule. The power precondition `hw_delta < N/2`
is met for any `N > 2.00 ns`.

⊘ **STRUCK (Codex P1a on #55).** This paragraph read a verdict off the table
— *"FAIL at any `N ≤ 34.54`… So: not at all. The `RowStore` half does not
ship."* No verdict is available here: §5's verdict function takes an `N` from
an amendment that precedes the run, and none does. The numbers stay; the
conclusion does not.

**⚠ This run is NOT the pre-registered gate, and the reason is my error.**
§5.2 requires the amendment naming `N` to be committed *before* the first
run; I built and ran the benchmark without one. By §5.2's own words a
result whose amendment does not precede it "is not a measurement — it is a
post-hoc threshold, and the run is void." So this is recorded as an
**EXPLORATORY** measurement, and any `N` written now is contaminated by
having seen it.

⊘ **STRUCK (Codex P1a on #55).** This paragraph argued *"what saves the
conclusion is that it does not depend on `N`"* — the exact move §5.2 exists to
forbid, dressed as an exemption from it. A conclusion that "does not depend on
`N`" is a conclusion reached without the gate, and it is doubly unavailable
here because the arms are not the production accessor (P1b): the ratio is
against a *reconstructed* 9.4 ns body, not `classidAt`'s.

**Consequences:**
- ⊘ **STRUCK (Codex P1a on #55).** This bullet read: *"`ISS-LGJ-EPOCH-UNCHECKED`
closes for `Mask` (shipped, #53) and is **CLOSED AS WON'T-FIX for `RowStore`
per-access** on this measurement."* **It closed a safety gap as won't-fix using
a run this same entry declares void.** Replacing the required ex-ante cutoff
with the post-hoc judgment that "no principled budget … is 35 ns" is exactly
the substitution pre-registration exists to prevent — and it contradicts v3 W4,
which requires this issue to stay OPEN and scoped to `RowStore` until the half
has validly shipped or been validly rejected. **`ISS-LGJ-EPOCH-UNCHECKED`
remains OPEN for `RowStore`.** The `Mask` half's closure (#53) is unaffected:
it shipped on a falsifier, not on a budget.
- ⊘ **STRUCK (Codex P1b on #55).** This bullet claimed to correct
`ISS-LGJ-BENCH-GATE-PRECEDES-ITS-SUBJECT`'s "forces TWO BUILDS". **The
original finding was right and this "correction" was wrong.** `H_CachedAccessorProbe`
calls `Engine.describeLane` directly, so both arms *reconstruct* an accessor
body and neither is `RowStore.classidAt` — they bypass the cached `lanes[]`
lookup, `requireOpen`, the `FacetId` null-check and the bounds check. §5.4's
own words are that the accessor "is an inlining/compile barrier that changes
the surrounding loop's optimization… That total is the right thing to gate on."
Two **production** variants genuinely cannot share one classpath without the
hoistable branch §5.5 forbids, so the two-build requirement stands, unamended.

**What this run still is.** An indicative measurement of a bare
`lgj_lane_describe` crossing on a hot read loop (35.5 ns delta, CI
[34.54, 36.53]) — real, reproducible, and useful as an order-of-magnitude
input to whatever `N` an amendment eventually names. It is **not** the cost of
the shape that would ship, and it decides nothing.

**A valid `RowStore` gate still needs all three, in this order:** (1) an
amendment naming `N > 0`, committed *before* the run; (2) before/after variants
of the **production** accessor — two builds of `java/`, per the unamended
finding above; (3) a results commit citing that amendment's sha.

**The pattern, for the ledger — eighth instance.** `ISS-LGJ-SECOND-VERDICT-BESIDE-THE-FIRST`
records seven cases of a repair fixing one verdict path and leaving a second
standing beside it. This is the eighth and the worst shape of it: the entry
*correctly* declared its own run void in one paragraph and then *acted on that
run anyway* in the next. Naming a failure mode does not confer immunity to it.

## ISS-LGJ-BENCH-GATE-PRECEDES-ITS-SUBJECT — the RowStore gate cannot be run as specified

Found while starting the benchmark v3 names as the `RowStore` half's gate.
Expand Down
26 changes: 26 additions & 0 deletions .claude/board/PR_ARC_INVENTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,32 @@
> anti-pattern the imported board rules name. Backfilled below in one
> pass rather than left stale; PR #4 onward gets its entry at merge time.

## PR #54 — the fifth instance, and making `Engine.epoch`'s javadoc true (merged 2026-08-28, `cc53c8c` — 4 commits, head `fd1df59`)

> ⊘ **Entry backfilled on #55 (2026-08-28).** #54 merged without it. #54 is a
> *mixed* PR — it changed `Engine.java` and struck two plan rules, so the
> termination clause's hygiene-only exemption does not reach it and the entry
> was owed at merge time. Recorded late rather than left absent.

- **Added:** `Engine.epoch`'s javadoc rewritten to be **true**. It had claimed
"Java re-checks this before trusting a cached lane segment"; #53's fix routes
through `Engine.describeMask`, so `epoch` retains exactly **zero** callers.
The javadoc now states that, says why `lgj_resource_info` is the wrong
question for a cached lane (it resolves the child's own slot, which outlives
its parent), and why the symbol is retained anyway — the `RowStore` half
would need a lane's *owning* resource. That rewrite is what actually
discharges the W3 obligation; #53's board line claiming the javadoc "is no
longer false" would have hidden it.
- **Struck (plan §5), instances five through seven of the pattern:** the fifth
was found by review; the sixth and seventh were each **introduced by the fix
for the one before it**. "Void in that case" implied the struck rule still
applied elsewhere; the label was then attached on the sign where it belongs
on the interval. Each struck in place, never deleted.
- **Confidence:** high on the javadoc (it now describes observable reality —
zero callers, verifiable by grep). Medium on §5 itself, and the reason is
§5's own history: seven repairs to one rule, three of them self-inflicted.
The eighth arrived on #55.

## PR #53 — W1.1: the §5 adversarial read, and the Mask half wired to the substrate (merged 2026-08-28, `3b4bc03` — 5 commits, head `8e2654d`)

- **Added:** the `Mask` half of W1.1 — `Mask.words()` re-authorises its
Expand Down
4 changes: 2 additions & 2 deletions .claude/board/STATUS_BOARD.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ the membrane / Valhalla cheap addresses / everything else underneath).
| D-id | Deliverable | Status |
|---|---|---|
| D-LGJ-MMV-0 | Mechanical fences: materialization-list gate, §E worker-topology fence (+ reflective arm 2b), SIMD-branch fence — each proven able to fire | Shipped (PR #48, merged `42fba54`) |
| D-LGJ-MMV-1a | Resolve `ISS-LGJ-EPOCH-UNCHECKED`. **5+3 council COMPLETE** — ratified at `.claude/plans/epoch-recheck-v3.md`: ship (a) as a native generation-checked liveness probe (NOT "epoch checking" — the compare is unreachable), arm (ii) scoped contract, six obligations W1-W6, C1's rewritten falsifier, no new ABI symbol on the production path (the one the wave admits is test-only) | Council done, implementation Queued |
| D-LGJ-MMV-1a | Resolve `ISS-LGJ-EPOCH-UNCHECKED`. **5+3 council COMPLETE** — ratified at `.claude/plans/epoch-recheck-v3.md`: ship (a) as a native generation-checked liveness probe (NOT "epoch checking" — the compare is unreachable), arm (ii) scoped contract, six obligations W1-W6, C1's rewritten falsifier, no new ABI symbol on the production path (the one the wave admits is test-only) | **Mask half DONE 2026-08-28** (#53) — `Mask.words()` re-authorises its cached word lane on every use via `lgj_mask_describe` (`resolve_mask_with_parent`, O(1) per whole scan, never per word), disable-run red-then-green. **RowStore half OPEN** — see the row below. Per v3 W4 the issue closes as RESOLVED only when BOTH halves ship, so `ISS-LGJ-EPOCH-UNCHECKED` stays OPEN, scoped to `RowStore`; `ISS-LGJ-CACHED-DESCRIPTOR-CROSS-THREAD-WINDOW` is the W4-paired second entry (opened late, on #55) |
| D-LGJ-MMV-1a-mask | The `Mask` half — probe at `words()`, one downcall per whole scan, falsifiable at negligible cost. **Ships regardless of measurement** | Queued |
| D-LGJ-MMV-1a-rowstore | The `RowStore` half — probe per-access inside `lane()`; forced by falsifiability, not chosen on cost (a first-resolve probe is blind to the only scenario it could catch). Does not ship if per-access proves too costly | Queued, gated on §5 |
| D-LGJ-MMV-1a-rowstore | The `RowStore` half — probe per-access inside `lane()`; forced by falsifiability, not chosen on cost (a first-resolve probe is blind to the only scenario it could catch). Does not ship if per-access proves too costly | **Still Queued; the §5 gate was ATTEMPTED on #55 and the run is VOID.** Bench Component H measured a bare `lgj_lane_describe` crossing at **+35.5 ns** over a cached read (CI [34.54, 36.53], 5 forks x 8 iters, rows=65536) — indicative only, on two independent grounds: no `N` was pre-registered (v3 §5.2), and both arms call `Engine.describeLane` directly rather than `RowStore.classidAt`, so they bypass the cached `lanes[]` lookup, `requireOpen`, the `FacetId` null-check and bounds (v3 §5.4: the accessor is an inlining barrier and *that total* is what gates). A first attempt to read a won't-fix verdict off it was withdrawn. **A valid gate needs all three, in order:** an amendment naming `N > 0` committed first; before/after variants of the PRODUCTION accessor in two builds of `java/` (the two-build requirement stands, unamended); a results commit citing that amendment's sha |
| D-LGJ-MMV-1a-hook | Test-only ABI export: invalidate a registry slot (bump generation) while deliberately leaking the `Arc`, so the allocation stays mapped — without it W5's disable arm performs a read-after-free and cannot report failure deterministically (Codex P1, PR #49). Full ABI citizen: minor bump, manifest + `abi.md`, lazy holder, `requireMinor`, `OldAbiCompatTest` leg. The ONLY new symbol this wave admits | Queued |
| D-LGJ-MMV-1a-bench | Isolated per-accessor JMH benchmark (build-time variant swap, Blackhole, ≥5 forks) — does not exist today; §5's gate is undecidable without it | Queued |
| D-LGJ-MMV-1b | Minors 2-4 lazy `Downcalls` holders; `OldAbiCompatTest` minor-1 leg; doctrine "fails cleanly at the call" wording restored by storno | Queued |
Expand Down
Loading