Commit graph Huginn/crates/mind-body
Author SHA1 Message Date
Meta Vens
e623e7e249 mind-body queue: citing builds the citation both breaker and step 0 select by
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 05:40:25 +02:00
Meta Vens
6206fdd85d mind-body launch: units are named by instance and turn only (ruling mind-unit-names)
mind-persona@<instance>.service and mind-self@<instance>.service; the run
label no longer enters the unit name, and only the instance is validated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 05:38:22 +02:00
Meta Vens
f624feec75 mind-body launch: dead runs closed in the opening batch, Busy from admission, breaker over the item's citations
open_and_launch takes a Grant by value. Step 0 reads the in-force runs of
hers of the request's turn on the instance (typed facts): a live unit or a
run inside START_GRACE_S answers Busy; a dead one is closed Recorded in the
same admission that opens the next run, so the in-force record is the one
owner of liveness. Admission's AlreadyLive maps to Busy. The alias Busy query
and the whole-mind breaker scan are deleted: the breaker counts the documents
that cite the item, starting after the newest question raised in it, and a
trip's question is keyed by the run label. SystemdLauncher holds no
instance; unit names are validated before systemctl sees them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 05:32:19 +02:00
Meta Vens
ed5fc195d2 mind-body control: Released carries a Grant only read_effective makes
The run cap and cadence leave the control reader only inside a Grant with
private fields, so a cap cannot exist without a released brake and an
in-bounds dial. effective() is private; its one caller is read_effective.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 05:32:19 +02:00
Meta Vens
5ef4f5eef6 huginn-mind: refusals name a holder by a typed RunId; a run born closed owes no live slot
AlreadyLive and AlreadyClaimed carry RunId, which parses as a run key on
every door, so a peer cannot fill it with an arbitrary string. The live
check applies only to a run the batch leaves in force. Tests pin a holder
that differs in start, host and budget, a born-closed run, and the second
live Persona turn's admission refusal in mind-body.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 05:17:11 +02:00
Meta Vens
3b15c39f83 mind-body launch test: end each Persona turn before the next opens
Admission now holds one live run of hers per turn, so the budget test that
launched three Persona turns in a row without ending any is refused at the
second. It ends each turn; mind-launch r3 rewrites this test next.
7ef8669 does not pass this test; this commit does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 23:11:20 +02:00
Meta Vens
8dee875153 Launch primitive: drop a duplicated test attribute
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 21:30:50 +02:00
Meta Vens
6e44095615 Launch primitive: a call seam on the daemon port and tests for the mutation survivors
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 21:18:31 +02:00
Meta Vens
92c193c965 Launch primitive: test-name and import fixes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 20:55:49 +02:00
Meta Vens
ea9c324663 Launch primitive: queue, breaker, open_and_launch and the run aliases
Adds the turn and operated_by aliases on the run kind, and in mind-body the
Launcher port with SystemdLauncher, the work queue, the repetition breaker and
open_and_launch. Not yet built: this commit may not compile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 20:51:07 +02:00
Meta Vens
cc66193961 mind-body: drop a stale line from the control test header
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:55:51 +02:00
Meta Vens
a50b25c08e mind-body: mind-control takes --root <dir>; the window probe runs in a tempdir
Soul s3: the window probe wrote a window-probe-<pid> instance under the real
/etc/gamecult/minds. A leading --root argv flag (argv, because sudo -E carries
the environment) replaces the default root; the probe points the real binary at
a tempdir, whose drop removes whatever a failed assert leaves. No test names
/etc/gamecult any more; the path-derivation test uses CONTROL_ROOT.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:53:27 +02:00
Meta Vens
44c5410bbf mind-body: create missing ancestor directories 0755 (the previous commit's edit mangled control.rs)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:45:14 +02:00
Meta Vens
eb8aefc0fb mind-body: directories the writer creates are 0755 ancestors included; the probe reports its sweeps
Under the binary's umask 077 a first write would have left /etc/gamecult/minds
0700 and unreadable by the units. The attacker reports how much it swept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:43:59 +02:00
Meta Vens
1c2964b6ad mind-body: the window probe also opens the staged file, the wider window
Under umask 000 with the binary's umask removed the first probe never hit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:43:00 +02:00
Meta Vens
8e6b72c21b mind-body: the world-writable store fixture carries a lock, as opening the writer on a store would create one
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:40:18 +02:00
Meta Vens
5cccab6899 mind-body: the binary restricts its umask; the writer refuses unsafe installs
Soul s2: under a permissive umask the store was group/world-writable between
CultCache's rename and the chmod, and an fd opened there survived it. The
mind-control binary now sets umask 077 first (the library never touches the
umask). The writer refuses to write through an existing directory, lock or store
that is not root's or is group/world-writable, with the typed UnsafeStore error
naming path, mode and owner. Tests: a non-root open-for-write probe against the
real binary under umask 000; refusals for 0777/0775 directories, 0666/0664
locks and stores, and a non-root-owned directory; accepted root installs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:39:19 +02:00
Meta Vens
2377fa6d40 mind-body: the mode test writes once, so a skipped lock mode is not repaired by the second write
cargo-mutants on the diff missed deleting the negation before the lock check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:28:39 +02:00
Meta Vens
d125b95c8d mind-body: the wrong-dial fixture registers the brake it reads beside
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:25:26 +02:00
Meta Vens
550037e0b3 mind-body: pin the creation modes, the non-root refusal and the dial decode branch
Modes under umask 000/022/077 via a re-executed test child; a non-root user
(setpriv uid 65534, skipped with a message when not root) cannot write the store
but can read it; an undecodable or NaN dial reads Held(Undecodable) whatever the
brake says, which kills the fail-open default-dial mutant.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:24:58 +02:00
Meta Vens
0a3b9c3ba5 mind-body: the writer creates the control store 0755 and 0644 whatever the umask
Soul s1: created under umask 000 the directory was 777 and the files 666, so a
non-root user could write the store. The writer now sets the directory (when it
creates it), the lock file and the store file explicitly, after the setter's own
refusals so a refused write still creates nothing. CultCache stages with the
process umask and offers no mode, so the store file is set after the rename.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:24:58 +02:00
Meta Vens
9a9165d4f1 mind-body: pin the --instance guard and the binary's refusal exit
Two cargo-mutants survivors from the first run (main -> (), and the
--instance match guard -> true) are killed by a malformed-command table row
and a process-level test of the refused invocation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:05:51 +02:00
Meta Vens
76367e888a mind-body: need() as a fn so the borrowed value outlives the closure
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:01:14 +02:00
Meta Vens
4b3e850fef mind-body: the operator's brake and burn-rate dial, the reader and the mind-control CLI
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 15:58:29 +02:00