docs: commenting pass — 5 invariant comments + 7 wrong comments memorialized - #83
Merged
Conversation
…left implicit A LEAVE-default pass over the engine (already heavily commented by three prior passes). Five high-value additions where a tradeoff/invariant lived only in a test or a callee: - page_cache.rs: dirty_count counts ONLY in-cache dirty entries, never spilled pages — that is what makes the dirty_count==entries.len() eviction short-circuit sound. - overflow.rs: the wrong-type + zero-length guards MUST precede the Vec::with_capacity, so an untrusted total_length can't drive a speculative giant allocation. - membership_index.rs: pack the POST-insert inner.depth, not the stale pre-insert depth (invisible at depth 0; pinned by inner_grow_roundtrip). - transaction/fault.rs: fail_next_handle_table_op is consumed in handle_table_insert_candidate, which both allocate_inner and update_inner route through. - python/errors.rs: add TagMismatchError to the exception-hierarchy doc.
🚦 Bench results: PR vs main✅ No regressions detected
Per-scenario detail (4 metrics × cells)document-store
mutation-log
ycsb-a
ycsb-b
|
Xof
added a commit
that referenced
this pull request
Jul 1, 2026
Resolve the sole conflict in src/page_io.rs: main's commenting pass (#83/#84) corrected the fsync doc-comment from "twice" to "three times per commit" (I28 pre-drain flush + data pages + superblock), while this branch renamed the Memory backing field pages -> bytes. Kept both: the corrected "three times" comment (still accurate under encryption — the per-page seal changes the unit size, not the fsync count) and a match pattern valid for the renamed field (`Backing::Memory { .. }`). The other three shared files (python/src/errors.rs, src/defrag.rs, src/page_cache.rs) auto-merged cleanly. Verified on the merged tree: 680 tests across 32 suites pass, clippy clean on lib + chisel-py.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A LEAVE-default
/comment-runpass over the engine (11 parallel agents, one per subsystem). The codebase is already heavily commented from three prior passes, so the overwhelming verdict was LEAVE — this PR is 5 high-value additions where a tradeoff/invariant lived only in a test or a callee:page_cache.rs—dirty_countcounts ONLY in-cache dirty entries, never spilled pages; that's what makes thedirty_count == entries.len()eviction short-circuit sound.overflow.rs— the wrong-type + zero-length guards MUST precedeVec::with_capacity, so an untrustedtotal_lengthcan't drive a speculative giant allocation.membership_index.rs— pack the POST-insertinner.depth, not the stale pre-insert depth (invisible at depth 0; pinned byinner_grow_roundtrip).transaction/fault.rs—fail_next_handle_table_opis consumed inhandle_table_insert_candidate, which bothallocate_innerandupdate_innerroute through.python/errors.rs— addTagMismatchErrorto the exception-hierarchy doc.All are ADD/EXTEND (EXTEND appends, never overwrites). Verified: clippy
--all-targetsclean, fmt clean,maturin develop+ pytest 119 pass.0 bugs found. The pass also surfaced 7 actively-wrong comments (mismatches, not gaps) — left UNCHANGED per the discipline (memorialize, don't paper over), memorialized for triage. They're mostly comment-rot from the freemap rewrite + the transaction.rs extraction (e.g.
page_io.rsPageIo::fsyncstill says "twice per commit" but it's 3 fsyncs now;defrag.rsdoc says "net drop" but the code is a set-difference). See the follow-up.