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
2 changes: 1 addition & 1 deletion .claude/board/STATUS_BOARD.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ Plan: [d-codegraph-0-resident-codegraph-v1.md](../plans/d-codegraph-0-resident-c
| D-id | scope | status | gate / falsifier |
|---|---|---|---|
| **D-CODEGRAPH-0-A** | ruff `ruff_charon`: LLBC → Kythe facts with a witness status per call, for one real crate | SHIPPED: ruff #129 (merged `9913e90946`), lance-graph #1918 (merged `c11e4262e`): calls byte-identical to `llbc_calls.py` on the fixture and `mask-risc`; receipt conserved (16,149); Kythe `/xrefs` 3/3 call pins | rust-analyzer oracle (`sag-ra-probe GRAPH=1`) and rustc on `fixtures/codegraph`; `POSSIBLE` never counted as a confirmed caller |
| **D-CODEGRAPH-0-B** | resident rows via the ruff sink; per-file digests; incremental invalidation | QUEUED | clean import == incremental import |
| **D-CODEGRAPH-0-B** | resident rows via the ruff sink; per-file digests; incremental invalidation | LANDED (offline form): ruff #130 (merged `95be2e480b`; offline store in `ruff_charon`; `RefinedTruthSink` not reused, typed to R2IL). Incremental == clean on the fixture, byte-identical; skipped dependent leaves exactly one dangling edge. Follow-up fixes in ruff #131 (open). Lance-graph SoA residency still open | clean import == incremental import |
| **D-CODEGRAPH-0-C** | callers / callees / impact / diagnostics; tiled closure; body → R2IL design check | QUEUED | each guard disable-verified; unused import proven only without macros, traits, globs, re-exports |
| **D-CODEGRAPH-0-D** | local stdio MCP over C | QUEUED | only after B and C gates |
| **D-CODEGRAPH-0-E** | token measurement with and without the Codegraph | QUEUED | same revision, questions, model; nothing claimed before measured |
Expand Down
18 changes: 18 additions & 0 deletions .claude/board/entries/2026-11-02-d-codegraph-0-gap-map.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,21 @@ Not yet: rust-analyzer as an independent check of the rows (the comparison is st
## Correction (2026-11-02): G8 withdrawn

The ruff sink is not unmerged. Ruff PRs #101 (`RefinedTruthSink` + offline backend), #102 (v2 facts/residuals artifacts and their reader) and #103 (round-trip reconstruction oracle) merged on 2026-08-18. The #121 replay carried their content onto today's `main` (`crates/ruff_r2il/src/sink.rs:72` `pub trait RefinedTruthSink`; `read_facts`, `read_residuals`), where it has since changed. The three `claude/r2il-pr2-*` branches only look unmerged because they share no history with the rebuilt `main`. Slice B builds on `main`'s `sink.rs`, not on those branches.

## Slice B: the offline store (ruff #130, merged `95be2e480b`)

`ruff_charon::store::Store` persists per crate: relation rows, residuals, and the FNV-1a digest of every source file Charon read. The artifacts follow `ruff_r2il::sink`'s discipline (`#version` + `#schema`, readers keyed by column names). `RefinedTruthSink` is not reused: it is typed to R2IL `FlatFact`s, and these rows are call relations.

The unit of update is the crate: `import` replaces all of a crate's artifacts, `stale(root)` names crates with a changed or vanished file, `with_dependents` adds their dependents, and `dangling()` reports call rows whose callee no stored crate defines.

On the fixture, rev1 → rev2 (rev2 now also deletes `area_dyn` from `cg_lib` and drops its call from `cg_app`):
- **Incremental == clean.** Refreshing both crates gives the same rows as a clean rev2 import; through the CLI the store directories are byte-identical (`diff -r`).
- **Deletions.** `triple` and `area_dyn` leave no rows.
- **Skipped dependent.** Refreshing only `cg_lib` leaves exactly one dangling edge, `cg_app::run → cg_lib::area_dyn`.
- **Staleness.** `stale` is empty on unchanged sources, names `cg_lib` after a one-byte edit, and names both crates on the rev2 tree.

Five disable runs each turn their own tests red.

G5 (resident, incremental store) is closed for the offline form. Still open: residency in lance-graph's SoA (a lance-graph-side reader of these artifacts), then the queries of slice C.

ruff #131 (open) corrects four Codex findings on #129/#130: a body Charon left unstructured is still harvested, a call through a known trait impl resolves to the impl's method or the trait default, temporary files are unique per call, and a temporary name left by an interrupted import is skipped instead of aborting the import.
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ use cg_lib::Sq;
pub fn run() -> u32 {
let s = Sq(3);
let r = Rect(1, 2);
cg_lib::area_of(&s) + cg_lib::area_dyn(&r) + s.area() + cg_lib::util::double(2)
cg_lib::area_of(&s) + cg_lib::area_of(&r) + s.area() + cg_lib::util::double(2)
}
4 changes: 0 additions & 4 deletions crates/sag-ra-probe/fixtures/codegraph/rev2/cg_lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ pub fn area_of<S: shapes::Shape>(s: &S) -> u32 {
s.area()
}

pub fn area_dyn(s: &dyn shapes::Shape) -> u32 {
s.area()
}

#[cfg(any())]
pub fn disabled() -> u32 {
util::double(1)
Expand Down
Loading