You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
aft_callgraph includeTests:false still lists Rust callers in an inline #[cfg(test)] module #973
With includeTests: false, aft_callgraph still lists callers that are Rust unit tests in an inline #[cfg(test)] mod tests { … }. The filter checks only the file path. Rust unit tests are usually in the same file as the code, so for a Rust crate includeTests: false does not hide most tests. The parameter description says "Defaults to false; tests are hidden."
Reproduction
Checked on main at 8876c44, with the binary built from that commit and isolated storage.
Cargo.toml with [package] name = "fx", and src/lib.rs:
With includeTests: false, the expected result is no callers, or a note that test callers in production files are not filtered.
Cause
crates/aft/src/commands/callgraph_store_adapter.rs filters with is_test_file(path) only (:117, :438, :442, :522, :574). is_test_file (crates/aft/src/inspect/job.rs:936) classifies the file name and directory, not the item. A #[cfg(test)] module or a #[test] function in a production file is not detected.
Question
Which behaviour is intended?
includeTests applies to items too. It hides callers in a #[cfg(test)] module or with a #[test] attribute. Other languages with inline tests can get the same rule.
includeTests applies only to test files: change the description from "tests are hidden" to "test files are hidden", and tell the agent that inline test callers stay in the result.
Option 1 matches what an agent expects from the current description.
Thanks. This is fixed on main in #1015 with option 1, and will ship in the next release. With includeTests: false, Rust callers inside a #[cfg(test)] module or marked #[test] are hidden, even in production files. When AFT can't tell whether a caller is a test, the result says so instead of hiding it.
Released in v0.63.4. With includeTests: false, aft_callgraph now leaves out callers inside Rust inline test modules (#[cfg(test)]), not only callers in test files. Thanks for the report.
Activity
aft-alfonso commentedon Oct 28, 2026
Thanks. This is fixed on main in #1015 with option 1, and will ship in the next release. With
includeTests: false, Rust callers inside a#[cfg(test)]module or marked#[test]are hidden, even in production files. When AFT can't tell whether a caller is a test, the result says so instead of hiding it.mason: add real callgraph regression fixtures (cortexkit#937, cortexk…
mason: distinguish callback dependencies and constructor calls (corte…
mason: apply approved callgraph reply wording (cortexkit#937, cortexk…
Merge pull request cortexkit#1015 from cortexkit/land/callgraph-937-973
aft-alfonso commentedon Oct 30, 2026
Released in v0.63.4. With
includeTests: false,aft_callgraphnow leaves out callers inside Rust inline test modules (#[cfg(test)]), not only callers in test files. Thanks for the report.