Repository navigation
codegraph: read rows.bin; header-only unchanged refresh (D-CODEGRAPH-0-BIN PR B, chunks 1-2) — changed-crate timing gate NOT met - #1929
Merged
Conversation
…PR B, chunk 1) artifact_bin.rs reads the binary rows format ruff_charon writes (ruff #133): Header::parse/read checks the fixed 64 bytes without touching the body (the unchanged-refresh path), CrateFile::parse verifies the whole file in the writer's check order and refuses each malformed shape with its own BinRefusal, and every accessor is a lens over the one owned buffer. The golden cg_lib.rows.bin copied from ruff parses and matches its TSV row for row. artifact::digest now folds the length as little-endian bytes, matching the writer on every host. Not yet wired into Codegraph::open/refresh. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X6y3drwKSE2zSgoexheLFX
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
… only the header (D-CODEGRAPH-0-BIN PR B, chunk 2) read_dir takes each crate from `<crate>.rows.bin` when present, else from `<crate>.rows.tsv`. read_bin_as fills the existing Lanes from the id lanes: one interner call per distinct symbol, predicate, grade and file per crate file, no text parsing, no string splitting. prepare_refresh reads the 64-byte header of a binary file and returns before touching the body when its digest matches the recorded one. The interner itself is unchanged (chunk 3). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X6y3drwKSE2zSgoexheLFX
… a per-stage split Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X6y3drwKSE2zSgoexheLFX
…us met; changed 2.5 ms not met, interner) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X6y3drwKSE2zSgoexheLFX
AdaWorldAPI
pushed a commit
that referenced
this pull request
Nov 2, 2026
…e open, B3 next) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X6y3drwKSE2zSgoexheLFX
AdaWorldAPI
added a commit
that referenced
this pull request
Nov 2, 2026
…1a5sw board: /coresearch XLOG / Soufflé / Crepe / DR³ exploration map + Persistent Relational Grammar extension; #1929 recorded as a plateau
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.
Summary
This is the reader half of plan
d-codegraph-0-binary-lanes-v1.md, chunks 1 and 2. It reads the<crate>.rows.binfiles thatruff_charonwrites (ruff #133).Chunk 1,
artifact_bin.rs:Header::parseandHeader::readvalidate the fixed 64 bytes without touching the body.CrateFile::parseverifies the whole file in the writer's own check order. Each malformed shape is refused with its ownBinRefusal;IntakeRefusal::Bincarries it.artifact::digestnow folds the length as little-endian bytes. Before, it went throughHasher::write_u64, which folds native-endian bytes. The result is unchanged on little-endian hosts and now matches the writer everywhere.tests/data/golden/cg_lib.rows.binand.rows.tsvare copied byte-identical from ruff (writer commit6c3d1bf8da).Chunk 2, intake:
read_dirtakes each crate from<crate>.rows.binwhen present, else from.rows.tsv.read_bin_asfills the existingLanesfrom the id lanes. It calls the interner once per distinct symbol, predicate, grade and file per crate file. It parses no text and splits no strings.prepare_refreshreads only the 64-byte header of a binary file and returns before touching the body when the digest matches the recorded one.Timing gate (release, mask-risc store, 17,155 rows, N = 41 fixed in advance, 4 CPUs at load ≈ 0.3)
examples/bin_timing.rs(committed) produced these numbers:refresh_crate(rows.bin)rows.binfs::readCrateFile::parse(verify)read_bin_as(interning + lanes)rows.tsvThe unchanged path improves about 600× over the TSV path (1.5–1.7 ms before). The changed-crate intake is about 2.6× faster than the TSV path, but it fails the plan's ≤ 1 ms gate.
Per the plan, a failed gate is reported, not shipped as passing. The remaining cost is
Symbols::intern, about 2 ms of the 2.5 ms: string hashing plus an allocation for each new name. That is the interner replacement the plan already assigns to chunk 3:SYM_HASH) to global id, with label locators into the retained file buffers;internat open or refresh;Whether to merge chunks 1–2 now, as a strict improvement with the gate open, or to hold them for chunk 3 is the operator's decision.
Test Plan
tests/bin_intake.rs(15 tests):Header::readrequests exactly 64 bytes;FunDeclId.tests/bin_refresh.rs(5 tests):Bin(Digest).read_dir: 4 tests fail.cargo clippy --all-targets -- -D warningsand fmt are clean.Not to be merged automatically.
🤖 Generated with Claude Code
https://claude.ai/code/session_01X6y3drwKSE2zSgoexheLFX