Skip to content

board: PR #57 arc entry, and a clean sweep for the leak's siblings - #59

Merged
AdaWorldAPI merged 2 commits into
mainfrom
claude/board-57-arc
Aug 28, 2026
Merged

AdaWorldAPI merged 2 commits into
mainfrom
claude/board-57-arc

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Aug 28, 2026 •

Copy link
Copy Markdown
Owner

Post-merge arc entry for #57, plus one thing #57 owed and didn't do: check whether the bug it fixed had siblings.

The sweep — clean, and worth recording as such

A bug found once is worth one grep for its siblings. Every Engine.close call site in java/src/main, exhaustively:

site shape
Mask.close unconditional (the #57 fix)
RowStore.close unconditional; holds no child handles at all — its only long fields are handle and rowCount
NativePattern.close unconditional, and closes its three internal masks first, so a child never points at a dead parent even transiently

No other conditional skip exists. The boundary is stated too: a Mask a caller holds over a NativePattern is not one of those internal fields, so it still becomes an orphan when its parent closes — correct by design (the caller owns it), and safe only because #57 made Mask.close() actually release an orphan.

The two things from #57 worth a future session's time

How the leak surfaced. Codex said an orphaned mask's lgj_close returns OK; CodeRabbit said INVALID_HANDLE and asked for that to be documented. Only one could be right, so it went to source — and behind the disagreement was a leak neither was arguing about. Deferring to the more confident reviewer, or splitting the difference, would have shipped the bug as documented behaviour. When two reviewers contradict each other, the disagreement is the signal.

Instance nine, and why it is the purest on record. The overclaim Codex caught was #57's own correction: "every operation returns PARENT_CLOSED" narrowed to "every handle-mediated operation", still false. Eight and nine are not the same claim — they are the same sentence, narrowed once, so no diff could show the repair and the residue apart.

Confidence, split rather than averaged

High on the leak and its fix — registry read directly, falsifier disable-verified. High on the contract's wording; low on its force, since it is unenforceable by construction and says so. Medium on the doc surface: three overclaims in one pass, two found by reviewers, and nothing systematically checks a doc claim against the code.

Hygiene-only by content, so the termination clause applies — no entry of its own. The sweep was folded in here rather than opened as a seventh PR, since review spend is now metered per file.


Generated by Claude Code

Summary by CodeRabbit

  • Documentation
    • Documented resource cleanup behavior for Java engine shutdown paths.
    • Clarified that orphaned masks are released when masks are closed.
    • Added an inventory of the sole-closer contract, related fixes, validation status, and remaining enforcement work.
    • Corrected documentation overclaims and recorded resolved and open issues.

Records the leak and how it surfaced -- two reviewers contradicting each
other on one doc line, neither arguing about a leak, the leak being what
the disagreement stood on. That is the reusable part; deferring to the
more confident reviewer would have shipped the bug as documented
behaviour.

Also records instance nine of the second-verdict pattern, which was this
PR's own first correction: 'every operation' narrowed to 'every
handle-mediated operation' and still false. Eight and nine are the same
sentence, not the same claim, so no diff could show repair and residue
apart.

Confidence split deliberately: high on the leak fix, high on the
contract's wording, LOW on its force -- it is unenforceable by
construction. Medium on the doc surface, since three overclaims turned up
in one pass and nothing checks a doc claim against the code.
@coderabbitai

coderabbitai Bot commented Aug 28, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 36a6fc09-4205-46c4-a9df-ef13cb8d5493

📥 Commits

Reviewing files that changed from the base of the PR and between d6d2113 and 29a247f.

📒 Files selected for processing (2)
  • .claude/board/ISSUES.md
  • .claude/board/PR_ARC_INVENTORY.md

📝 Walkthrough

Walkthrough

The PR adds documentation for the PR #57 resource-leak analysis. It records the Engine.close call-site sweep, the sole-closer contract, orphaned-mask handling, corrected claims, issue status, validation gates, and confidence levels.

Changes

PR #57 resource-leak documentation

Layer / File(s) Summary
Arc record and close-site findings
.claude/board/PR_ARC_INVENTORY.md, .claude/board/ISSUES.md
Documents the orphaned-mask leak, its falsifier, the close() contract, reviewed close paths, corrected documentation claims, issue status, deferred enforcement, validation gates, and confidence assessment.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: claude

Poem

A rabbit records each closing door
The masks release their weight once more
The engine’s paths are checked and clear
The arc keeps every finding near
Notes hop neatly into place


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

A bug found once is worth one grep for its siblings. Every Engine.close
call site in java/src/main enumerated: Mask.close (this fix),
RowStore.close (unconditional; holds no child handles at all -- its only
long fields are handle and rowCount), NativePattern.close (unconditional,
and closes its three internal masks first so a child never points at a
dead parent even transiently).

No other conditional skip exists. Recorded so the next session does not
redo the sweep, and with the boundary stated: a caller-held Mask over a
NativePattern is not one of those internal fields and still becomes an
orphan -- correct by design, and safe only because this fix makes
Mask.close() release an orphan.

Folded into this board PR rather than opened as a seventh, since it is
board-only and the review-spend cost of small frequent PRs was just
flagged to the operator.
@AdaWorldAPI AdaWorldAPI changed the title board: PR #57 arc entry board: PR #57 arc entry, and a clean sweep for the leak's siblings Aug 28, 2026

@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: 70851da372

ℹ️ 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 thread .claude/board/PR_ARC_INVENTORY.md Resolved
@AdaWorldAPI
AdaWorldAPI merged commit b76ccd5 into main Aug 28, 2026
1 check was pending
AdaWorldAPI pushed a commit that referenced this pull request Aug 28, 2026
Codex (P2 on #59, after it merged) found that #57's arc entry recorded arm
(ii) as "finally landed" while two ratified, mechanically-checkable
obligations had no implementation at all. All three of its claims verified
in source before acting.

W1 -- neither RowStore nor Mask contained a word of the required
thread-safety scope, and "happens-before" appeared nowhere in java/src.
Both classes now carry it, plus the once-per-scan note W1 requires on
materializeRows: the guard runs once for the whole scan, so a close during
the bit walk is not detected, which is exactly what makes the check
affordable there and why it was never a foregone conclusion for
RowStore's per-call reads.

W2 -- root CLAUDE.md had gone stale the day W1.1 shipped. It still said
the cached path reads with "NO further registry call" and that epoch "is
currently unconsulted anywhere in src/main". Both false for Mask since
#53, in the file every session reads first. Now split: Mask re-validates
at each top-level facade call and is NOT atomic against a concurrent
close; RowStore does not re-validate at all and ISS-LGJ-EPOCH-UNCHECKED
stays open scoped to it. Old claims struck, not deleted.

Two new fence legs, and the second is the precedent W2 says "must be
built, not merely cited" -- the first fence in this class that actually
opens the doctrine file rather than citing it as an out-of-band list.

Two implementation notes worth keeping:

Fence 1b reads RAW lines, not codeLines. Every other fence strips
comments because it hunts code; this one hunts javadoc, so the shared
filter would delete exactly what it looks for and the leg would pass
vacuously on an empty haystack. It also asserts a control file WITHOUT
the literal, so a match-everything scanner cannot pass.

Fence 1c scans the scope note, not the file or the whole bullet. The same
bullet legitimately contains "unconditionally" about a falsifier that
holds unconditionally -- a true sentence. A wider scan fires on it, and a
fence that flags a correct sentence is the fires-on-everything defect this
repo's own rules name.

Disable-runs, both red-then-green: stripping the literal from Mask fails
1b; putting a forbidden string in the note fails 1c on both arms.

Gate: 351 checks, 0 failures (was 338).
AdaWorldAPI added a commit that referenced this pull request Aug 28, 2026
… wording, and two fences

Codex raised a P2 on #59 after it merged: #57's arc entry recorded arm (ii)
as "finally landed" while W1 and W2 had no implementation at all. All three
of its claims verified in source; all three right.

W1: happens-before appeared nowhere in java/src. Both facade classes now
carry the scope, plus the once-per-scan note on materializeRows.

W2: root CLAUDE.md had been stale since W1.1 shipped -- it still said the
cached path takes no further registry call and that epoch is unconsulted,
both false for Mask since #53, in the file every session reads first. Now
split by half, struck in place.

Fence 1b was itself partly vacuous, and my own disable run proved it:
turning it red took stripping TWO occurrences and I never asked why. It
scanned the whole file, so deleting the class block -- the regression it
exists to catch -- left it green. Now scoped to the class javadoc and
requiring the whole obligation including close(). Recorded as instance
eleven with the rule it adds: a disable that removes more than the
regression does not demonstrate the regression is caught.

Fence 1c is the precedent W2 demanded be built rather than cited -- the
first leg to open the doctrine file. Verified before merge that deleting
the Mask re-validation bullet fires it, so the review's residual concern
about that requirement being unprotected does not hold.

Gate: 359 checks, 0 failures (was 338).
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