Huginn/crates/mind-body
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Meta Vens dcd8f2116b Repo activity: a repo the anonymous read cannot reach is Unseen and the others still read; the read says only what it knows
A feed that answers 404 (private) or a redirect (renamed) is a fact about that repo, unseen, on first reads and later ones; the redirect is not followed and, when it names a repo, the Mind is told where it points. A network failure or the budget still fails the read whole. The fake forge now answers statuses and Location as the live forge does.

more:bool becomes capped: the repos whose feed the read stopped at its page limit, and the notice and the wear line say only that: the read stopped at its page limit in a named repo, older entries there were not read.

The cut notice reserves its tail from the entry count's digits and the capped clause, so its 300-char bound holds at any count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 03:35:43 +01:00
..
src Repo activity: a repo the anonymous read cannot reach is Unseen and the others still read; the read says only what it knows 2026-11-03 03:35:43 +01:00
tests Repo activity: the test mind answers a quiet forge; public surface and ages follow 2026-11-02 23:56:40 +01:00
Cargo.toml Restore LF line endings on the files the WIP commits converted to CRLF 2026-11-01 13:45:37 +01:00
clippy.toml mind-body: the process environment is unreadable by library code, by lint 2026-10-10 20:15:18 +02:00
README.md tests: restore the self_run ceiling and flush tests and the persona DM-room, flag and outcome tests on the usage-only surface; close the red tests; regenerate public_surface.txt; strip stale initiative and dial wording 2026-10-31 05:58:44 +01:00

mind-body

The Mind's body: the control store, the launch primitive, the mind-heartbeat timeline and the mind-self-run actuator.

mind-self-run --instance <slug> [--endpoint rudp://<ip>:<port>] runs inside mind-self@<instance>. It finds her one open Self run, starts claude over stream-json with a fixed argument list, asks for the flush once at the context ceiling and stops a child that outlives the flush (SIGINT, then SIGTERM and SIGKILL). It exits 0 when the child exited 0, 1 otherwise, 3 when she has no single open Self run and 2 when the arguments are wrong or the mind cannot be reached.

The heartbeat

mind-heartbeat is the one process that decides who wakes and when: each beat falls when the Minds' voted tempo has passed and goes to the Mind that has waited longest, bent by the urgency she declares and a member addressing her; the operator tagging or naming a Persona launches her at once. mind-heartbeat timeline prints its latest record.

The actuator has its own ignored test, the_real_bin_finds_her_run_... in tests/self_run.rs: the real mind-self-run against the real daemon with a fake claude first on PATH. It needs the daemon built beside the binary and a POSIX shell, not root:

cargo build -p huginn-daemon -p mind-body --all-targets   && cargo test -p mind-body --test self_run -- --include-ignored

Mutation testing of the actuator, with the globs that reach the library and the binary: cargo mutants -p mind-body -f "**/src/self_run.rs" -f "**/src/bin/mind-self-run.rs". The binary's mutants are killed only by the lane above.