summaryrefslogtreecommitdiffstats
path: root/tools/test-surface-reasons.json
diff options
context:
space:
mode:
authoraur-build <aur-build@localhost>2026-11-20 23:53:49 +0000
committeraur-build <aur-build@localhost>2026-11-20 23:53:49 +0000
commit28023ba17adbe6fc096a31d5e2c62d017a88fc4c (patch)
tree53b948169a47c012126466142aec80450eb07f9d /tools/test-surface-reasons.json
parent66814ddb86009de7a519f167db634dab3e924fa8 (diff)
downloadaur-build-28023ba17adbe6fc096a31d5e2c62d017a88fc4c.tar.gz
aur-build-28023ba17adbe6fc096a31d5e2c62d017a88fc4c.zip
tools: the detector learns to see through a private inner module
`aliased_behind_private_module` reports an item as not release-exposed only when both halves of the pattern hold: a `pub use ..::NAME;` whose attribute block carries the test-support gate, and every `pub` declaration of the name sitting inside a module that is itself private. Either half alone is not enough — a gated alias to a genuinely public type says nothing, and a `pub` type in a public module is reachable whatever the alias says. The census still counts the inner `pub` as a public declaration, which is the honest reading of the text and the reason this needed a second check rather than a change to the first. New `narrowed` disposition, distinct from `already-gated`: production *does* use these items, just never from outside their module. `residue` and `ungated` are now 0 and the ratchet records it. Every one of the 46 items carries a hand-written reason naming its production caller or explaining why it has none.
Diffstat (limited to 'tools/test-surface-reasons.json')
-rw-r--r--tools/test-surface-reasons.json6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/test-surface-reasons.json b/tools/test-surface-reasons.json
index b85eeff..8e4d320 100644
--- a/tools/test-surface-reasons.json
+++ b/tools/test-surface-reasons.json
@@ -1,14 +1,18 @@
{
"config.TestHooks": "the `hooks` field is already gated; the type and its impl are not, so they compile into a release build that can never read them.",
+ "config.cookie": "reading a session cookie off a request is plumbing inside `http`; the auth tests need it in order to forge one. Nothing outside `http` asks for a cookie by name.",
+ "config.login": "the router dispatches to it. The login tests drive a live listener over TCP, so they cannot move into the module that owns the handler.",
"config.shared_workspace": "`Config::validate` calls it at config.rs:226; tests/kata.rs and tests/remote_agent.rs call it too and both need a fixture.",
"config.store_dir": "the content-addressed store layout is resolved by this module for the cache and blob paths; tests/invariants.rs pins where a blob lands and needs a fixture.",
"db.MIGRATIONS": "`db::migrate` iterates it to apply pending migrations; tests/db.rs asserts the list is ordered and complete.",
"db.ReleaseState": "a row type named by twenty sites inside db; tests/pipeline.rs names it while driving a real pipeline.",
+ "db.Writer::shutdown": "the writer's shutdown is driven by `Drop` in production; only tests/writer.rs calls it explicitly to observe the drain.",
"db.cas_accepted_release": "production performs this CAS inside a transaction via `cas_accepted_release_in` (publish.rs:208); the standalone form has no caller in the crate. The census credited it with a production caller at the `pub use` continuation line in db/mod.rs \u2014 a re-export is not a call.",
"db.claim": "production leases with `claim_batch`; `claim` is called only by tests, so the release build need not compile it.",
"db.set_setting": "a settings writer with no production caller; `setting`/`setting_i64` readers are used, the setter is not.",
"db.shutdown": "`Writer::shutdown` is never called by the server; tests use it to quiesce the writer thread.",
"db.snapshot_by_commit": "a snapshot lookup nothing in production performs.",
+ "db.steps.touch": "deleted: nothing called it once the step-touching call sites were consolidated.",
"db.touch": "census false positive: `touch` appears in tests/shims.rs only inside a string literal. Narrow on its merits, not for the test tier.",
"db.tx_for_tests": "already gated behind test-support \u2014 the pattern the rest of this table asks for.",
"db.unapproved_index_entries": "an invariant query nothing runs; it needs `pub(crate)` diff internals to be useful, so it is gated rather than relocated.",
@@ -37,6 +41,7 @@
"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.",
+ "sandbox.KataBackend::reclaim": "deleted: nothing called it; reclamation goes through the TTL sweep.",
"sandbox.LocalAgentProvisioner": "production selects `K8sSandboxProvisioner` (kata.rs:193); nothing in the crate constructs this type. It exists so tests can drive the real agent protocol against the shim binary without a cluster, so it is gated rather than deleted. The census credited its own `impl` headers as callers.",
"sandbox.LoopbackBackend": "the default backend; tests/failure_modes.rs constructs it to inject a fault.",
"sandbox.ProvisionRequest": "kata provisioning internals; the test that names them needs no fixture.",
@@ -53,6 +58,7 @@
"shims.invocations": "the shim appends to invocations.jsonl in production but nothing reads it back; the two credited sites name the *filename* in a string, and the only reader, `called_with`, is itself gated. Gated with it.",
"shims.manifest": "the shim manifest, read by `run` at mod.rs:161; seven test files read it to assert what a build did.",
"shims.valid_db_arg": "the shim's `--db` argument validator; production calls it at mod.rs:510, tests check its verdicts.",
+ "time.pin": "pins the clock so a test can advance it deterministically; production never pins.",
"time.unpin": "the clock escape hatch; `pin`/`unpin` exist so a test can freeze time. Its only in-module mention is a unit test.",
"time.virtual_sleep": "already gated behind test-support.",
"time.virtualize": "already gated behind test-support.",