summaryrefslogtreecommitdiffstats
path: root/tests/failure_modes.rs
Commit message (Collapse)AuthorAgeFilesLines
* src,sandbox,http: three more fields nobody read, and the check that missed themaur-build10 days1-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | A field scan that printed its first thirty lines missed the rest. Three `pub` fields were written and never read: `SandboxSpec::disk_mb`, copied off `cfg.min_free_disk_mb` into a spec no backend consulted — the dispatcher already checks the disk itself, so the knob stayed live and the plumbing around it was dead; `SandboxInfo::warm`, computed three ways by three backends and read by nobody; and `Server::handle`, a `JoinHandle` stored and never joined, which is what detaching a thread means and so was never load-bearing. All three are gone, their construction sites with them. Four more are written-but-never-read on purpose and now say so where they are declared: `Identity::upstream_pins` and `source_digests` reach the identity digest through `canonical_json`, not through a name; `VirtualClock::_owner` is the lease, and holding it unread is the whole mechanism; the `Ab`/`Ba` pair in `hash`'s canonical-json test exist to be serialized. `the_test_helpers_are_used` only looked at `pub` items, which left the blanket `allow(dead_code)` in `tests/common` exactly as able to hide a private helper as a public one — the objection was fair, and planting `fn planted_private_helper_never_used()` proved it passed while a dead private helper sat in the file. It now scans private declarations too, and fails on both the planted function and a planted struct.
* comments: keep only what the code cannot showaur-build12 days1-14/+0
| | | | | | | | | | | 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.
* comments: say why, not whataur-build12 days1-16/+7
| | | | | | | | | | | | | | 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.
* sandbox: failure-mode tier — a FakeBackend that breaks on purposeaur-build12 days1-0/+200
The recovery paths a remote pool makes newly reachable are now executed, not described. A decorator over the loopback backend injects the four faults that matter: a sandbox that vanishes mid-run (the step fails, the lease expires, the reaper requeues, a healthy pool finishes from the checkpoints — I5 across the sandbox boundary); a TTL that bites mid-build (a failed step, not a retry-burned one); a pool at quota (the build blocks on sandbox-pool using the same blocked machinery as missing deps, rather than failing on an infrastructure fact); and a sandbox whose pacman -Q lies about the installed world (provisioning refuses with a dedicated world-mismatch class, so 'the sandbox lied' never reads as 'the sandbox broke'). Two error classes carry that vocabulary: PoolExhausted — capacity, so wait, never retry — and WorldMismatch — fail-closed, never retried. The remote and kata acquire timeouts now speak the first, which is what makes a full pool a queue fact instead of a build failure.