Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
ce4da2b
Bind no in-tree namesake to a receiver written as a standard type (Ru…
joyful-ii-V-I Nov 18, 2026
2e7a001
RUST-PARAM-GLOB-REEXPORT: a type or free fn reached through a `pub us…
joyful-ii-V-I Nov 18, 2026
ce36bf5
RUST-PARAM-GLOB-REEXPORT: keep graph.h line-neutral (the showcase see…
joyful-ii-V-I Nov 18, 2026
f230706
RUST-MODALIAS-GLOB: follow a module re-exported by a `use` into a glob
joyful-ii-V-I Nov 18, 2026
771d012
fix(edges): type Rust method chains through each callee's declared re…
joyful-ii-V-I Nov 18, 2026
3fa881f
refactor(edges): clear the quality-delta rows the chain typing added
joyful-ii-V-I Nov 18, 2026
0081dc8
docs(limits): list kChainHopCap (INDEXING) and regenerate LIMITS.md
joyful-ii-V-I Nov 18, 2026
a9ed1df
rust: read the calls written inside macro arguments (RUST-MACRO-ARGS)
joyful-ii-V-I Nov 18, 2026
6bdccd7
rust: macro-argument re-read, the shapes --quality-delta named (outpu…
joyful-ii-V-I Nov 18, 2026
90f6dd7
changelog: Rust calls inside macro arguments (RUST-MACRO-ARGS)
joyful-ii-V-I Nov 18, 2026
ed8e305
test(rustmacropathcheck): C3 reads the --skipped run's exit status; d…
joyful-ii-V-I Nov 18, 2026
9bffc22
RUST-PATH-SAMENAME-CLASS: a Rust path call names the ONE type its pat…
joyful-ii-V-I Nov 18, 2026
0e53ea9
RUST-STD-PATH-FROM: a Rust path whose head a `use` leads out of the t…
joyful-ii-V-I Nov 18, 2026
c9eefd5
RUST-PATH-OWNER: the ladder decision leaves buildGraph (quality-delta)
joyful-ii-V-I Nov 18, 2026
a670514
redact: every source, manifest and plan line an answer quotes passes …
joyful-ii-V-I Nov 18, 2026
6d00d2a
chore(quality): ack REDACT-TOUCH's six deliberate contract changes
joyful-ii-V-I Nov 18, 2026
a0c6eaf
test(redactcheck): rt5 checks both --plan-lint exit statuses (2: the …
joyful-ii-V-I Nov 18, 2026
7cccf6c
refactor(qd-swap): name nine similar-argument lists a call could swap
joyful-ii-V-I Nov 17, 2026
4447e5a
feat(qd-swap): prototype a similar-argument-list signal, report-only …
joyful-ii-V-I Nov 17, 2026
b724962
fix(qd-swap): the prototype moves no session dictionary and adds no L…
joyful-ii-V-I Nov 17, 2026
2070e1e
test(qd-swap): the similar= arms test each call's exit status
joyful-ii-V-I Nov 18, 2026
eb5d276
feat(qd): similar= on params rows is on by default, report-only (owne…
joyful-ii-V-I Nov 18, 2026
49e7ed7
Re-pin the legend dictionary pair for the similar= reading
joyful-ii-V-I Nov 18, 2026
a0775f5
test(qd-similar): compare every captured exit status in section 7
joyful-ii-V-I Nov 18, 2026
083af0e
PY-CLASS-SPRAY: a bare Python call binds the definition its own scope…
joyful-ii-V-I Nov 18, 2026
1745e20
feat(qd): similar= reports a run of three or more adjacent same-typed…
joyful-ii-V-I Nov 18, 2026
2912a60
refactor(ingest): the Rust closure-parameter arm leaves captureRustEv…
joyful-ii-V-I Nov 18, 2026
73bcfc2
refactor(graph): four pure helpers and PY-CLASS-SPRAY's ask leave bui…
joyful-ii-V-I Nov 18, 2026
a9b40a0
refactor(graph): the call-arity rule leaves buildGraph (quality-delta)
joyful-ii-V-I Nov 18, 2026
da89764
test(pyimportprecise): the cache walker reads lean cache v53 (stale p…
joyful-ii-V-I Nov 19, 2026
25bff26
Re-pin binary-pinned files once after rebasing train 1117d2 onto main…
joyful-ii-V-I Nov 20, 2026
320861b
test,docs: CodeRabbit round 1 on #706 (test arms, changelog wording, …
joyful-ii-V-I Nov 20, 2026
db68aab
ci: the gate reds CI found on the rebased train (#706)
joyful-ii-V-I Nov 20, 2026
7647275
fix(edges): never decrement the Rust payload argument index past zero…
joyful-ii-V-I Nov 20, 2026
92963a3
fix(edges): an import that takes a std name for another item proves n…
joyful-ii-V-I Nov 20, 2026
171328e
test: move the kMacroArgNestingDepth row into sort order so capdisclo…
joyful-ii-V-I Nov 20, 2026
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
6 changes: 6 additions & 0 deletions .ripwire_quality_acks

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions changelog.d/py-class-spray.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
### Fixed — a bare Python call binds the definition its own scope chain binds, not every namesake

A bare call `Model(...)` whose name the call's own scope, an enclosing function, or the module binds by
`def`/`class` statements alone now resolves to those definitions only, as Python's name lookup (LEGB) does.
Before, such a call took the name-only ladder and was split across every same-named definition in its
directory: on pydantic one `Model(b=1)` in a test reached all 965 `class Model` definitions of `tests/`
(517,311 edges from 643 callers). Measured with the pin census, cold, `--no-cache`: pydantic call edges
892,662 → 64,166 (the map's `edges=` 582,130 → 48,178), textual 34,013 → 28,252, django 107,887 → 100,627;
every call site keeps its disposition, and a changed site only loses targets, except where the local
definition had been dropped (pydantic's `test_args`: `foo(1, 2)` now binds the test's own `foo`). Peak
memory falls with the edges (pydantic 153–171 MB → 122–128 MB).

Two or more `def`/`class` statements of the name in that scope (an `if`/`else` pair, a redefinition) are a
split across those only. The rule makes no decision, and the call keeps the earlier answer, when another
binding shares the scope (an assignment, a parameter, an import, a `for`/`with`/`except` target), when a
`global`/`nonlocal` names it, when a lambda parameter or comprehension target of the name holds the call,
when the innermost scope is a class body that binds it, and at module scope under a star import, a
`globals()`/`setattr` write or a conditional def of a builtin's name. A default argument, decorator or
base clause runs in the enclosing scope. An annotation's names are read there too, an approximation: since
Python 3.14 an annotation is evaluated lazily, so it can see a later binding of the name. Python only;
`--for` answers on Python trees can change.
Gate: `test/pyaliascallcheck.sh` section 5.
7 changes: 7 additions & 0 deletions changelog.d/qd-similar-args.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### Added — `--quality-delta` marks a new or grown list of adjacent same-typed parameters (`similar=`), report-only

A C or C++ function that is new in the change, or whose parameter list grew, and that now holds three or more adjacent parameters of one written type with different names (`g( at, nameAt, nameEnd, fileId, line )`) gets `similar="N"` on its `params` row, N being the longest such run. A call that swaps two of them compiles and runs wrong. A row the `params` kind already reported keeps its severity and gains the attribute; any other function gets a new `params` row with `sev="minor"` (`was=` and `now=` stay parameter counts). `similar=` never gates: the exit status is what it was without it. On a range (`--quality-delta=A..B`), `--quality-kinds=` without `params` drops the rows, as it drops every `params` row. A run of two (`f( task, answer )`, `begin`/`end`) is not reported: on the tidy-681 ref pair (1bbfcebc1..b0f829d69) runs of two were 160 of the 184 rows, so the shortest reported run is three (owner decision, 2026-11-18). The scanner reads only the signature text: unnamed parameters, packs, `bool` and iterator types are not counted, and two spellings of one type (an alias beside its target) are two types. A run made by retyping a parameter at the same count is not seen, because the baseline stores parameter counts only. Other languages are not read.

Counting runs of two, on the 83 bugprone-easily-swappable-parameters findings of #681 the scan scored precision 0.97 and recall 0.90; on a hand-labelled sample of the functions clang-tidy does not flag, 0.78. `--for`, the map and `--deps` are unchanged. The full and compact legends define `similar=` when a row carries it.

Versions: the session legend dictionary moves to `dictv=9bdc025eecbce2a5 entries=1168` (the `similar=` reading); docs/COMMANDS.md and the 2026-11-20 showcase capture record the new pair.
5 changes: 5 additions & 0 deletions changelog.d/rust-glob-reexport.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### Fixed — a Rust type or function reached through a `pub use` re-export now proves the call

Two shapes left a Rust call unbound (`declined_calls=`) although the code names its target exactly. First, a type that a module supplies through a glob re-export (`pub use engine_state::*;` in `engine/mod.rs`) named no class, so a parameter written `engine_state: &EngineState` after `use nu_protocol::engine::EngineState;` typed nothing and `engine_state.get_decl(id)` stayed open between every `get_decl` in the tree. The module walk now follows the globs at a module's level: one class is named when every glob that can supply the name agrees on it. The walk takes at most four re-export hops and asks each module once, so when a chain of globs reaches a module at that limit, a shorter glob path to the same module is not walked again and the name can stay unbound. Two same-named types behind two globs still name nothing, and neither does an in-tree glob beside a glob the walk cannot place (an outside crate may supply the name unseen). Second, a bare call whose name a `use` binds (`use nu_engine::redirect_env;` over `pub use eval::{redirect_env};` in `lib.rs`) was declined when a second free function of that name sat elsewhere in the same crate. Such a call now binds the one free function its `use` reaches through the re-exports, and a `use` that leads outside the tree, nowhere or two ways decides nothing, as before.

Measured on nushell (main `5139f7840` against this change, `--pin-census` dispositions over all 153 556 calls): bound 50 116 → 53 459, declined 47 545 → 44 211. `--callers` of `EngineState::get_decl` lists 53 callers with 20 declined sites (was 5 and 116), of `nu_engine::eval_block` 12 with 8 (was 2 and 19; the 8 are calls through a local closure of that name), of `redirect_env` 10 with 0 (was 3 and 7). On axum 21 calls moved from declined to bound and `TestClient::get` reads 119 proven callers where all 174 were `via="name"`. 20 changed edges sampled across both repositories were opened at the call site: 20 correct. 133 edges on nushell changed target; the ones opened had pointed at a same-named method or a private namesake before. What it does NOT mean: a glob of an enum's variants or of an outside crate is not followed, a `use … as` alias of a function is not read, and a call qualified by a crate path (`nu_engine::eval_block(..)`) resolves as before. New arm (RX) in `test/receiverevidencecheck.sh`.
5 changes: 5 additions & 0 deletions changelog.d/rust-macro-args.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### Fixed — Rust: a call written inside a macro's arguments is a call of the enclosing function

`--callers`, `--callees`, `--uses`, `--impact` and every answer built on the call graph now see the calls inside `assert_eq!(f(), 1)`, `format!("{}", g())`, `vec![h()]` and a user macro's arguments. Before, the Rust grammar's opaque token tree hid them: a function whose body is one macro had no callees, and a test reached nothing through its asserts. Measured on three repositories against the previous build, call edges rose 4,885 to 5,158 on axum, 52,405 to 58,051 on nushell and 288,843 to 306,195 on zed, with the symbol count unchanged on each.

A macro's arguments are re-read only when they parse, as written, as one clean Rust expression or block; a `=>` arm body and a `{ … }` group inside other tokens are tried the same way. A `macro_rules!` definition, `quote!`, `stringify!`, `cfg!` and the pattern argument of `matches!` are never read. A call found this way is resolved like any other: its row can be proven, declined or `via="name"`. This does not type a receiver that the macro itself binds, so a method call on one stays a by-name row. A cold index of Rust code costs more CPU (about 2 % on axum, 3.5 % on zed, 10 % on nushell, median of interleaved runs); a warm index is unchanged. Old cache records are rebuilt once (`kParserVer`).
5 changes: 5 additions & 0 deletions changelog.d/rust-modalias-glob.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### Fixed — a Rust module re-exported by a `use`, then globbed, now supplies its items

axum-extra's tests write `use crate::test_helpers::*;`, and `crate::test_helpers` is not a module of axum-extra but `pub(crate) use axum::test_helpers;` in its `lib.rs`. The module walk did not follow that alias, so the glob was read as one that may bring any name in unseen: `let client = TestClient::new(app);` typed nothing and `client.get(..)` was declined or matched by name alone. A path segment that names no module of the layout is now followed through the one `use` that binds it at that module's own level, across crates, in one crate and through a chain of aliases (a cycle stops at the depth cap and names nothing). Every path that resolved before resolves exactly as before. What it does NOT mean: a module that only a glob brings in is not followed, an alias of an outside crate's module still names nothing in the tree, two globs supplying one name still decide nothing, and whether an item is `pub` is still not read.

Measured with `--pin-census` against the re-export change it builds on: axum bound 4 144 → 4 157 and declined 1 577 → 1 564 of 13 348 calls (29 rows changed, 13 newly bound and 16 name-only rows now proven with the same target, all 29 opened at the call: correct); nushell and zed byte-identical. `--callers` of axum's `TestClient::get` has 66 declined sites where it had 79. New arm (RM) in `test/receiverevidencecheck.sh`.
3 changes: 3 additions & 0 deletions changelog.d/rust-self-chain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Fixed — Rust builder chains resolve each hop through the callee's declared `-> Self` / return type

A Rust method call whose receiver is another call (`Router::new().route(..).layer(..)`, `T::try_new()?.f()`, `x.build().unwrap().run()`, `fetch().await.report()`) used to decline or bind by name, because only a `let` binding of a call result was typed. Each hop is now typed by walking the chain from its root (a `T::f()` path call, or a typed local, field or `self`) through the ONE declared return type of each callee: a written `Self` is the impl's own type, `?` must match the `Result`/`Option` layers it strips, `.unwrap()`/`.expect()` strip one layer, and `.await` needs an `async fn` or an in-tree `impl IntoFuture` / `impl Future` with one `type Output`. `impl Trait`, `Box<dyn Trait>`, a trait object's `Self`, and a hop whose receiver is still split across same-named methods stay declined. On axum, `--callers` on `Router::route` went from 17 callers (505 declined) to 273 (110 declined), and the repo's declined calls fell from 1598 to 912. Gate arms: `callresult/rust7` in `test/receiverevidencecheck.sh`.
Loading
Loading