diff options
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/test-surface.md | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tools/test-surface.md b/tools/test-surface.md index 4535104..16f931f 100644 --- a/tools/test-surface.md +++ b/tools/test-surface.md @@ -70,18 +70,13 @@ 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 — 19 items +## Feature-conditional visibility — production uses it, only from inside its module — 14 items | module | item | declared at | test files | in-module call sites | why | |---|---|---|---|---|---| -| `config` | `shared_workspace` | `src/config.rs:98` | `config.rs`, `kata.rs`, `remote_agent.rs` | `src/config.rs:19`, `src/config.rs:30`, `src/config.rs:40` +8 | `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` | `src/config.rs:374` | `architecture.rs`, `invariants.rs` | `src/config.rs:331`, `src/config.rs:387` ⚑ | 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` | `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` | `cookie` | `src/http/mod.rs:42` | `common/mod.rs`, `http.rs` | `src/http/mod.rs:224`, `src/http/routes/mod.rs:38`, `src/http/routes/mod.rs:64` +2 ⚑ | the auth cookie helper; the tests that use it build no fixture, so they move into the module and it narrows. | | `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. | -| `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. | @@ -94,11 +89,13 @@ reaches the test tier also reaches a release build. | `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 — 16 items +## Already gated — 21 items | module | item | declared at | test files | in-module call sites | why | |---|---|---|---|---|---| | `config` | `TestHooks` | `src/config.rs:155` | `common/mod.rs`, `production_surface.rs` | `src/config.rs:140`, `src/config.rs:195` | 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` | `shared_workspace` | `src/config.rs:98` | `config.rs`, `kata.rs`, `remote_agent.rs` | `src/config.rs:19`, `src/config.rs:30`, `src/config.rs:40` +8 | `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` | `src/config.rs:374` | `architecture.rs`, `invariants.rs` | `src/config.rs:331`, `src/config.rs:387` ⚑ | 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` | `cas_accepted_release` | `src/db/pkgbases.rs:92` | `db.rs` | — | 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 — a re-export is not a call. | | `db` | `claim` | `src/db/builds/mod.rs:134` | `common/mod.rs`, `state_machine.rs`, `time.rs` | — | production leases with `claim_batch`; `claim` is called only by tests, so the release build need not compile it. | | `db` | `set_setting` | `src/db/settings.rs:44` | `db.rs` | — | a settings writer with no production caller; `setting`/`setting_i64` readers are used, the setter is not. | @@ -106,6 +103,9 @@ reaches the test tier also reaches a release build. | `db` | `tx_for_tests` | `src/db/mod.rs:284` | `approve.rs`, `common/mod.rs`, `db.rs`, `invariants.rs` … | — | already gated behind test-support — the pattern the rest of this table asks for. | | `db` | `unapproved_index_entries` | `src/db/invariants.rs:15` | `db.rs`, `detect.rs`, `notices.rs`, `shims.rs` | — | an invariant query nothing runs; it needs `pub(crate)` diff internals to be useful, so it is gated rather than relocated. | | `db` | `world_members` | `src/db/world.rs:32` | `db.rs` | — | a world-snapshot reader nothing calls; `put_world_snapshot` is the half production uses. | +| `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. | | `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. | @@ -120,8 +120,8 @@ reaches the test tier also reaches a release build. | disposition | count | |---|---| | `interface` | 1 | -| `narrowed` | 19 | -| `already-gated` | 16 | +| `narrowed` | 14 | +| `already-gated` | 21 | | **total** | **36** | Of these, 1 are ungated today. Gating the `gate` rows and narrowing the |
