Repository navigation
board: PR #57 arc entry, and a clean sweep for the leak's siblings - #59
Conversation
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.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR adds documentation for the PR ChangesPR
Estimated code review effort: 1 (Trivial) | ~5 minutes Suggested reviewers: Poem
Comment |
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.
There was a problem hiding this comment.
💡 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".
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).
… 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).
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.closecall site injava/src/main, exhaustively:Mask.closeRowStore.closelongfields arehandleandrowCountNativePattern.closeNo other conditional skip exists. The boundary is stated too: a
Maska caller holds over aNativePatternis 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 madeMask.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_closereturnsOK; CodeRabbit saidINVALID_HANDLEand 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