|
44 | 44 | "crates/perry-stdlib/src", |
45 | 45 | ) |
46 | 46 |
|
| 47 | +# #7272: `crates/perry-ext-*/src` is first-party runtime code and is scanned |
| 48 | +# too, matching the sibling gate `gc_store_site_inventory.py`, whose |
| 49 | +# `iter_scan_roots()` has globbed these all along. |
| 50 | +# |
| 51 | +# The two audits disagreeing was not academic. #6826 moved the HTTP server out |
| 52 | +# of `perry-stdlib/src/http.rs` into `crates/perry-ext-http/`, and this gate |
| 53 | +# reported the file's 11 handle-floor sites as "found 0 — lower it to 0". They |
| 54 | +# had not been fixed; they had walked out of the gate's field of view, and the |
| 55 | +# ratchet's own bookkeeping invited someone to ratify that as progress. A gate |
| 56 | +# whose coverage shrinks silently when code moves is the shape CLAUDE.md's |
| 57 | +# "four ways a gate can be unable to fail" is about. |
| 58 | +EXT_CRATE_GLOB = "perry-ext-*" |
| 59 | + |
47 | 60 | # The module that owns the band constants/predicates, and the collector |
48 | 61 | # internals that legitimately manipulate GcHeader layout directly. |
49 | 62 | EXCLUDED_PREFIXES = ( |
@@ -215,8 +228,16 @@ def scan_text(rel_path: str, text: str) -> list[Finding]: |
215 | 228 | def collect_inventory() -> tuple[list[Finding], int]: |
216 | 229 | findings: list[Finding] = [] |
217 | 230 | files_scanned = 0 |
218 | | - for root in SCAN_ROOTS: |
219 | | - for path in sorted((REPO_ROOT / root).rglob("*.rs")): |
| 231 | + scan_dirs = [REPO_ROOT / root for root in SCAN_ROOTS] |
| 232 | + scan_dirs.extend( |
| 233 | + src |
| 234 | + for src in ( |
| 235 | + ext / "src" for ext in sorted((REPO_ROOT / "crates").glob(EXT_CRATE_GLOB)) |
| 236 | + ) |
| 237 | + if src.is_dir() |
| 238 | + ) |
| 239 | + for root in scan_dirs: |
| 240 | + for path in sorted(root.rglob("*.rs")): |
220 | 241 | rel_path = path.relative_to(REPO_ROOT).as_posix() |
221 | 242 | # Skip parked/hidden trees (e.g. `.value.parked/`) — not compiled. |
222 | 243 | if any(part.startswith(".") for part in rel_path.split("/")): |
|
0 commit comments