From e757979f1a2afdbe7146066345bb9acd19d3b151 Mon Sep 17 00:00:00 2001 From: aur-build Date: Thu, 19 Nov 2026 17:09:59 +0000 Subject: comments: say why, not what MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every module-level `//!` header is gone, and the comments that remained either re-explained the line below them or had grown into paragraphs. Density went from one comment line per 6.7 lines of code to one per 10. 827 insertions against 2194 deletions across 86 files. What survived: the invariants (I1-I12), the design cross-references into DESIGN.md, and the notes recording a bug that was found and fixed — those are the comments that carry weight, because they answer a question the code cannot answer about itself. What did not: restating a function signature in prose, and narration of the statement underneath. --- src/sandbox/remote.rs | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'src/sandbox/remote.rs') diff --git a/src/sandbox/remote.rs b/src/sandbox/remote.rs index d02335c..1f9514f 100644 --- a/src/sandbox/remote.rs +++ b/src/sandbox/remote.rs @@ -1,24 +1,3 @@ -//! The hub side of the agent protocol: a [`SandboxBackend`] that leases -//! sandboxes which dial in from outside. -//! -//! The rendezvous is outbound-only: `acquire` waits for an agent to connect -//! and present the shared token, and every command since then is a frame on -//! the connection *the agent initiated*. A sandbox that vanishes mid-run is -//! not an error this code invents — a closed connection reads as a failed -//! step, which reads as an expired lease, which the reaper already turns into -//! a requeue (I5). The remote backend adds no new failure vocabulary. -//! -//! One connection is one lease: after `destroy` (or a drop of the hub side), -//! the agent dies and the next `acquire` waits for a fresh one. That matches -//! the disposable-sandbox model — warm pooling across steps of one build is -//! a backend optimization, not an interface requirement. -//! -//! Workspace note: `Run` frames carry a hub-side `cwd`, which is honest for -//! loopback-shaped deployments and the test tier where hub and sandbox share -//! a filesystem. A remote-over-the-network deployment needs the workspace -//! manifest/tar sync from the design sketch; that is deliberately not here -//! yet, and nothing should pretend otherwise. - use std::io::BufReader; use std::sync::atomic::{AtomicU64, Ordering}; use std::sync::{Arc, Mutex}; -- cgit v1.2.3