Skip to content

Count a Rust function passed by path as used by the file that passes it - #40

Merged
tauanbinato merged 1 commit into
mainfrom
rust-passed-callers
Sep 27, 2026
Merged

tauanbinato merged 1 commit into
mainfrom
rust-passed-callers

Conversation

@tauanbinato

Copy link
Copy Markdown
Contributor

A file's outline tells Jev which other files use each member (used_by). Before this, JevGate counted only calls. A Rust function passed by path was invisible: compose::unconfirmed_units in follow_ups(plan, files, compose::unconfirmed_units) is not a call. So JevGate's own compose.rs listed follow_ups.rs as the user of only 3 of the 8 follow-up selectors, which was the evidence a blind labeler used to call it a review-level split.

The change.

  • While reading a Rust function, JevGate records the functions it names by path where the path is a value, not the callee of a call: compose::unconfirmed_units, Self::helper, module::f.
  • The name must start in lower case, because Rust names types, variants and constants in upper case (Outcome::Clear, catalog::FILE_ORGANIZATION). Paths inside use or inside a longer path don't count.
  • They go into a new Unit::passed. Only the callers map reads it, so the member calls sent in outlines, the callees sent in rechecks and the security traces don't change.
  • Other languages are unchanged: passed stays empty outside .rs files.
  • FILE_ORGANIZATION rule version is now 23.

Measured:

  • JevGate before the splits (0.23.1's tree): compose.rs now lists all 8 selectors as used by follow_ups.rs. Its first split answer moved from 0.75 to 0.80 on middle plus top, so the outline is a consider, where 0.24.0 cleared it through the kind of file. The group it names is still the large mixed one, so the location is weak.
  • Corpus, the 26 Rust projects, under one pinned calibration against 0.24.0: 37 outline requests were asked again (about $0.008).
    • own-fenrok-online's studio/src/server/convert.rs: review became a consider. It was labeled wrong as a review: one job, laid out in sections.
    • zoxide's src/util.rs: consider became a review. It was labeled right: a grab bag of helpers.
    • One unit each in own-spacevox and own-voltforge became undecided.
    • Nothing else changed.

Tests:

  • The parser records unconfirmed_units and Self::name_of but not a call, a variant, or anything in a Python file.
  • An outline names the file that passes selectors::warm0 as its user. This test fails without the change.

Clippy (also 1.98) and cargo +1.90.0 check --locked pass. The self-check with the default gate exits 0, with no review or consider.

Next: sending each candidate part's users with its part question (0.24.0's follow-up). "Used only by follow_ups.rs" is the kind of evidence that separates a part to move.

@tauanbinato
tauanbinato merged commit e4adb28 into main Sep 27, 2026
9 checks passed
@tauanbinato
tauanbinato deleted the rust-passed-callers branch September 27, 2026 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant