diff options
Diffstat (limited to 'tools/arch-census.md')
| -rw-r--r-- | tools/arch-census.md | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tools/arch-census.md b/tools/arch-census.md index ce0647c..c80c1ea 100644 --- a/tools/arch-census.md +++ b/tools/arch-census.md @@ -199,6 +199,38 @@ more capable. `largest` is reported and not budgeted for exactly that reason — counting lines across a module and its tests measures the wrong thing, and a ceiling on it would discourage moving tests home, which is the whole movement. +### The detector was wrong, and four items were mis-sorted because of it + +The first version of `tools/test-surface.py` decided "production uses this" by +searching the declaring module's files for the name. That credited four items +with callers they do not have, and each false credit was a different mistake: + +| item | what the detector believed | what is actually there | +|---|---|---| +| `db::cas_accepted_release` | a call at `db/mod.rs:55` | a `pub use` continuation line — a re-export is not a call | +| `shims::invocations` | calls at `mod.rs:112`, `:134` | the string `"invocations.jsonl"`, and a call from `called_with`, which is itself gated | +| `sandbox::LocalAgentProvisioner` | three call sites | its own `struct` and `impl` headers | +| `sandbox::local_addr` | `kata.rs:220`, `mod.rs:120` | `listener.local_addr()` — std's method on a `TcpListener`, in sibling files | + +All four are now gated, and `KataBackend::local_addr` — which had no caller in +`src` or in any test — is deleted. The detector now strips string literals and +comments, skips `use` statements including the continuation lines of a +brace-delimited block, skips an item's own `impl` headers, and does not count a +call made inside a `#[cfg(test)]` module or a `test-support`-gated item. + +The last case is the one a regex cannot resolve: `self.store_dir()` and +`listener.local_addr()` are indistinguishable by name match. Rows whose only +evidence is a call in method position are flagged `⚑` in +`tools/test-surface.md`, and `the_test_surface_is_disposed_of` fails until a +human has read the cited line and listed the row in +`tools/test-surface-confirmed.json`. Four rows are confirmed that way; the fifth +was the dead accessor. + +This matters more than the four items. The residue column is the one number this +report cannot eliminate, so the claim underneath it — *every residue item has a +real production caller* — has to be checkable, not asserted. The table now +prints each item's in-module call sites for exactly that reason. + ### What the ratchet now also holds `tests/architecture.rs` gained `the_test_surface_is_disposed_of`, which runs |
