Commit graph Idunn/src/deployment.rs
Author SHA1 Message Date
Meta Vens
d21ead285b Pin the rule that a binding sets only names its recipe declares
The secret-files campaign rests on one admit line: a binding may bind only
names its recipe declares, so a recipe that declares a secret only as its
*_FILE name leaves a plaintext value no place in a binding. Its only test,
extra_operator_environment_is_rejected, asserted is_err(), which any other
refusal satisfies.

The replacement tests assert this refusal exactly, each against a declared
twin that admits:
- an undeclared [workload.environment] name;
- an undeclared [workload.secret_files] name;
- the plaintext twin of a declared *_FILE name, the shape of the Heimdall
  leak;
- `idunn validate` returns the refusal, as main prints it, without the bound
  value (a canary), pinning the admit layer of P6.

Tests only. The deployment test fixtures become pub(crate) so control_plane's
validate test can reuse them.

Idunn secret-files cut, Cut 2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 12:36:27 +02:00
Meta Vens
6fcc1ba6f3 Freeze per-phase deadline durations into the compiled plan (F0)
An operator binding may now declare a [deadlines] table naming any of the
five post-fencing phases (fencing, leasing, awaiting_ready, routing,
committing) in seconds, 1..=86400. compile_deployment_plan resolves the
binding over Idunn's defaults and freezes the result in the plan, so a later
change to a default cannot move an in-flight plan.

The plan becomes schema v3, with the frozen durations as a trailing field.
A v2 plan keeps its nine-field encoding (the field is skipped when absent),
so every existing plan id still verifies; it runs on Idunn's defaults at read
time. Nothing reads the durations yet.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 02:14:47 +02:00
Meta Vens
9dc80f8f5e An unobservable host is silence, not a death; stop-then-start for fixed-resource hosts
Continuity counted 'host actuator raven is not attached' as a workload
death and burned all three restart attempts inside the reattach window
after an Idunn restart, demoting a healthy Muninn. The hub now returns a
typed HostUnobservable for not-attached, detached, reconnected and
unanswered, and supervision skips the tick instead of restarting.

A route-less host workload that owns fixed host resources (one desktop,
one capture, fixed advertised ports) cannot overlap two incarnations. A
binding may now declare rollout strategy stop-then-start: the admitted
incumbent is stopped at Starting, before the candidate starts, and
supervision leaves the target alone from Starting on. A systemd-transient
workload still rolls out candidate-then-promote only.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 14:42:35 +02:00
Meta Vens
2d4f9840a3 A binding path is absolute by its own shape, not the judging platform
The host actuator re-parses a Linux binding on Windows to reach its own
section; the Idunn host's /var paths must not fail there. This also makes
the Linux-shaped test fixtures pass on a Windows checkout.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 14:02:54 +02:00
Meta Vens
fb82dce265 A host-actuator recipe declares the presence identity it is handed as environment
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 13:59:17 +02:00
Meta Vens
144581f9c7 Host actuator: Idunn manages a workload on a Windows host it cannot touch
A managed host runs idunn-host in the user session. It dials Idunn's hub
over CultNet RUDP on the mesh, proves itself with a host actuator service
identity, and executes the runner and workload ports for its host: fetch
the exact frozen revision, build with the host's cargo under the binding's
allowed programs, install the sealed release, start the workload as a
child, report pid, creation time and executable digest, stop on request.
It keeps no transaction state and decides nothing.

On the Idunn side the engine chooses the runner and workload driver per
plan from the binding's driver tag; the yggdrasil daemon is still the
single deployment and continuity authority, and a binding of the old kind
takes the same path it always did. Every request is signed by Idunn's
identity and every report by the host's; both ends refuse the other's
message unless signature, session nonce and sequence hold. The hub admits
its own firewall allow the way the route driver does.

idunn-provision learns to enroll and export the host actuator identity.
The unit gains --host-actuator-bind on the mesh address.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 13:49:25 +02:00
Meta Vens
c848459471 Bindings are driver-tagged and the observation is a variant per host kind
RunnerBinding and WorkloadBinding become enums tagged by driver, so a
host-native runner and a host-actuator workload can be declared without
counterfeiting docker images or systemd units. The single-variant
RunnerDriver and WorkloadDriver enums are gone; the driver is the tag.

WorkloadObservation is now Systemd or Host, untagged on the wire so every
transaction the previous Idunn persisted decodes unchanged (proved under
both MessagePack encodings CultCache uses). IsolationEvidence follows:
Linux proves uid, pid and mount namespaces; a host proves two live
processes distinct by pid and creation time. Mixed kinds are refused.

The build machine-id seal is unix-only so the library compiles on the
Windows host that will run the actuator.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 13:25:50 +02:00
Meta Vens
391a7e2a3c Land the Idunn projection, UDP route actuation, and the Odin daemon
This had been sitting uncommitted in the worktree. It is real work rather than
stray edits: RouteBinding gains stable_socket and an NginxStreamUdp driver so a
route can be actuated over UDP, control_plane and drivers grow the Idunn-owned
projection and bounded RUDP transport, and crates/odin-daemon arrives as a new
member of the workspace.

The deployment recipe comes with it, including the required_gitlinks fix the
core-stack repoint made necessary: it named vendor/cultnet-rs, which no longer
exists now that CultNet comes from CultLib, so Idunn would have refused to admit
the target. The list is empty because Odin has no submodules left; the core
stack is pinned by revision in Cargo.lock inside the frozen source tree.

Everything except odin-daemon builds here. odin-daemon reads systemd listen
file descriptors through std::os::fd and cannot compile on Windows by design, so
Linux CI is its first real witness. muninn and sleipnir pass 162 tests; the one
failure expects an Unreliable media channel that no CultNet lineage has ever
declared, and predates this.

Committed rather than left in flight. rustfmt reports 94 files across the repo,
which predates this work, so formatting is left for its own pass instead of
being buried in a 4,000-line diff.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 15:13:38 +02:00
Meta Vens
c7aefb1e5a Fence parent-only runtime signing credentials 2026-09-03 06:02:54 +02:00
Meta Vens
1fc0dadec3 Rebuild Idunn deployment transaction authority 2026-09-03 05:23:06 +02:00
Meta Vens
5b0b59049e Harden Idunn native authority drivers 2026-09-02 23:54:20 +02:00
Meta Vens
821a8d0646 Rebuild Idunn around typed authority ports 2026-09-02 23:13:36 +02:00
Meta Vens
49e8b18f78 Simplify Idunn deployment authority contracts 2026-09-02 21:02:30 +02:00
Meta Vens
d67a6b2429 Define Idunn deployment authority contract 2026-09-02 18:31:13 +02:00