Skip to content
Closed
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
10 changes: 10 additions & 0 deletions crates/aft/src/callgraph_store/dead_code_projection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,16 @@ fn outbound_calls_from_store(

fn entry_points_for_files(project_root: &Path, files: &[PathBuf]) -> BTreeSet<PathBuf> {
let resolved_entry_points = crate::inspect::resolve_entry_points(project_root);
// CI probe instrumentation (probe branch only): name every path spelling
// feeding the membership decision so the Windows-only miss is attributable.
eprintln!("PROBE projection root = {}", project_root.display());
for file in files {
eprintln!(
"PROBE file = {} | is_entry_point = {}",
file.display(),
resolved_entry_points.is_entry_point(file)
);
}
files
.iter()
.filter(|file| resolved_entry_points.is_entry_point(file))
Expand Down
15 changes: 14 additions & 1 deletion crates/aft/src/inspect/entry_points.rs
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,20 @@ fn insert_resolved_entry_point(

fn contains_path(paths: &BTreeSet<PathBuf>, file: &Path) -> bool {
let snapshot = snapshot_path(file);
paths.contains(&snapshot) || paths.contains(&normalize_path(file))
let hit = paths.contains(&snapshot) || paths.contains(&normalize_path(file));
if !hit {
// CI probe instrumentation (probe branch only).
eprintln!("PROBE contains_path MISS for {}", file.display());
eprintln!("PROBE snapshot form = {}", snapshot.display());
eprintln!(
"PROBE normalize form = {}",
normalize_path(file).display()
);
for p in paths.iter() {
eprintln!("PROBE set entry = {}", p.display());
}
}
hit
}

fn snapshot_path(path: &Path) -> PathBuf {
Expand Down
20 changes: 20 additions & 0 deletions crates/aft/src/inspect/scanners/dead_code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,26 @@ fn materialize_dead_code_contributions(
group_outbound_calls_by_caller_file(project_root, &snapshot.outbound_calls);
let oxc_by_file = oxc_verdicts_by_file(project_root, snapshot, &parsed, public_api_files);

// CI probe instrumentation (probe branch only): dump the verdict inputs
// for the Cargo-bin liveness decision.
eprintln!("PROBE2 verdict project_root = {}", project_root.display());
for f in &liveness_root_files {
eprintln!("PROBE2 liveness_root_rel = {f}");
}
for (f, exports) in &executable_root_exports_by_file {
eprintln!("PROBE2 exec_root_rel = {f} exports = {exports:?}");
}
for (key, calls) in &outbound_calls_by_caller_file {
for call in calls.iter().take(4) {
eprintln!(
"PROBE2 outbound key = {} | caller_file = {} | target = {}",
key.display(),
call.caller_file.display(),
call.target
);
}
}

parsed
.into_iter()
.map(|mut contribution| {
Expand Down
Loading