Commit graph Idunn/src/drivers.rs
Author SHA1 Message Date
Meta Vens
22bd904ed9 Runner failure tests: named step, bounded tail, never echoed, private store
Drive the real DockerRunnerDriver over a fake docker program, through the
engine's Sealing path: the second step is named with its exit status, both
tails are kept in a 0600 store capped at 32, no error, control.cc or journal
line carries the output, status escapes control bytes, an unwritable store
does not stop the abort, and control.cc's record bytes equal those captured at
base 804ed75.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 02:16:03 +01:00
Meta Vens
ef82355bab Runner failure: a typed, bounded step failure kept in runner-evidence.cc
DockerRunnerDriver::docker no longer buffers whole streams or interpolates
stderr into the error. It pipes both streams through an 8 KiB tail and returns
RunnerStepFailure (subject, runner, status, tails); the engine's pre-fence
path is the one writer of runner-evidence.cc (0600, newest 32) and journals a
line that names the store and no output. idunn status --command renders the
record with control bytes escaped.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 02:11:14 +01:00
Meta Vens
dfdc226c25 Idunn credential rule: an unlistable credential directory is a refusal
cargo-mutants showed that treating every read_dir error as the empty set
survived. Test the non-NotFound case (the unit path is a file).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 15:14:15 +02:00
Meta Vens
ae6a1bea55 Idunn: judge workload credentials from the delivered directory, not LoadCredential
systemd 257 displays LoadCredential as [unprintable] for every unit, so the
conjunct was always false for a unit with only the presence identity and
vacuous for one with credentials. Delete the show argument, the conjunct and
its twin clause; the isolation conjunction becomes
require_systemd_isolation_contract. The credential rule is now
require_delivered_credentials: entry names of /run/credentials/<unit> in the
MainPID's root equal Idunn's launch names. load_credential stays a retired
wire slot (written empty, out of the drift list) so persisted records decode.

Not yet built or verified.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 14:54:15 +02:00
Meta Vens
e8c4c69728 Seal tests: refused links whose targets resolve (absolute, escaping, after-a-name; file and directory)
Closes the live-target bypass: a judge guarded by exists() or is_dir() passed every dangling fixture.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-23 23:26:50 +02:00
Meta Vens
68d6f96808 Seal: one seal_artifact for both targets; link containment decided at seal by a shape rule
collect_artifact and host.rs materialize both call seal_artifact. digest_tree
judges every link with check_release_link (relative, `..` only first, climbs no
higher than the link's depth); validate_release_symlink and harden's link
judgement are gone. hash_file_exact owns the streamed-length check. A file
directly under a tree's top is pinned 0444.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-23 21:57:07 +02:00
Meta Vens
fd040f09c1 Tests: an io error other than NotFound is not reported as a missing member
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-23 20:28:15 +02:00
Meta Vens
76cec0b540 Tests: the sealed-mode helper no longer redefines the module's existing mode_of
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-23 19:54:35 +02:00
Meta Vens
022dbece5b Directory artifacts declare executable_members; the seal checks them, the receipt carries them, harden seals exactly those 0555
ArtifactOutput and ArtifactReceipt gain executable_members (the receipt field is
skipped when empty, so existing sealed release ids are unchanged).
check_artifact_modes is the one seal-time owner of mode declarations and runs
from both collect_artifact and the host materializer. harden_installed_release
drains the declared set and fails when a declared path was never sealed. Digests
stream through one hash_file_streamed helper; the encoding is unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-23 19:53:16 +02:00
Meta Vens
1207f21948 Real-nginx tests report how many challenges were answered
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-23 04:34:14 +02:00
Meta Vens
60b64e283d Real-nginx tests stop nginx through nginx so its workers do not hold the test's pipe
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-23 04:33:23 +02:00
Meta Vens
c38bb36560 Fix route limit bound (nginx allows below 65536); the dead-acceptor test kills the presence thread through the clock
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-23 04:15:50 +02:00
Meta Vens
36114b8b7b Idunn routes tests: the rendered member block pins its limit zone; real-nginx flood tests prove presence stays answerable
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-23 04:12:56 +02:00
Meta Vens
2218ffb8a8 Idunn routes: the member server block renders a limit_conn on a per-route zone; [route.member].max_connections defaults to 128
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-23 04:10:12 +02:00
Meta Vens
7805c0aa9a Idunn routes: an optional [route.member] renders a second nginx server block and sets GAMECULT_IDUNN_MEMBER_BIND; Idunn-owned launch names live in one list
The member candidate port is derived from the candidate port; both stable sockets get firewall rules; native targets render the same bytes as before. Builds.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-23 01:18:26 +02:00
Meta Vens
9c69d00641 Tests kill survivors: grant binding and holder custody, parse fields, credential names, env credentials, Odin endpoint, half-close splice, heartbeat pacing, SIGTERM escalation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-22 20:48:29 +02:00
Meta Vens
b9f27ce1e7 idunn-launch: presence launcher, lease hold, closed-set config renderer, route acceptor (unbuilt)
Does not build-verified yet; tests follow. drivers.rs: holder-side lease read, one lease-binding rule shared with grant.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-22 18:53:29 +02:00
Meta Vens
9a6b4a128c Continuity backoff: capped streak anchored when the target is found free; one uncharged re-materialization
TargetSupervision gains the attempt streak, the backoff anchor and the
re-materialization bound (keys 7-9, same schema; pre-key records decode with
them defaulted). Every charged attempt waits backoff_wait(base, streak - 1,
300 s) from the first dead-and-free pass; a sustained run resets the streak.
WorkloadPort::lost_to_host_reboot lets a reboot-lost unit be re-materialized
once per generation with no step. The streak backoff, reboot and negative
tests land with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 23:52:13 +02:00
Meta Vens
424300d672 A publish that loses to a held lock is retried before the fence, not aborted
resume_candidate turned any failed pre-Fencing step into a pre-fencing
abort, so a topology publish that met a held lock (the nightly backup's
shared lock, an operator) ended the deploy or continuity restart on its
first attempt. LockContended is now a typed error (drivers::LockContended,
raised by mutate and IncidentStore::exchange with the same texts as before)
and resume_candidate's one classification keeps such a transaction in its
phase with last_error set; the backoff retries it and the phase deadline
bounds the wait. Other publish errors still abort.

Tests at the resume path: a contended Starting publish stays in Starting
across ticks and lands after release with one continuity restart; a
non-contention publish error still aborts. Both builds.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-01 03:31:48 +02:00
Meta Vens
827cfad0bb Topology lock: test the lock-creation error classes and the create race
Mutation of the first cut left make_lock_private's error classification and
lost-create-race branch unkilled. Two behavioural tests at the primitive:
an uninspectable lock (name one byte past NAME_MAX) reports an inspection
error, an uncreatable one (procfs) a creation error, and neither is retried
as a lost race; eight publishers released together to create the same lock
all find it private, so none fails for having lost.

Tests only; builds.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-01 02:05:05 +02:00
Meta Vens
102c129891 Topology publishes never wait: one private-lock exchange primitive
exchange_behind_private_lock (drivers.rs) is the single write primitive for
the projection directory: one nonblocking compare-exchange behind a lock only
Idunn can hold. An absent lock is created O_EXCL 0600; a lock that is not a
regular file, ours, mode 0600 is replaced by a fresh 0600 file renamed over it
(a chmod does not revoke a descriptor another uid already holds); a private
lock is opened as is. The topology driver's mutate and the incident store both
go through it; the blocking compare_exchange_snapshot call, publish_projection_mode
(which published the lock 0644 on a false premise that readers open it) and
incident.rs secure_lock are deleted.

mutate now retries only a lost race; a held lock is Err "the topology
projection is locked by another holder" and a no-op, so no caller records a
digest, evidence or phase for a publish that did not land.

Test helpers: the lock holder is a separate flock process, and run_while_held
counts opens of the lock (inotify), so ANY wait on a held lock fails, not only
one past the 30 s ceiling. Tests reproduce the live default ACL and use
setpriv for the other-uid half.

This commit has not been built; the verify run follows.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-01 01:28:05 +02:00
Meta Vens
a909f931ea Merge watchdog idunn-incident: continuity exhaustion is a durable incident
Eureka idunn-watchdog cut idunn-incident, attempts 1-3. Soul verdict
idunn-watchdog:verdict:cut-idunn-incident.s3 holds. Incidents live in
their own incidents.cc (0644, lock private 0600), written with non-blocking
snapshot exchanges; the tick never waits on them. Close rule: running and
no longer exhausted (operator ruling exhaustion-close-rule-op).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 01:15:08 +02:00
Meta Vens
4ac96e959d Route connect test: the listener never accepts, so the test cannot hang
route_connect_retries_connection_refused_until_listener_is_ready blocked in
accept() with no deadline. If the client connected to another listener on the
reused port, accept() waited forever and the whole verify job held its slot
for 39 minutes. The kernel completes a handshake from a listener's backlog,
so the connect succeeds without an accept: the listener now only outlives the
connect, waiting on a channel with a 30 s ceiling. A lost port race fails
the test instead of hanging it.

Builds.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-09-30 23:13:52 +02:00
Meta Vens
1cfbeff083 B5 pins: firewall kept for a live incumbent, whole-id request match, backoff growth
Tests only, from Soul's last B5 check:
- F2: a rollback or withdrawal back to an incumbent route deletes no
  firewall rule (S-R2 survived).
- F3: expiry requests whose ids are a strict prefix of the transaction's
  command id, or extend it, leave it untouched (S-ME1, S-ME2 survived).
- F4: the second and third failures wait two and four polls, as back_off
  writes them (S-MJ1, S-MJ2 and a clamp survived).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 22:30:18 +02:00
Meta Vens
f85e74377f B5 batch 3: firewall first on a withdrawal to nothing; four test pins
`restore` with no prior membership now withdraws the stable endpoint's
firewall allow before it writes the fragment and reloads. A failing `ufw
delete` retries without touching nginx, which bounds the withdrawal reload
loop at zero until the Q3-ii cut gives the abort a deadline. A crash between
the two steps is safe: a rule already gone reads as withdrawn, and the retry
removes the fragment and reloads.

Pins from Soul pass 2:
- MB2: a redeploy over an existing incumbent route installs, rolls back and
  withdraws with a reload each (`changes_route` as `is_none()` survived).
- ME2/ME3: the resolver's command filter is tested with an id of equal
  length and the same leading bytes.
- MJ2: the backoff test asserts the wait `back_off` writes, one poll after
  the failure.
- Soul's F2 probe returns as a test: a withdrawal whose `ufw delete` keeps
  failing reloads nginx not at all over 20 retries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 20:08:58 +02:00
Meta Vens
32cf1f7bf4 Incident writes never wait; exhaustion closes on health and the window; one retention predicate
Every incident write is one nonblocking try_compare_exchange_snapshot of the
whole file against the snapshot it was decided on (as drivers.rs does for the
write lease). A held lock or a lost race is an error and a no-op for the tick,
retried on a later pass; it is also what makes one open incident per
(condition, subject) real. The incident .lock is no longer published: readers
of incidents.cc take no lock, so only Idunn can hold it. History is written the
same way.

An exhaustion incident closes as recovered only when the workload is observed
running and restarts_exhausted is false (ruling exhaustion-close-rule), so a
release that survives one pass after each restart keeps one incident.

Reconcile closes only incidents whose condition ends with admission and whose
subject is not admitted; its dead accumulator is gone. IncidentRecord owns the
retention predicate that retirement and status both use. status writes to a
writer and serve's loop is serve_while, so tests reach both.

Not verified yet: this commit has not been built.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-09-30 18:56:33 +02:00
Meta Vens
4ee70f90ba Route driver: transaction paths always write and reload (B5 Soul B)
`6ff7d5a` skipped the write and reload in `install` and `restore` when the
fragment on disk already equalled what they would write. On a transaction
path that hides a crash between a write and its reload: an abort that
retries after the crash reloads nothing and then stops the candidate, so
nginx keeps proxying to a dead port, and a fenced install skips every retry
(and a first deploy's `ufw allow`) until its deadline. The skip on equal
bytes goes back to supervision only.

What stays: a transaction whose candidate membership is the preflight's
baseline (a continuity over its admitted route) has no route change to make
or undo, so its install, rollback and withdrawal run nothing. No write of
its own can have been cut short. `RoutePreflightReceipt::changes_route`
names it.

`restore_admitted_membership` now puts back the bytes it replaced when its
reload fails, instead of deleting the fragment, so the disk still shows
what nginx serves.

Tests: a crash between a write and its reload is reloaded on retry (install
past the fence and withdrawal, driver level; the abort, engine level); a
transaction that does not change the route runs nothing. Soul's F2 probe
test is gone with the rule it pinned: a withdrawal whose `ufw delete` keeps
failing reloads on every retry again, until the Q3-ii cut gives the abort a
deadline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 18:33:57 +02:00
Meta Vens
202e5a2e10 Idunn records continuity exhaustion as a durable incident in incidents.cc
Idunn's daemon, at the continuity decision site, writes one
idunn.operator_incident.v1 record per exhaustion into its own published
incidents.cc (--incident-store), never control.cc. The record opens once per
(target, condition), closes on an observed running workload (recovered) or on
the target leaving the admitted set, and retires to incident-history.cc seven
days after closing. A store failure is traced once and never returned into the
tick. idunn status prints each target's incidents. ReportOnce is demoted to a
stderr trace.

Does not build the fixture test until tests/fixtures/idunn.operator_incident.v1.cc
lands in the next commit.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-09-30 16:21:02 +02:00
Meta Vens
6ff7d5a9c7 Route driver: a fragment already correct is neither written nor reloaded
`install` and `restore` skip the write, the firewall step and the reload
when the fragment on disk already equals what they would write. `restore`
still withdraws the endpoint when the prior membership is none, so a
withdrawal whose `ufw delete` failed repeats only that step.

That skip is sound only while bytes on disk are what nginx last loaded, so
every write whose reload fails is now undone: `restore` puts the previous
fragment back, and `install` puts the baseline back in both the rollback
and the fenced case (it used to retain the candidate for retry, which the
retry would now take for live). An install that never loaded needs no
reload to roll back.

Tests: a retry with an already-correct fragment performs zero reloads (install
and a withdrawal with a failing `ufw delete`); a failed reload puts the
fragment back so the retry reloads. Two engine tests that counted a reload
for withdrawing a never-installed route now count the endpoint withdrawal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 15:32:38 +02:00
Meta Vens
e9c718e073 B2-3d: the route actuation ceiling counts only Forward
Ruling 3d A (2026-09-30): the 12/h per-target route actuation ceiling
counts only Forward actuations (deploys). Survival actuations (continuity
restarts, rollbacks, withdrawals, admitted-route repairs) are recorded for
visibility in a separate TargetSupervision.route_survivals log (key 6,
newest 12 kept) and are never counted against the ceiling or refused by it.
A target whose continuity spent its six restarts can therefore always be
rescued by a deploy.

Each Survival path keeps its own bound: a continuity's actuations the
restart log and its doubling wait, an admitted-route repair the challenge
backoff, a deployment's rollback or withdrawal the Forward change it
undoes. A candidate whose route proof keeps failing now reloads at most
twice the ceiling per window (12 installs, each with its rollback) instead
of 12.

status prints the survival record beside the ceiling line.

TargetSupervision stays at v1 with the added slot: no installed Idunn has
written the record (B2 is merged, not installed).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 12:21:58 +02:00
Meta Vens
cccfe8e174 x
# Conflicts:
#	src/control_plane.rs
2026-09-30 06:23:11 +02:00
Meta Vens
8447c22201 B2 fix batch: a continuity is survival, and survival runs uncounted
The route gate derives the charge from the transaction's command kind: a
continuity's preflight and install are Survival (never refused, counted), only
a deployment's are Forward. A Survival that cannot be recorded is logged and
proceeds; a Forward that cannot be recorded is refused. A proved route
challenge whose write is lost ends the pass like a failed one instead of
failing it. status() draws its target union from one function.

Tests: continuity through a full ledger, uncounted survival vs refused forward,
the second-failure wait, the lost proved-challenge write, each v3 route
supervision field, and the admitted-or-metered union. The routed world takes a
command kind, so the refusal tests run as deployments.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-09-30 02:44:43 +02:00
Meta Vens
61842a3952 Pin the chunk-size line against vertical tab and carriage return
Rows for a vertical tab before an extension, a carriage return before an
extension, and a size line ending in one or two carriage returns, so a
wider trim than SP and HTAB, or a stripped trailing carriage return,
cannot be taken.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-09-30 00:17:27 +02:00
Meta Vens
76c7b13b33 B2 rework: per-target supervision, typed route gate, generation v4 (production)
A target's route actuations and continuity restarts are sliding logs in one
TargetSupervision record (idunn.target_supervision.v1), created by the first
charge so first deployments are metered. The route driver asks a
RouteActuationGate before every group of host mutations; Forward changes can
be refused with a typed RouteActuationRefused, Survival ones (restoring the
admitted or incumbent route) are always admitted and always counted.

Generation moves to v4 with a typed lift from v3 that retires keys 18 and 20,
refuses a record showing the retired meters were written, and adds last_error
at key 21. Continuity restarts are counted in the mint CAS against the
target's own log; the history scan and both carry compensators are gone. Any
write to a generation or to its target record ends that target's supervision
pass. A due time further ahead than its owner's longest wait reads as due.

Tests do not build in this commit; the next one rebuilds them.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-09-30 00:02:24 +02:00
Meta Vens
bf5347c370 The chunk-size line admits whitespace only before an extension
RFC 9112 7.1 allows whitespace before a chunk extension and nowhere
else. The reader trimmed both ends of the size, so " 3" and "3 " were
taken. It now splits at the first ';', trims trailing SP and HTAB only
when an extension follows, and leaves parse_digits as the digit
authority. Rows use an honest body so only the size line differs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-09-29 23:40:11 +02:00
Meta Vens
08d94ee61b Fetch blobs in bulk the way Git's lazy fetch does for a promisor remote
In a blob:none partial clone, fetching bare blob ids with --stdin made Git's
post-fetch connectivity check treat the id as a revision and fail with
"bad revision" / "did not send all necessary objects" against GitHub, which
broke a live deploy fetching a vendor gitlink's blob. Add
fetch.negotiationAlgorithm=noop, --recurse-submodules=no and
--filter=blob:none, the arguments Git's own lazy fetch uses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 21:13:22 +02:00
Meta Vens
f9cebb33d0 Pin the partial-clone bulk fetch arguments in the spy test
A file:// origin delivers an explicitly wanted blob with or without the
promisor-style flags, so the real-shape fixture cannot fail on the bug that
GitHub triggers. The spy test already records the bulk fetch line; assert
it carries fetch.negotiationAlgorithm=noop, --recurse-submodules=no and
--filter=blob:none. Fails on the current arguments.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 21:12:06 +02:00
Meta Vens
7f776ec3a6 Pin bulk_fetch_objects against a real blob:none partial clone
Every existing source-driver fixture uses an origin without
uploadpack.allowFilter, so --filter=blob:none is ignored, the clone is
full, and bulk_fetch_objects never has a missing blob to fetch. This
fixture advertises the filter, so the checkout really lacks the blob, and
checks delivery with GIT_NO_LAZY_FETCH=1 so only the bulk fetch can supply
it. It fails on the current fetch arguments.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 21:06:03 +02:00
Meta Vens
d3db58227a Define the frozen-source symlink limit on Windows so idunn-host builds
The constant was unix-only since 9475dfa while its uses are not, so the
Windows idunn-host has not compiled since S1. Found installing B3: Raven's
actuator (built 2026-09-11) cannot decode the new plan types.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 20:57:45 +02:00
Meta Vens
8432d45bbe B3 follow-up: bound the chunked trailer loop, refuse signed numbers and spaced header names
Trailers draw on the header budget instead of an unbounded loop. Content-Length
and chunk sizes are digits only (RFC 9112), and a header name with whitespace
is refused. Pins found by cargo-mutants: partial trailer, exact bounds on all
three framings, one byte then stop, unterminated chunk from a peer that keeps
going. ChallengeFailure::Silent documents what it actually is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 19:36:54 +02:00
Meta Vens
e8b44878b7 B3 fix: the over-bound header test must be over the bound
The previous commit's over-bound case used floor(bound / line) lines, which
can still fit under the bound once the status and Content-Length lines are
counted; the answer was accepted and the test failed. It now sends one whole
line more.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 18:23:11 +02:00
Meta Vens
4b3b86d863 B3 fix: pin the header bound at its edge and the chunked trailer loop
Two more mutants survived: the header-size bound was only tested far from its
edge, so doubling each line's cost went unseen; and the chunked trailer loop
was only exercised with a trailer present, so inverting it went unseen. The
bound is now tested one line inside and at its edge, and a chunked answer with
no trailer is read from a peer that keeps the socket open.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 18:19:07 +02:00
Meta Vens
d5669af352 B3 fix: pin what cargo-mutants found unpinned in the framed route reader
The header-size bound was tested only against answers that also stopped
short, so it never had to hold on its own; the interrupted-read retry was
exercised by no reader that could be interrupted. The header test now sends an
honest, whole answer whose headers alone exceed the bound, and a scripted
reader pins the retry and the silent/refused split at the Answer boundary.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 17:49:56 +02:00
Meta Vens
2f22dcac96 B3 fix: read a route answer by its framing, and judge a stopped peer one way
The HTTP challenge read to end of stream, so a peer that answered in full and
kept the socket open (or answered 404 and kept it open) read as silence. It
now reads by Content-Length or chunked framing, refuses any non-2xx status,
and refuses bytes that are not a CultNet frame.

One rule for both transports: a peer that sent no byte is silent; a peer that
sent some bytes and stopped is refused. A truncated TCP frame used to read as
silence; that pinned test now expects a refusal.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 17:13:37 +02:00
Meta Vens
86ee21dac5 B3 fix: pin what cargo-mutants found unpinned, delete what it found redundant
First cargo-mutants --in-diff pass over a61540b..aa1889b left 16 misses.

Deleted:
- the candidate challenge's own route-id check: rendering the Expected next
  holds the same binding, so it could never decide anything.
- odin_can_observe in advance_warming: is_odin && !(!is_odin || observed) is
  is_odin && !observed; two of the misses were operators in that detour.

Moved: which transactions are held for their evidence is now
DeploymentTransaction::held_disagreement, so "finished or aborting work is
never held" is a value with a test, not a local in resume_candidate.

Pinned: the admitted-generation topology refresh (taken once, then not
again), WarmingEvidence shape checks per source, the PresenceDisagrees text,
the plan's readiness declaration needing the shared-infrastructure kind, TCP
framed challenges (exact answer, bound, empty, non-CultNet, silence), RUDP
silence, and ChallengeFailure's text and source.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 15:24:45 +02:00
Meta Vens
aa1889b288 B3 fix: kill the three surviving mutants
Boot re-proof by tag: the held-generation test used receipts that still
re-proved cleanly (boot reads the current Odin authority, not the stored
one), so re-proving them passed. The receipts are now authentic but not
Ready, so only skipping them lets the store boot.

Config error as silence: the candidate path renders Expected first, which
parses the same endpoints, so the challenge's own parse is reached only from
the stable path. A new test drives that parse directly.

First-Odin gate by name: the stub can now answer a first-Odin Warming
challenge, and a stateful provider not named odin is accepted while a
stateful target named odin that provides nothing is refused.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 14:41:25 +02:00
Meta Vens
e11b457458 B3 fix: pin the route-proof rules, and delete guards another owner already holds
Tests for each rule the Soul pass found unpinned, each written to fail
under its own mutation:
- a stateful route-proof target through the Engine, Fencing to commit: the
  lease is prepared and granted, Ready is refused without the exact lease
  and recorded with it, boot re-authenticates the store at every stage and
  Odin is never read;
- Warming challenges once and then advances on every tick;
- a stateful candidate may not answer its Warming challenge active;
- a presence holds the write lease exactly when it is not warming, and is
  minted after its challenge;
- direct Warming evidence is bound to the bytes and digest it authenticated;
- candidate-vouched evidence is refused on a target Odin reports on;
- a pre-B3 transaction and a pre-B3 generation over a route-proof target are
  held and reported once, not stepped every tick, and not re-derived;
- a stored record with no declared readiness is held;
- Odin is the class OdinSelf, not the name "odin";
- admission refuses an undeclared recipe with a typed error, before the
  source is frozen; a recipe that declares its proof is planned;
- the driver's challenge failures: silence waits, every bad answer and every
  local configuration error is an error;
- the capacity shortfall is read as a typed PresenceDisagrees.

Deleted because another owner already holds them, so no test can reach them:
the Routing and commit "route-proof Ready evidence" ensures (validation
refuses a missing receipt, the hold refuses the other party's), the write
lease comparison's warming arm (the authenticator refuses a warming presence
that claims a lease), and the direct-Warming refresh check (rehydration
authenticates the recorded answer as Odin's first).

Engine.source is a SourcePort, the seam the admission test needs.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 13:32:42 +02:00
Meta Vens
6ea824b5a9 B3 fix: readiness class comes from the recipe alone
ReadinessClass::of is the only class authority. A target whose recipe
declares neither a route nor an Odin dependency, and does not provide the
rendezvous, has declared no way to prove readiness: of() returns a typed
UndeclaredReadiness naming the target, and admission refuses it after plan
compile, before anything is frozen or installed. The OdinCorrelated fallback
for an unrouted target is gone.

The evidence tag no longer decides the path. Boot re-authentication and
admitted-topology refresh choose by class; a stored transaction or admitted
generation whose evidence was vouched for by the other party than its
Expected requires is a typed ReadinessDisagreement, reported once and held,
not a step that errors every tick. Nothing re-derives around it.

"Is this Odin" is the class OdinSelf, not the name "odin": validation,
warming, the Odin authority lookup and the direct-warming checks read the
class. canonical_sha256 on WarmingEvidence and the token's unread evidence
field are deleted.

A bad answer to a direct challenge is an error. The driver splits its
failures into ChallengeFailure::Silent (refused, dropped, hung up, timed
out) and ::Refused (a malformed, foreign, oversized or non-raw answer, or a
local configuration error); only Silent waits. The capacity/disagreement
shortfall is returned as a typed PresenceDisagrees, not flattened to prose.

Odin-driven fixture worlds declare the Odin dependency in Expected and the
correlation they sign names its provider.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 13:12:46 +02:00
Meta Vens
cfe71f680c WIP B3: route-proof harness and tests
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 10:54:22 +02:00
Meta Vens
9e5b7f84fd Close the B1 transition: lift, precondition, boot reconciliation, closed history
Soul found B1's rule sound and its transition unsafe. This makes the rule's
old inputs impossible to reintroduce a stuck state from.

- The control store's legacy lift owns the transition. A pre-B1 continuity
  abort that issued an activation lifts with topology_reconciliation Pending,
  so the one resolution demotes its own activation. A record already terminal
  under the old rule is reopened at Starting, since a terminal record cannot
  owe work. History lifts records as written. Before this, one resident
  record of that shape failed validation and ControlSnapshot::read refused the
  whole store, so Idunn could not boot.
- Supervision owns the Expected-only precondition. When its pre-restart
  demotion fails it mints no continuity and writes next_restart_at_unix_millis
  on the generation's ContinuityBackoff (attempts and window untouched), so it
  neither restarts over an undemotable projection nor retries every tick.
- Boot reconciles once: a projected activation that exactly matches the
  activation a failed continuity in history (or a resident terminal record)
  issued is demoted. Nothing is adopted; an activation no admitted generation,
  live transaction or failed issuer accounts for is reported and left alone.
  New read-only CultCacheTopologyDriver::projected_activation.
- Unreadable history.cc fails closed. The continuity restart ceiling and the
  consumed-command check no longer read an empty history; they stop, and the
  fault is reported once while it lasts (ReportOnce). The undecodable-record
  report is a pure function, pinned.
- docs/deployment-authority.md no longer says the projection never drifts.

Tests: legacy fixtures written by the 9001b58 encoder for the three abort
shapes (a second throwaway generator, see the fixtures README), driven through
the Engine; the seeded-transaction helper now takes a command kind and an
incumbent, and a Deploy carries a frozen-source receipt and a signed brake
release, so Deploy commit, Deploy pre- and post-fence aborts and a continuity
abort over an incumbent run through the real phase machine.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 06:11:29 +02:00