summaryrefslogtreecommitdiffstats
path: root/src/sandbox/wire.rs
diff options
context:
space:
mode:
authoraur-build <aur-build@localhost>2026-11-19 17:33:17 +0000
committeraur-build <aur-build@localhost>2026-11-19 17:33:17 +0000
commit4304b0f336ddba7b4ec6780795059ff2066d105b (patch)
tree10edea744a1c2bf3fc363b4dc7f64abac8b1a0d3 /src/sandbox/wire.rs
parente757979f1a2afdbe7146066345bb9acd19d3b151 (diff)
downloadaur-build-4304b0f336ddba7b4ec6780795059ff2066d105b.tar.gz
aur-build-4304b0f336ddba7b4ec6780795059ff2066d105b.zip
comments: keep only what the code cannot show
Stripped every comment that described what an item does, documented its arguments or fields, or cited the design docs (§n, I-n, m-n, decision n). 2247 comments down to 83. What survives: the section dividers that segment the large modules, the secret-handling warnings, the agent wire-frame directions, and the few notes without which the code they attach to reads as redundant, reorderable, or unsound.
Diffstat (limited to 'src/sandbox/wire.rs')
-rw-r--r--src/sandbox/wire.rs7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/sandbox/wire.rs b/src/sandbox/wire.rs
index 8f03063..a0d06ca 100644
--- a/src/sandbox/wire.rs
+++ b/src/sandbox/wire.rs
@@ -2,13 +2,8 @@ use std::io::{self, BufRead, Write};
use serde::{Deserialize, Serialize};
-/// Refuse absurd frames before allocating for them. Blobs ride as hex inside
-/// the frame, so this bounds a real package at ~2 GiB of hex — far above
-/// anything legitimate, far below "accept whatever the sandbox sends".
pub const MAX_FRAME_BYTES: u32 = 2 * 1024 * 1024 * 1024;
-/// One protocol frame. `req` correlates a reply with a request; unsolicited
-/// frames (`Ping`, `Hello`, `HelloAck`) carry none.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(tag = "t", rename_all = "snake_case")]
pub enum Frame {
@@ -51,8 +46,6 @@ pub fn write_frame(w: &mut impl Write, f: &Frame) -> io::Result<()> {
w.flush()
}
-/// Read one frame. `Ok(None)` means a clean close, which for a sandbox means
-/// the lease expired and the build should requeue.
pub fn read_frame(r: &mut impl BufRead) -> io::Result<Option<Frame>> {
let mut len = [0u8; 4];
match r.read_exact(&mut len) {