mind-wake: pin the cadence at the dial's maximum and document the container lane

Adds the row (heat 0.05, base cooldown u32::MAX, 85,899,345,900 s) to the
wait test so any ceiling on the wait fails, and gives the ignored host test its
command in a crate README (the lane that kills the host() mutants). Tests and
docs only; builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-20 13:53:14 +02:00
commit 0c5669ed85
3 changed files with 35 additions and 2 deletions

View file

@ -0,0 +1,26 @@
# mind-body
The Mind's body: the control store, the launch primitive and the `mind-wake`
one-shot.
## The container lane
`tests/wake.rs` holds one `#[ignore]`d test that runs the real `mind-wake`
binary against the real `huginn-daemon` and a real store at the brake's root,
and asserts that the host a run records is the kernel's hostname. It writes
`/etc/gamecult/minds`, so it runs in a container only (`/.dockerenv`), as root,
with the daemon built beside the binary. A plain `cargo test` skips it, and so
does `cargo mutants`, which therefore reports the three `host()` mutants in
`src/wake.rs` as missed. The lane that kills them:
```sh
cargo build -p huginn-daemon -p mind-body --all-targets \
&& cargo test -p mind-body --test wake -- --include-ignored
```
On Yggdrasil, run it through the verify stopgap in the Rust image
(`ygg-verify.sh <worktree> <rev> rust '<the command above>'`).
Mutation testing of the waker needs the glob form, because `-f src/wake.rs`
finds no mutants in this workspace: `cargo mutants -p mind-body -f
"**/src/wake.rs"`.

View file

@ -176,8 +176,8 @@ fn with_the_brake_held_or_the_dial_absent_a_cycle_queries_nothing_admits_nothing
fn the_wait_is_the_grants_cadence_after_the_newest_persona_turn_and_ends_exactly_there() {
// (heat, base cooldown, the cadence base_cooldown / heat): whole, halved,
// and one that carries nanoseconds, so an offset or scale shows. The last
// two sit beyond a second below and a day above (the dial allows both), so
// a floor or a ceiling on the wait shows too.
// three sit beyond a second below, a day above and at the dial's maximum
// (the dial allows all three), so a floor or a ceiling on the wait shows too.
let heats = [
("1", 600, seconds(600, 0)),
("2", 600, seconds(300, 0)),
@ -185,6 +185,9 @@ fn the_wait_is_the_grants_cadence_after_the_newest_persona_turn_and_ends_exactly
("0.05", 3600, seconds(72_000, 0)),
("2", 1, seconds(0, 500_000_000)),
("0.05", 10_000, seconds(200_000, 0)),
// The dial's maximum (base cooldown u32::MAX at heat 0.05): a ceiling
// anywhere below it, a week or a year included, changes the wait.
("0.05", 4_294_967_295, seconds(85_899_345_900, 0)),
];
for (heat, cooldown, cadence) in heats {
let rig = Rig::new();

View file

@ -137,6 +137,10 @@ impl Drop for Daemon {
/// daemon beside the binary. `PATH` is empty so no unit is ever reached: the
/// run opens, its unit fails to start and the run is withdrawn, which is the
/// outcome printed.
///
/// `cargo test` and `cargo mutants` skip it, so the `host()` mutants survive
/// there. Run it in a container as root with the README's lane command
/// (`crates/mind-body/README.md`).
#[test]
#[ignore = "container only: root, /etc/gamecult/minds and a built huginn-daemon beside the binary"]
fn the_real_bin_against_the_real_daemon_opens_a_run_that_records_this_machines_host_and_the_agent() {