summaryrefslogtreecommitdiffstats
path: root/tools/test-surface-reasons.json
diff options
context:
space:
mode:
authoraur-build <aur-build@localhost>2026-11-21 09:38:33 +0000
committeraur-build <aur-build@localhost>2026-11-21 09:38:33 +0000
commitd3da3a1882999a80db34089153f9684fd8d7bbee (patch)
tree704d35539e96fc3a92fd89ed560870fef5816d2c /tools/test-surface-reasons.json
parentae492c87ff66b9f2c8fec25a5ca917c438bf5858 (diff)
downloadaur-build-d3da3a1882999a80db34089153f9684fd8d7bbee.tar.gz
aur-build-d3da3a1882999a80db34089153f9684fd8d7bbee.zip
tools: key items by (module, name), and prove the surface by compiling
The auditor's two counterexamples were both detector bugs, and they were the same class of bug as the ones before: the instrument was reading the source in a way that flattered the number. - Rows are keyed by `(module, name)`. Keyed by bare name, `pipeline::dispatch::Pool::shutdown` merged into the `db::Writer::shutdown` row, which is gated, so an ungated item was reported `already-gated`. - The production-mention index is built from lines with comments and string literals removed. Searching raw text made `review::approve::withdraw` look production-used because the *string* "withdraw" appears in an HTTP route pattern and an audit action; every real caller named `withdraw_package` or `withdraw_release_in`, which are different items. - A `pub` declaration inside a private module is not a public declaration. Without that, the inner-module narrowing made the detector report an `http::new` nobody could name. - For a name declared in several modules — `new`, `open`, `record`, `parse` — a bare mention elsewhere cannot be resolved, so the row is kept and flagged `ambiguous` rather than silently dropped, and `tools/test-surface-ambiguous.json` holds the human verdict. An ambiguous row with no verdict fails the architecture test; "the tool could not tell" is not a disposition. - The count rule was duplicated between `--json` and `--write-budget` and the two drifted the moment a rule was added to one. `tally()` is now the one place. `tools/release-surface-probe.py` replaces inference with compilation for the final claim. It writes a throwaway crate depending on `aur-build` twice, with and without `test-support`, and tries to name every dispositioned item from outside. A path that compiles with the feature proves the path is real; every such path must fail without it. Current result: 28 real external paths, 27 closed in a release build, and the one that stays open is `db::Writer`, which is public because `Db` has a `pub writer: Writer` field and Rust will not type a public field with a private type. That is recorded as `interface` in `tools/test-surface-interface.json` — a disposition that admits reachability and names the signature that forces it — and the probe fails if the file claims an item that is not in fact reachable, so it cannot quietly rot. The tool's own docstring and the generated table claimed "Rust has no test-conditional visibility". That was false and is gone, replaced with the two shapes that do it.
Diffstat (limited to 'tools/test-surface-reasons.json')
-rw-r--r--tools/test-surface-reasons.json2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/test-surface-reasons.json b/tools/test-surface-reasons.json
index 8e4d320..f4d40dd 100644
--- a/tools/test-surface-reasons.json
+++ b/tools/test-surface-reasons.json
@@ -35,9 +35,11 @@
"pipeline.free_disk_mb": "the disk probe the dispatcher consults at dispatch.rs:106.",
"pipeline.index_world": "the world-index step, used by the pipeline at mod.rs:255 and steps.rs:92; tests/kata.rs checks what landed in the index.",
"pipeline.run_with": "the run entry point with an injected sandbox; production uses `run`, tests inject a fake.",
+ "pipeline.shutdown": "`Pool::shutdown` stops and joins the dispatcher threads. Production runs the pool until the process exits and never asks it to stop; tests/dispatch.rs and tests/crash.rs need the join so they can assert on the pool's effects after it is gone. Gated, not narrowed: no production build should carry a stop path nothing invokes.",
"review.BulkRefusal": "the bulk-refusal payload, built and matched across approve.rs; tests/approve.rs asserts on it.",
"review.LOW": "the risk floor, compared at risk.rs:94,189,195; tests/notices.rs pins where the floor bites.",
"review.render_and_store": "intake renders through `review::intake::record`; this wrapper has zero callers in src and 17 in tests. Gated, not relocated: it needs the module-private diff renderer.",
+ "review.withdraw": "Single-release withdraw. The CLI and the web UI both go through `usecase::withdraw_package` -> `pipeline::publish::withdraw_package`; nothing invokes this. tests/pipeline.rs pins its invariants (a second withdraw is refused, an unknown release is refused), so it is gated rather than deleted: the test is the cover for the operation production has not grown yet.",
"sandbox.Exit": "the sandbox exit record, named across the backends; tests/failure_modes.rs asserts on it.",
"sandbox.K8sSandboxProvisioner": "the kata provisioner impl; tests/kata.rs drives it directly.",
"sandbox.KataBackend": "selected by `backend_for` when the config names an agent-sandbox backend; tests/kata.rs drives it directly.",