From 3ec90d59f6dd56d72eacf73eca7cb1d05582103b Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 22 Aug 2026 02:17:55 +0200 Subject: [PATCH] Witness Heimdall source-selected releases --- crates/idunn-daemon/src/main.rs | 39 +++++++++++++++++++++++++-------- docs/idunn.md | 14 ++++++++---- 2 files changed, 40 insertions(+), 13 deletions(-) diff --git a/crates/idunn-daemon/src/main.rs b/crates/idunn-daemon/src/main.rs index 2e4a043..029ec96 100644 --- a/crates/idunn-daemon/src/main.rs +++ b/crates/idunn-daemon/src/main.rs @@ -5077,12 +5077,18 @@ fn swarm_targets(options: &SwarmOptions) -> Result> { health_contract: health_contract("heimdall.cultnet-rudp-provider-health", "failed"), deploy_command: Some(yggdrasil_actuator("deploy", "heimdall")), restart_command: Some(yggdrasil_actuator("restart", "heimdall")), - release: Some(release_target( - "Heimdall", - PathBuf::from("/srv/build/Heimdall"), - "restart-after-verified-build", - None, - "restart-required", + release: Some(with_source_change_pathspecs( + with_deployed_revision_witness( + release_target( + "Heimdall", + PathBuf::from("/srv/build/Heimdall"), + "restart-after-verified-build", + None, + "restart-required", + ), + PathBuf::from("/srv/heimdall/deploy/deployment.env"), + ), + DEPLOYABLE_SOURCE_PATHS, )), enabled: true, interval_seconds: 300, @@ -8010,20 +8016,21 @@ mod tests { } #[test] - fn yggdrasil_runtime_catalog_includes_discovery_and_dungeon_bodies() { + fn yggdrasil_runtime_catalog_binds_discovery_auth_and_dungeon_releases() { let targets = swarm_targets(&SwarmOptions { profile: "yggdrasil-local".to_string(), repo_root: PathBuf::from("/srv/odin/source"), }) .expect("yggdrasil-local targets"); - for (daemon_id, repo, branch, witness, actuator_name) in [ + for (daemon_id, repo, branch, witness, actuator_name, restart_on_missing) in [ ( "yggdrasil-odin", "Odin", "codex/ygg-idunn-independent-bootstrap", "/srv/odin/deploy/deployment.env", "odin", + true, ), ( "yggdrasil-ghostlight", @@ -8031,13 +8038,25 @@ mod tests { "codex/ghostlight-dungeon-mvp", "/srv/ghostlight/deploy/deployment.env", "ghostlight", + true, + ), + ( + "yggdrasil-heimdall", + "Heimdall", + "main", + "/srv/heimdall/deploy/deployment.env", + "heimdall", + false, ), ] { let target = targets .iter() .find(|target| target.daemon_id == daemon_id) .unwrap_or_else(|| panic!("missing {daemon_id}")); - assert!(target.health_contract.restart_on_missing_publication); + assert_eq!( + target.health_contract.restart_on_missing_publication, + restart_on_missing + ); assert_eq!( target.restart_command.as_deref(), Some(format!( @@ -8060,6 +8079,8 @@ mod tests { let actuator = include_str!("../../../scripts/linux/idunn-yggdrasil"); assert!(actuator.contains("deploy:odin|restart:odin")); assert!(actuator.contains("deploy:ghostlight|restart:ghostlight")); + assert!(actuator.contains("restart:heimdall")); + assert!(actuator.contains("deploy:heimdall")); } struct FakeReleaseStatePort { diff --git a/docs/idunn.md b/docs/idunn.md index 92a45a1..7d94df8 100644 --- a/docs/idunn.md +++ b/docs/idunn.md @@ -321,13 +321,19 @@ idunn.rudp_health_ingress.v1 lacks hot reload, blue/green routing, rolling instances, or another named in-place swap mechanism, Idunn records `restart-required` and verifies the restart path honestly. -- Yggdrasil Odin, Heimdall, repixelizer, and StreamPixels are enforced through the - generic source artifact lane and their existing `gamecult-ops` runbooks. +- Yggdrasil Odin, Heimdall, Ghostlight, repixelizer, and StreamPixels are + enforced through Idunn's source-selected release lane and their existing + `gamecult-ops` actuators. Heimdall and Ghostlight publish exact deployed + revisions in `/srv/heimdall/deploy/deployment.env` and + `/srv/ghostlight/deploy/deployment.env`; documentation-only commits cannot + become desired executable generations. Odin publishes `idunn.signed_daemon_health.v1` with its root-bound Ed25519 identity. Its immutable release pins both the Odin commit and the exact CultLib commit, then switches them through one `/srv/odin/current` link. - Ghostlight is present but disabled in the catalog until its Linux runtime and - signed-health identity are admitted; absence is not treated as failed health. + Ghostlight's Linux runtime and signed-health identity are admitted. Heimdall + publishes its own daemon health and private authentication command listener; + its HTTP and loopback listener probes remain deployment witnesses rather than + release or health authority. Bifrost is explicitly blocked as of 2026-06-09: committed Bifrost `HEAD` expects `UserAccounts.HeimdallAccountId`, while Yggdrasil's production database lacks that column and EF reports no pending migration. Idunn must