summaryrefslogtreecommitdiffstats
path: root/src/sandbox/agent.rs
diff options
context:
space:
mode:
authoraur-build <aur-build@localhost>2026-11-19 17:09:59 +0000
committeraur-build <aur-build@localhost>2026-11-19 17:09:59 +0000
commite757979f1a2afdbe7146066345bb9acd19d3b151 (patch)
tree30d5f5fbccd25ea7bf01c5202684af463b74e7d3 /src/sandbox/agent.rs
parent94c318f13264bb3c00a9f3057ba2e1aafb57c9e4 (diff)
downloadaur-build-e757979f1a2afdbe7146066345bb9acd19d3b151.tar.gz
aur-build-e757979f1a2afdbe7146066345bb9acd19d3b151.zip
comments: say why, not what
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.
Diffstat (limited to 'src/sandbox/agent.rs')
-rw-r--r--src/sandbox/agent.rs15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/sandbox/agent.rs b/src/sandbox/agent.rs
index 09a6f93..d7b841c 100644
--- a/src/sandbox/agent.rs
+++ b/src/sandbox/agent.rs
@@ -1,18 +1,3 @@
-//! The ephemeral sandbox agent: what runs *inside* the sandbox.
-//!
-//! One connection, one lease, one life: the agent dials the hub (outbound
-//! rendezvous — the hub never needs a route into an untrusted box), accepts
-//! `Run`/`Put`/`Get` frames for as long as the hub keeps the connection alive,
-//! and dies — taking its child processes with it — when the connection drops
-//! or its TTL expires. There is no state between leases by design: the sandbox
-//! is disposable, the TTL is the guarantee, and a leaked sandbox is a bug in
-//! the TTL watchdog, not a lifecycle question.
-//!
-//! The TTL watchdog is the backstop under every failure mode: hub crashes,
-//! network partition, a hub bug that forgets `Destroy`. The hub keeps it fed
-//! with `Ping` frames while a run is in flight; silence longer than the TTL
-//! means nobody is coming, so the agent kills its child and exits.
-
use std::io::BufReader;
use std::net::TcpStream;
use std::path::{Path, PathBuf};