From 053dfbca8a4955a616e9b2c0f5a5d664c0db7aef Mon Sep 17 00:00:00 2001 From: aur-build Date: Sun, 22 Nov 2026 10:51:45 +0000 Subject: src,tests: retire the census commentary from the source A gated item used to carry its own defence: why it is `pub` only under `test-support`, which census once mistook a filename for a caller, why a wrapper is compiled out rather than deleted. The budget file already holds those claims and the ratchet already checks them, so the source keeps the one line that says what the item is. The module headers stop narrating the refactor that produced them. What survives is the wire protocol, the git pipe, the poisoned lock that must be recovered rather than unwedged. --- src/sandbox/remote.rs | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) (limited to 'src/sandbox/remote.rs') diff --git a/src/sandbox/remote.rs b/src/sandbox/remote.rs index f881eb0..08474d4 100644 --- a/src/sandbox/remote.rs +++ b/src/sandbox/remote.rs @@ -9,14 +9,10 @@ use crate::error::{Error, Result}; use crate::sandbox::wire::{self, Frame}; use crate::sandbox::{Exit, Sandbox, SandboxBackend, SandboxInfo, SandboxSpec}; -/// The real definition. The module is private, so this `pub` -/// is not a nameable path from outside; the alias below is the -/// only way to reach it, and the alias is what carries the -/// feature-conditional visibility. +/// The real definition; the alias below carries the visibility. mod remote_backend { use super::{Config, Receiver}; - // `pub` fields inside a private module are not nameable from - // outside; they stay readable by the impls below. + // `pub` inside a private module is still unreadable from outside it. pub struct RemoteBackend { pub cfg: Config, @@ -26,11 +22,7 @@ mod remote_backend { } } -/// The remote backend, built by `backend_for`. A fixture test builds one to drive the agent protocol. -/// -/// `pub` only under `test-support`. Production reaches the type -/// through its own module and never names it from outside; the -/// outside reader that needs the name is a test. +/// The remote backend, built by `backend_for`. #[cfg(feature = "test-support")] pub use remote_backend::RemoteBackend; @@ -43,16 +35,8 @@ impl RemoteBackend { Ok(Self { cfg: cfg.clone(), token: token.to_string(), addr: bound.local, queue: bound.rx }) } - /// The address the rendezvous listener actually bound to. - /// - /// Test-tier only. Production binds through `bound_listener` and hands the - /// address to the agent itself, so nothing in the crate asks for it back; - /// `tests/remote_agent.rs` needs it to point a real agent at the socket. - /// It is gated rather than left public because the census believed it had - /// production callers at two `listener.local_addr()` calls — std's method - /// on a `TcpListener`, in sibling files, which a name match cannot tell - /// apart from this one. That confusion is what `dotted_only` confirmation - /// in `tools/test-surface.py` now forces a human to resolve. + /// The address the rendezvous listener actually bound to, so a test can + /// point a real agent at the socket. #[cfg(feature = "test-support")] pub fn local_addr(&self) -> &str { &self.addr -- cgit v1.2.3