pub fn scan_project(
root: &Path,
fallback_subject: &str,
) -> Result<(Vec<BootstrapTriple>, Vec<ScannedFile>, String)>Expand description
Blocking scanner: walk well-known files under root and extract triples.
Why: Pulled out as a sync function so the file I/O + TOML/JSON parsing
run on a blocking thread (via spawn_blocking) and the algorithm itself
is trivially unit-testable against fixture directories.
What: Returns (triples, per_file_summary, project_subject). The
project subject is derived from the first manifest that yields a name;
falls back to fallback_subject (typically the palace id) when none
match.
Test: scan_project_extracts_cargo_facts,
scan_project_extracts_package_json,
scan_project_falls_back_to_palace_id_when_no_manifest.