summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordev <dev@example.com>2026-11-21 19:29:41 +0000
committerdev <dev@example.com>2026-11-21 19:29:41 +0000
commitbb1d533515c8f63faacb00b3ef59232cf2d4a1c5 (patch)
tree94da9ecc261f28f12ac6e74b29b27f3aef4b1e77
parent0f18ebddc1c138c531e3e331786c7fa917d9186f (diff)
downloadaur-build-bb1d533515c8f63faacb00b3ef59232cf2d4a1c5.tar.gz
aur-build-bb1d533515c8f63faacb00b3ef59232cf2d4a1c5.zip
pipeline,sandbox,shims: thirty-two more markers the compiler was willing to take
The whole `shims` module is behind `test-support`, so its thirteen `pub(crate)` items were invisible to a release build already — but `pub(crate)` still made each of them part of the crate's interface to every other module, and none of them had a reader outside the file that declares it. `manifest`, `record`, `split_version`, `valid_db_arg`, `DB_SUFFIXES` and the nine tool entry points are now private to `src/shims/mod.rs`, which is where the shim binaries reach them through the module's own `pub` surface. `pipeline` went 16 -> 4 and `sandbox` 16 -> 9. Two refusals are worth the sentence: `SourceIdentity` is the type of the `pub(crate)` field `Ctx::src`, and a field may not be more reachable than its type, so making it private is the `private_interfaces` warning rather than a legal narrowing. `provision_request` is declared inside the private `kata_backend` module and called from the sibling `#[cfg(test)] mod tests`, and privacy does not cross to a sibling — E0624. Both are argued in `over_visibility.allowlist` now instead of sitting unexplained. `LOW` in `review` is the same sibling case one level up: it lives in the `pub mod level` nested in risk.rs and the scorer in the parent module reads `level::LOW`, so `pub(crate)` is the narrowest thing that reaches, given that this crate does not admit `pub(super)`. priv 149 -> 117, overwide 21 -> 0 unargued. `cargo check` clean under both profiles with no new warnings; tests/pipeline.rs, remote_agent.rs, kata.rs, approve.rs, shims.rs and world.rs pass (62 tests), and `cargo test --test architecture` is 16 passed.
-rw-r--r--src/pipeline/dispatch.rs6
-rw-r--r--src/pipeline/mod.rs14
-rw-r--r--src/pipeline/publish.rs2
-rw-r--r--src/pipeline/steps.rs2
-rw-r--r--src/sandbox/kata.rs6
-rw-r--r--src/sandbox/loopback.rs2
-rw-r--r--src/sandbox/mod.rs4
-rw-r--r--src/sandbox/wire.rs2
-rw-r--r--src/shims/mod.rs26
-rw-r--r--tests/architecture-budget.json26
-rw-r--r--tools/test-surface.md20
11 files changed, 55 insertions, 55 deletions
diff --git a/src/pipeline/dispatch.rs b/src/pipeline/dispatch.rs
index 35fe646..8e35f0a 100644
--- a/src/pipeline/dispatch.rs
+++ b/src/pipeline/dispatch.rs
@@ -89,7 +89,7 @@ pub fn dispatch_once(cfg: &Config, db: &Db, tx: &Sender<String>) -> Vec<String>
}
#[cfg(not(feature = "test-support"))]
-pub(crate) fn dispatch_once(cfg: &Config, db: &Db, tx: &Sender<String>) -> Vec<String> {
+fn dispatch_once(cfg: &Config, db: &Db, tx: &Sender<String>) -> Vec<String> {
dispatch_once_impl(cfg, db, tx)
}
@@ -132,7 +132,7 @@ pub fn admissible(cfg: &Config, db: &Db) -> usize {
}
#[cfg(not(feature = "test-support"))]
-pub(crate) fn admissible(cfg: &Config, db: &Db) -> usize {
+fn admissible(cfg: &Config, db: &Db) -> usize {
admissible_impl(cfg, db)
}
@@ -159,7 +159,7 @@ pub fn free_disk_mb(path: &std::path::Path) -> u64 {
}
#[cfg(not(feature = "test-support"))]
-pub(crate) fn free_disk_mb(path: &std::path::Path) -> u64 {
+fn free_disk_mb(path: &std::path::Path) -> u64 {
free_disk_mb_impl(path)
}
diff --git a/src/pipeline/mod.rs b/src/pipeline/mod.rs
index e571d71..3e63a69 100644
--- a/src/pipeline/mod.rs
+++ b/src/pipeline/mod.rs
@@ -25,7 +25,7 @@ pub(crate) struct SourceIdentity {
}
impl SourceIdentity {
- pub(crate) fn from_candidate(c: &CandidateRow, snapshot: &SnapshotRow) -> Self {
+ fn from_candidate(c: &CandidateRow, snapshot: &SnapshotRow) -> Self {
Self {
aur_commit: snapshot.aur_commit.clone(),
recipe_hash: snapshot.recipe_hash.clone(),
@@ -36,7 +36,7 @@ impl SourceIdentity {
pkgrel: c.pkgrel.clone(),
}
}
- pub(crate) fn from_release(r: &ReleaseRow) -> Self {
+ fn from_release(r: &ReleaseRow) -> Self {
Self {
aur_commit: r.aur_commit.clone(),
recipe_hash: r.recipe_hash.clone(),
@@ -53,7 +53,7 @@ impl SourceIdentity {
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
-pub(crate) struct CollectedPkg {
+struct CollectedPkg {
pub name: String,
pub version: String,
pub arch: String,
@@ -69,7 +69,7 @@ pub(crate) struct CollectedPkg {
}
#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
-pub(crate) struct Collect {
+struct Collect {
pub packages: Vec<CollectedPkg>,
}
@@ -154,7 +154,7 @@ impl Ctx {
self.backend.acquire(&spec)
}
- pub(crate) fn log_line(&self, line: &str) {
+ fn log_line(&self, line: &str) {
use std::io::Write;
if let Some(parent) = self.log.parent() {
let _ = std::fs::create_dir_all(parent);
@@ -195,7 +195,7 @@ pub fn run_with(ctx: &Ctx) -> Result<Outcome> {
}
#[cfg(not(feature = "test-support"))]
-pub(crate) fn run_with(ctx: &Ctx) -> Result<Outcome> {
+fn run_with(ctx: &Ctx) -> Result<Outcome> {
run_with_impl(ctx)
}
@@ -299,7 +299,7 @@ pub fn enqueue_manual_rebuild(cfg: &Config, db: &Db, pkgbase: &str) -> Result<St
Ok(id)
}
-pub(crate) enum StepResult {
+enum StepResult {
Done(Option<String>),
Skipped(String),
Blocked(Vec<String>),
diff --git a/src/pipeline/publish.rs b/src/pipeline/publish.rs
index 332e673..d22b833 100644
--- a/src/pipeline/publish.rs
+++ b/src/pipeline/publish.rs
@@ -232,7 +232,7 @@ fn commit_release(ctx: &Ctx, collect: &Collect) -> Result<i64> {
})
}
-pub(crate) fn sweep_render_dirs(arch_dir: &Path) {
+fn sweep_render_dirs(arch_dir: &Path) {
let Ok(entries) = std::fs::read_dir(arch_dir) else {
return;
};
diff --git a/src/pipeline/steps.rs b/src/pipeline/steps.rs
index ebb50c5..775485d 100644
--- a/src/pipeline/steps.rs
+++ b/src/pipeline/steps.rs
@@ -454,7 +454,7 @@ fn publish(ctx: &Ctx) -> Result<StepResult> {
use std::path::PathBuf;
-pub(crate) fn recipe_at(dir: &Path) -> Result<Recipe> {
+fn recipe_at(dir: &Path) -> Result<Recipe> {
let mut files = std::collections::BTreeMap::new();
for entry in walkdir::WalkDir::new(dir).max_depth(2).into_iter().filter_map(|e| e.ok()) {
let p = entry.path();
diff --git a/src/sandbox/kata.rs b/src/sandbox/kata.rs
index a54110a..cfc3bd6 100644
--- a/src/sandbox/kata.rs
+++ b/src/sandbox/kata.rs
@@ -40,7 +40,7 @@ pub trait Provisioner: Send + Sync {
/// TTL even if the hub dies. The token rides in args for v1; a production
/// deployment should mount it from a Secret, and this comment is the honest
/// place that says so.
-pub(crate) fn sandbox_cr(req: &ProvisionRequest) -> serde_json::Value {
+fn sandbox_cr(req: &ProvisionRequest) -> serde_json::Value {
serde_json::json!({
"apiVersion": "agents.x-k8s.io/v1alpha1",
"kind": "Sandbox",
@@ -75,7 +75,7 @@ pub(crate) fn sandbox_cr(req: &ProvisionRequest) -> serde_json::Value {
}
impl K8sSandboxProvisioner {
- pub(crate) fn for_config(cfg: &Config) -> Option<Self> {
+ fn for_config(cfg: &Config) -> Option<Self> {
match &cfg.sandbox {
crate::config::Sandbox::AgentSandbox { api, namespace, bearer, .. } => Some(Self {
api: api.clone(),
@@ -87,7 +87,7 @@ impl K8sSandboxProvisioner {
}
}
-pub(crate) struct K8sSandboxProvisioner {
+struct K8sSandboxProvisioner {
pub api: String,
pub bearer: String,
pub namespace: String,
diff --git a/src/sandbox/loopback.rs b/src/sandbox/loopback.rs
index fb5ba00..64875c6 100644
--- a/src/sandbox/loopback.rs
+++ b/src/sandbox/loopback.rs
@@ -57,7 +57,7 @@ impl SandboxBackend for LoopbackBackend {
}
}
-pub(crate) struct LoopbackSandbox {
+struct LoopbackSandbox {
id: String,
blobs: PathBuf,
cfg: Config,
diff --git a/src/sandbox/mod.rs b/src/sandbox/mod.rs
index b82647b..bb6ab60 100644
--- a/src/sandbox/mod.rs
+++ b/src/sandbox/mod.rs
@@ -123,12 +123,12 @@ pub fn backend_for(cfg: &Config) -> Result<Arc<dyn SandboxBackend>> {
}
#[derive(Clone)]
-pub(crate) struct Bound {
+struct Bound {
pub local: String,
pub rx: Receiver<TcpStream>,
}
-pub(crate) fn bound_listener(addr: &str, token: &str) -> Result<Bound> {
+fn bound_listener(addr: &str, token: &str) -> Result<Bound> {
static REGISTRY: OnceLock<Mutex<HashMap<(String, String), Bound>>> = OnceLock::new();
let registry = REGISTRY.get_or_init(|| Mutex::new(HashMap::new()));
let key = (addr.to_string(), token.to_string());
diff --git a/src/sandbox/wire.rs b/src/sandbox/wire.rs
index ae89d6d..4ae1ec0 100644
--- a/src/sandbox/wire.rs
+++ b/src/sandbox/wire.rs
@@ -2,7 +2,7 @@ use std::io::{self, BufRead, Write};
use serde::{Deserialize, Serialize};
-pub(crate) const MAX_FRAME_BYTES: u32 = 2 * 1024 * 1024 * 1024;
+const MAX_FRAME_BYTES: u32 = 2 * 1024 * 1024 * 1024;
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(tag = "t", rename_all = "snake_case")]
diff --git a/src/shims/mod.rs b/src/shims/mod.rs
index 8e6e231..a918515 100644
--- a/src/shims/mod.rs
+++ b/src/shims/mod.rs
@@ -42,7 +42,7 @@ impl Default for FakePackage {
}
impl FakePackage {
- pub(crate) fn split_version(&self) -> (String, String) {
+ fn split_version(&self) -> (String, String) {
match self.version.rsplit_once('-') {
Some((v, r)) => (v.to_string(), r.to_string()),
None => (self.version.clone(), "1".into()),
@@ -98,7 +98,7 @@ pub fn manifest() -> Manifest {
}
#[cfg(not(feature = "test-support"))]
-pub(crate) fn manifest() -> Manifest {
+fn manifest() -> Manifest {
manifest_impl()
}
@@ -113,7 +113,7 @@ fn manifest_impl() -> Manifest {
}
/// Called by `run` to log the invocation; nothing outside `shims` records a shim call.
-pub(crate) fn record(tool: &str, args: &[String]) {
+fn record(tool: &str, args: &[String]) {
let dir = match std::env::var("AUR_SHIM_DIR") {
Ok(d) => d,
Err(_) => return,
@@ -211,7 +211,7 @@ pub fn run(tool: &str) -> i32 {
}
/// Reached only through `run`, which matches the tool name to it. The tool name appears in test strings, which is not a caller.
-pub(crate) fn mkarchroot(args: &[String]) -> Result<i32, String> {
+fn mkarchroot(args: &[String]) -> Result<i32, String> {
let mut target = None;
let mut skip = false;
for a in args {
@@ -235,7 +235,7 @@ pub(crate) fn mkarchroot(args: &[String]) -> Result<i32, String> {
}
/// Reached only through `run`, which matches the tool name to it. The tool name appears in test strings, which is not a caller.
-pub(crate) fn makechrootpkg(args: &[String], m: &Manifest) -> Result<i32, String> {
+fn makechrootpkg(args: &[String], m: &Manifest) -> Result<i32, String> {
if !args.iter().any(|a| a == "-r") {
return Err("makechrootpkg: expected -r <chroot>".into());
}
@@ -243,7 +243,7 @@ pub(crate) fn makechrootpkg(args: &[String], m: &Manifest) -> Result<i32, String
emit_packages(m, "makechrootpkg", wants_sig)
}
-pub(crate) fn emit_packages(m: &Manifest, tool: &str, wants_sig: bool) -> Result<i32, String> {
+fn emit_packages(m: &Manifest, tool: &str, wants_sig: bool) -> Result<i32, String> {
for l in &m.log_lines {
println!("{l}");
}
@@ -323,7 +323,7 @@ fn packages_to_emit(m: &Manifest, startdir: &Path) -> Vec<FakePackage> {
}
}
-pub(crate) fn write_package(dir: &Path, p: &FakePackage, m: &Manifest) -> Result<PathBuf, String> {
+fn write_package(dir: &Path, p: &FakePackage, m: &Manifest) -> Result<PathBuf, String> {
let (pkgver, pkgrel) = p.split_version();
let filename = format!("{}-{}-{}.pkg.tar.zst", p.name, p.version, p.arch);
let path = dir.join(&filename);
@@ -414,7 +414,7 @@ fn fake_sig(bytes: &[u8]) -> Vec<u8> {
}
/// Reached only through `run`, which matches the tool name to it. The tool name appears in test strings, which is not a caller.
-pub(crate) fn makepkg(args: &[String], m: &Manifest) -> Result<i32, String> {
+fn makepkg(args: &[String], m: &Manifest) -> Result<i32, String> {
if args.iter().any(|a| a == "--vercheck" || a == "-V-check") {
let v = m.vercheck.clone().unwrap_or_else(|| "1.0-1".into());
println!("{v}");
@@ -464,7 +464,7 @@ pub(crate) fn makepkg(args: &[String], m: &Manifest) -> Result<i32, String> {
}
/// Reached only through `run`, which matches the tool name to it. The tool name appears in test strings, which is not a caller.
-pub(crate) fn pacman(args: &[String]) -> Result<i32, String> {
+fn pacman(args: &[String]) -> Result<i32, String> {
if args.iter().any(|a| a == "-U") {
for path in args.iter().filter(|a| !a.starts_with('-')) {
let p = std::path::Path::new(path);
@@ -505,7 +505,7 @@ fn installed_db() -> Option<std::path::PathBuf> {
std::env::var("AUR_SHIM_DIR").ok().map(|d| std::path::Path::new(&d).join("installed.txt"))
}
-pub(crate) const DB_SUFFIXES: [&str; 5] = [
+const DB_SUFFIXES: [&str; 5] = [
".db.tar",
".db.tar.gz",
".db.tar.zst",
@@ -523,7 +523,7 @@ pub fn valid_db_arg(p: &Path) -> bool {
}
#[cfg(not(feature = "test-support"))]
-pub(crate) fn valid_db_arg(p: &Path) -> bool {
+fn valid_db_arg(p: &Path) -> bool {
valid_db_arg_impl(p)
}
@@ -538,7 +538,7 @@ fn valid_db_arg_impl(p: &Path) -> bool {
.any(|sfx| name.ends_with(sfx))
}
-pub(crate) fn repo_add(args: &[String], _m: &Manifest) -> Result<i32, String> {
+fn repo_add(args: &[String], _m: &Manifest) -> Result<i32, String> {
let mut positional: Vec<&String> = Vec::new();
let mut skip = false;
for a in args {
@@ -633,7 +633,7 @@ fn pkginfo_fields(pkg_bytes: &[u8]) -> Result<(String, String, String, String),
}
/// Reached only through `run`, which matches the tool name to it. The tool name appears in test strings, which is not a caller.
-pub(crate) fn gpg(args: &[String]) -> Result<i32, String> {
+fn gpg(args: &[String]) -> Result<i32, String> {
let out = args
.iter()
.position(|a| a == "--output" || a == "-o")
diff --git a/tests/architecture-budget.json b/tests/architecture-budget.json
index d600d39..13dbe01 100644
--- a/tests/architecture-budget.json
+++ b/tests/architecture-budget.json
@@ -263,8 +263,8 @@
"largest": 472,
"largest_file": "src/pipeline/steps.rs",
"lines": 1410,
- "overwide": 8,
- "priv": 16,
+ "overwide": 0,
+ "priv": 4,
"pub": 21,
"test": 6
},
@@ -323,8 +323,8 @@
"largest": 507,
"largest_file": "src/sandbox/kata.rs",
"lines": 1408,
- "overwide": 6,
- "priv": 16,
+ "overwide": 0,
+ "priv": 9,
"pub": 21,
"test": 7
},
@@ -335,8 +335,8 @@
"largest": 655,
"largest_file": "src/shims/mod.rs",
"lines": 655,
- "overwide": 7,
- "priv": 13,
+ "overwide": 0,
+ "priv": 0,
"pub": 8,
"test": 4
},
@@ -418,13 +418,13 @@
"lib": 0,
"main": 0,
"ops": 0,
- "pipeline": 8,
+ "pipeline": 0,
"pkginfo": 0,
"pkgver": 0,
"recipe": 0,
"review": 0,
- "sandbox": 6,
- "shims": 7,
+ "sandbox": 0,
+ "shims": 0,
"time": 0,
"urlutil": 0,
"usecase": 0,
@@ -432,9 +432,9 @@
}
},
"test_surface": {
- "already-gated": 22,
+ "already-gated": 28,
"interface": 1,
- "narrowed": 13,
+ "narrowed": 7,
"total": 36
},
"totals": {
@@ -445,8 +445,8 @@
"largest": 699,
"largest_file": "src/config.rs",
"lines": 15671,
- "overwide": 21,
- "priv": 149,
+ "overwide": 0,
+ "priv": 117,
"pub": 448,
"test": 49
}
diff --git a/tools/test-surface.md b/tools/test-surface.md
index 3d69623..5cc9274 100644
--- a/tools/test-surface.md
+++ b/tools/test-surface.md
@@ -70,25 +70,19 @@ reaches the test tier also reaches a release build.
|---|---|---|---|---|---|
| `db` | `Writer` | `src/db/mod.rs:191` | `architecture.rs` | `src/db/audit.rs:10`, `src/db/audit.rs:74`, `src/db/mod.rs:329` +15 | `Db` has a `pub writer: Writer` field and pipeline, ops, review, watch and usecase all call `db.writer.tx(..)`. A field cannot be `pub` with a `pub(crate)` type — the compiler rejects it — so `Writer` is public because the public interface of `Db` requires it, not because a test asked. `tools/release-surface-probe.py` confirms it is reachable in a release build; that reachability is load-bearing, not residue. |
-## Feature-conditional visibility — production uses it, only from inside its module — 13 items
+## Feature-conditional visibility — production uses it, only from inside its module — 7 items
| module | item | declared at | test files | in-module call sites | why |
|---|---|---|---|---|---|
| `db` | `MIGRATIONS` | `src/db/migrations.rs:344` | `db.rs` | `src/db/mod.rs:157` | `db::migrate` iterates it to apply pending migrations; tests/db.rs asserts the list is ordered and complete. |
| `http` | `login` | `src/http/routes/mod.rs:51` | `common/mod.rs`, `http.rs` | `src/http/mod.rs:218` | the login route handler; same — its tests are harness-free and move with it. |
-| `pipeline` | `admissible` | `src/pipeline/dispatch.rs:130` | `dispatch.rs` | `src/pipeline/dispatch.rs:111` | the dispatch filter, called at dispatch.rs:86; tests/dispatch.rs pins which builds it admits. |
-| `pipeline` | `dispatch_once` | `src/pipeline/dispatch.rs:87` | `dispatch.rs` | `src/pipeline/dispatch.rs:71` | one tick of the dispatcher, called by the scheduler loop at dispatch.rs:60; tests/dispatch.rs drives single ticks. |
-| `pipeline` | `free_disk_mb` | `src/pipeline/dispatch.rs:157` | `dispatch.rs` | `src/pipeline/dispatch.rs:145` | the disk probe the dispatcher consults at dispatch.rs:106. |
| `pipeline` | `index_world` | `src/pipeline/publish.rs:26` | `kata.rs` | `src/pipeline/mod.rs:268`, `src/pipeline/mod.rs:291`, `src/pipeline/steps.rs:92` | 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` | `src/pipeline/mod.rs:193` | `failure_modes.rs`, `kata.rs`, `remote_agent.rs` | `src/pipeline/mod.rs:185` | the run entry point with an injected sandbox; production uses `run`, tests inject a fake. |
| `review` | `LOW` | `src/review/risk.rs:13` | `notices.rs` | `src/review/risk.rs:105`, `src/review/risk.rs:200`, `src/review/risk.rs:206` | the risk floor, compared at risk.rs:94,189,195; tests/notices.rs pins where the floor bites. |
-| `shims` | `manifest` | `src/shims/mod.rs:96` | `common/mod.rs`, `invariants.rs`, `pipeline.rs`, `production_surface.rs` … | `src/shims/mod.rs:194` | 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` | `src/shims/mod.rs:521` | `shims.rs` | `src/shims/mod.rs:561` | the shim's `--db` argument validator; production calls it at mod.rs:510, tests check its verdicts. |
| `watch` | `needs_stage_b` | `src/watch/upstream.rs:26` | `vcs.rs` | `src/watch/detect.rs:102` ⚑ | the stage-B predicate, consulted by detect.rs:101. |
| `watch` | `probe` | `src/watch/upstream.rs:45` | `architecture.rs`, `ops.rs`, `vcs.rs` | `src/watch/detect.rs:96` | the upstream probe, called by detect.rs:95; tests/ops.rs and tests/vcs.rs both need a fixture. |
| `watch` | `sync_mirror` | `src/watch/mirror.rs:22` | `detect.rs` | `src/watch/detect.rs:41` | the mirror sync, called by detect.rs:40; tests/detect.rs drives a real sync. |
-## Already gated — 22 items
+## Already gated — 28 items
| module | item | declared at | test files | in-module call sites | why |
|---|---|---|---|---|---|
@@ -106,12 +100,18 @@ reaches the test tier also reaches a release build.
| `ops` | `STAGING_GRACE_SECS` | `src/ops.rs:333` | `ops.rs` | `src/ops.rs:300` | the grace period the staging sweep applies at ops.rs:286; tests/ops.rs pins the value it must be. |
| `ops` | `build_success_rate` | `src/ops.rs:51` | `ops.rs` | `src/ops.rs:101` ⚑ | computed inside the maintenance report at ops.rs:87; tests/ops.rs checks the arithmetic. |
| `ops` | `sweep_staging` | `src/ops.rs:363` | `ops.rs` | `src/ops.rs:300` | called by the maintenance pass at ops.rs:286; tests/ops.rs exercises it directly. |
+| `pipeline` | `admissible` | `src/pipeline/dispatch.rs:130` | `dispatch.rs` | `src/pipeline/dispatch.rs:111` | the dispatch filter, called at dispatch.rs:86; tests/dispatch.rs pins which builds it admits. |
+| `pipeline` | `dispatch_once` | `src/pipeline/dispatch.rs:87` | `dispatch.rs` | `src/pipeline/dispatch.rs:71` | one tick of the dispatcher, called by the scheduler loop at dispatch.rs:60; tests/dispatch.rs drives single ticks. |
+| `pipeline` | `free_disk_mb` | `src/pipeline/dispatch.rs:157` | `dispatch.rs` | `src/pipeline/dispatch.rs:145` | the disk probe the dispatcher consults at dispatch.rs:106. |
+| `pipeline` | `run_with` | `src/pipeline/mod.rs:193` | `failure_modes.rs`, `kata.rs`, `remote_agent.rs` | `src/pipeline/mod.rs:185` | the run entry point with an injected sandbox; production uses `run`, tests inject a fake. |
| `review` | `render_and_store` | `src/review/diff.rs:282` | `approve.rs`, `common/mod.rs`, `crash.rs`, `dispatch.rs` … | — | 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` | `src/review/approve.rs:235` | `architecture.rs`, `pipeline.rs`, `production_surface.rs` | — | 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` | `LocalAgentProvisioner` | `src/sandbox/kata.rs:136` | `kata.rs` | — | 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` | `local_addr` | `src/sandbox/remote.rs:57` | `architecture.rs`, `remote_agent.rs` | `src/sandbox/kata.rs:240`, `src/sandbox/mod.rs:142` ⚑ | DELETED from kata.rs and gated on remote.rs. `KataBackend::local_addr` had zero callers anywhere and is gone; `RemoteBackend::local_addr` is called only by tests/remote_agent.rs, so it is gated. Both were credited with production callers at `listener.local_addr()`, which is std's method on a TcpListener in a sibling file — the census treats all of src/sandbox as one module and a name match cannot tell a receiver's type. This row is why `dotted_only` confirmation exists. |
| `shims` | `called_with` | `src/shims/mod.rs:177` | `crash.rs`, `dispatch.rs`, `invariants.rs`, `kata.rs` … | — | reads the shim's invocation log, which only tests inspect. |
| `shims` | `invocations` | `src/shims/mod.rs:159` | `shims.rs` | — | 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` | `src/shims/mod.rs:96` | `common/mod.rs`, `invariants.rs`, `pipeline.rs`, `production_surface.rs` … | `src/shims/mod.rs:194` | 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` | `src/shims/mod.rs:521` | `shims.rs` | `src/shims/mod.rs:561` | the shim's `--db` argument validator; production calls it at mod.rs:510, tests check its verdicts. |
| `time` | `unpin` | `src/time.rs:57` | `time.rs` | — | the clock escape hatch; `pin`/`unpin` exist so a test can freeze time. Its only in-module mention is a unit test. |
| `time` | `virtualize` | `src/time.rs:129` | `crash.rs`, `dispatch.rs`, `production_surface.rs` | — | already gated behind test-support. |
@@ -120,8 +120,8 @@ reaches the test tier also reaches a release build.
| disposition | count |
|---|---|
| `interface` | 1 |
-| `narrowed` | 13 |
-| `already-gated` | 22 |
+| `narrowed` | 7 |
+| `already-gated` | 28 |
| **total** | **36** |
Of these, 1 are ungated today. Gating the `gate` rows and narrowing the