Commit graph Huginn/crates/mind-body/src/queue.rs
Author SHA1 Message Date
Meta Vens
cb86f58a7d wear-facts: a Mind's first line shows the wear her own mind holds, specs with no report, open Soul findings and quiet campaigns on what she stewards, each leading to a record she can open (squash of hands/eureka-body-wear-facts ab61a53..6014554; Soul s1-s2)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 07:06:16 +01:00
Meta Vens
545d6319bf repo-activity: a Mind hears of changes in her stewarded repos, on her first line and by one organ notice on change; a repo the anonymous read cannot reach is named, never a failed read (squash of hands/eureka-body-repo-activity 5a294ed..eee0b14; Soul s1-s4)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 04:54:26 +01:00
Meta Vens
9c58d5620f The gate reads the hold itself at admission; the heartbeat no longer writes resolutions on an answer
open_and_launch decides what an open question holds, once, after the breaker reads and just before the admission: LaunchRequest.held and Held's Default are gone, so no caller can launch a held item and a caller's earlier read (claimable) is advisory only. launch::retire_answered and its heartbeat call are deleted: whoever answers retire resolves the claims, and the hold persists until they do. The retire option text is restored to the r4 wording.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:29:55 +01:00
Meta Vens
9003624c3e queue test: the held items are a set, open holds first
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 06:23:13 +01:00
Meta Vens
79e4cac5fd blocked selects the held questions by key alone; the retire test pins which run's claims an answer retires
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 06:20:11 +01:00
Meta Vens
0e7b044d61 mind-body: the public surface spells the hold snapshot; holds and retire_answered stay crate-private
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 04:18:18 +01:00
Meta Vens
4c217faf22 queue tests: drop a merged duplicate of the daemon-port test body; slice the one claim
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 04:14:03 +01:00
Meta Vens
532855d21a queue, launch tests: read the hold through the snapshot the tests build
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 04:12:34 +01:00
Meta Vens
3e48e122af hold: one decider of what a question holds, read once per launch; a dead Self holder no longer stalls the successor; retire is read
s5 findings of cut-self-session-live:
- blocked-recipe-misses-run-held-spec: eureka_state::hold is the one decider
  (a question holds the item it is raised in, or every claim of the run it is
  raised in; an answer of retire keeps holding the claims still in force).
  queue::on_hold and `huginn blocked` both read it.
- hold-read-not-one-snapshot: on_hold returns a Held snapshot that the request
  carries; claimable, queue and the gate read it, none reads it again.
- dead-self-holder-stalls-successor: launch::slot is the one reader of whether
  a holder lives; claimable asks it, a dead holder is closed by the launch and
  the beat's trace says so.
- retire-answer-reopens: launch::retire_answered resolves the claims of an
  answered-retire question Withdrawn; the beat runs it before reading briefs.
- held-note-threshold-unpinned: a test pins the note for exactly one held brief.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 04:11:38 +01:00
Meta Vens
9faeb94035 queue, heartbeat tests: a question in another item's run is no boundary; no held brief, no held note
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 02:55:43 +01:00
Meta Vens
1b19180555 queue: one owner of the hold; a trip belongs to the run whose end tripped it and its question holds that run's claims
Cut claimable's Mind-wide stop on any follow-up question and queue's inline
blocked loop. queue::on_hold is the one reader of what an in-force question
holds (a question raised in a run holds that run's claims, anything else holds
itself); queue, inbox::derive and the open_and_launch gate read it.
Breaker::Trip names the newest ended counted run; the breaker question is
raised in that run; the boundary is the newest of a question raised in the item
and a run claiming it that a question is raised in, so an answer or withdrawal
gives every claim of the run a fresh count. The trip and the held-brief wait
are written to the heartbeat trace.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 02:09:49 +01:00
Meta Vens
6272c2244b persona: she writes what she must keep into her mind, and reads it back every turn
A Persona reply gains `remember` (memories of seven sorts, about the
batch's people), `settle` (close an open ask: done is Recorded, declined and
wrong Withdrawn, with her reason) and `start_self_run.for_ask` (take an ask on
by id or as `new:<i>`). The organ fills where a memory was learned, whether it
was direct and its event ids; the model cannot write them. One admission per
turn carries the memories, the settles and the Pulse after the says, then the
Self run (follow-up and the ask's Deferred in one admission), then the ack. A
refusal fails the turn as Failure::Memory with the says sent and no ack.
admit_pulse is gone.

recall.rs reads only her own mind: open asks first on every turn including a
wake, memory about the batch's other senders, the nearest memory, follow-up
and ruling by MindPort::query_near, and the newest memory; de-duplicated and
capped at 20 items and 16 KiB. render_input gains "What you remember" after
the goals section; follow-ups and rulings that section already lists are not
repeated.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-31 15:15:41 +01:00
Meta Vens
663a844e76 mind-launch: a Grant names its instance and its store, Persona runs take no claims, breaker bounds pinned
Grant carries the instance whose store was read; read_effective(root, instance)
derives the store path itself and no caller supplies a path or a source. The
launch refuses a Grant of another instance and a Persona request with claims,
both typed refusals that name no input. Launcher drops its dead label: liveness
is keyed by unit (instance, turn). Tests pin Persona step 0, the Operator-run
exclusion, the fiftieth ended run and the same-batch boundary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 06:54:29 +02:00
Meta Vens
bf32a4955e Restore LF line endings in the files this cut touched
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 06:06:01 +02:00
Meta Vens
3d4049cf10 mind-body queue: drop the same-batch question test (the mutant it aimed at is equivalent)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 06:05:24 +02:00
Meta Vens
6bcec91bbc mind-body queue test: a run admitted in the question's batch is not after it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 05:56:19 +02:00
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
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
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