diff options
| author | aur-build <aur-build@localhost> | 2026-11-19 17:33:17 +0000 |
|---|---|---|
| committer | aur-build <aur-build@localhost> | 2026-11-19 17:33:17 +0000 |
| commit | 4304b0f336ddba7b4ec6780795059ff2066d105b (patch) | |
| tree | 10edea744a1c2bf3fc363b4dc7f64abac8b1a0d3 /src/error.rs | |
| parent | e757979f1a2afdbe7146066345bb9acd19d3b151 (diff) | |
| download | aur-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/error.rs')
| -rw-r--r-- | src/error.rs | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/error.rs b/src/error.rs index f849f83..5966e28 100644 --- a/src/error.rs +++ b/src/error.rs @@ -16,8 +16,6 @@ pub enum Error { Http(String), #[error("child process {cmd}: {detail}")] Subprocess { cmd: String, detail: String }, - /// A fail-closed assertion. Everything that guards "we build what we reviewed" - /// raises this: recipe_hash mismatch, pkgver mismatch, missing approval. #[error("assertion failed: {0}")] FailClosed(String), #[error("not found: {0}")] @@ -28,17 +26,10 @@ pub enum Error { Invalid(String), #[error("blocked: {0}")] Blocked(String), - /// The sandbox pool could not fit a lease right now. Not a failure and not a - /// retry: the build waits, as it waits for a dependency it publishes - /// (§10.4). A quota is a fact about capacity, not a bug. #[error("sandbox pool exhausted: {0}")] PoolExhausted(String), - /// The world inside the sandbox is not the world the plan approved: a pinned - /// dependency did not land, or the closure was incomplete. Its own class so - /// a test can tell "the sandbox lied" from "the sandbox broke". #[error("world mismatch: {0}")] WorldMismatch(String), - /// A failure the outside world caused and a retry may clear (§8.4). #[error("transient: {0}")] Transient(String), #[error("{0}")] @@ -80,20 +71,13 @@ impl Error { Error::WorldMismatch(s.to_string()) } - /// True when the sandbox pool, not the build, is the problem: the build - /// blocks and waits rather than failing. pub fn is_pool_exhausted(&self) -> bool { matches!(self, Error::PoolExhausted(_)) } - /// True when a retry could plausibly help (§8.4). - /// - /// `Error::Io` is *not* automatically transient (m-14): `ENOSPC` and `EACCES` - /// are `Io`, and retrying them burns attempts while a full disk goes unnoticed. pub fn is_transient(&self) -> bool { match self { Error::Http(_) | Error::Transient(_) => true, - // A quota is capacity, not a hiccup; the build blocks instead. Error::PoolExhausted(_) | Error::WorldMismatch(_) => false, Error::Io(e) => matches!( e.kind(), |
