Give Idunn ownership of Yggdrasil VoidBot releases

This commit is contained in:
Meta Vens 2026-07-15 20:25:16 +01:00
commit c5d71e1991
7 changed files with 104 additions and 42 deletions

View file

@ -61,8 +61,9 @@ Local package surfaces:
- Rust daemon crate: `crates/idunn-daemon`
- Rust lifecycle logic: `crates/odin-core/src/idunn.rs`
- Runtime store: `scratch/idunn/idunn.keepalive.cc`
- Local VoidBot keepalive: `scripts\health-voidbot.cmd` and
`scripts\restart-voidbot.cmd`
- Hosted VoidBot release: upstream `main` -> Yggdrasil-local Idunn -> the
root-owned `/srv/odin/deploy-manifests/voidbot` actuator. Local checkouts are
development and diagnostics only; do not create a local deployment.
- Operator escalation: Bifrost-owned CultMesh crossing; current compatibility
delivery calls `scripts\notify-idunn-operator-alarm.ps1`, which asks Bifrost
to publish a typed `gamecult.operator_dm_request.v1` CultMesh command document

View file

@ -2079,6 +2079,23 @@ fn swarm_targets(options: &SwarmOptions) -> Result<Vec<DaemonTarget>> {
match options.profile.as_str() {
"yggdrasil-local" => Ok(vec![
DaemonTarget {
daemon_id: "yggdrasil-voidbot".to_string(),
verse_id: "yggdrasil.local".to_string(),
name: "Yggdrasil VoidBot".to_string(),
health_contract: health_contract("voidbot.cultnet-rudp-stack-health", "failed"),
deploy_command: Some(yggdrasil_actuator("deploy", "voidbot")),
restart_command: Some(yggdrasil_actuator("restart", "voidbot")),
release: Some(release_target(
"VoidBot",
PathBuf::from("/srv/build/VoidBot"),
"restart-after-verified-build",
None,
"restart-required",
)),
enabled: true,
interval_seconds: 300,
},
DaemonTarget {
daemon_id: "yggdrasil-heimdall".to_string(),
verse_id: "yggdrasil.local".to_string(),
@ -2185,17 +2202,6 @@ fn swarm_targets(options: &SwarmOptions) -> Result<Vec<DaemonTarget>> {
enabled: true,
interval_seconds: 30,
},
DaemonTarget {
daemon_id: "voidbot".to_string(),
verse_id: "starfire.local".to_string(),
name: "VoidBot local stack".to_string(),
health_contract: health_contract("voidbot.cultnet-rudp-stack-health", "failed"),
deploy_command: None,
restart_command: Some(script("restart-voidbot.cmd")),
release: None,
enabled: true,
interval_seconds: 300,
},
DaemonTarget {
daemon_id: "weksa".to_string(),
verse_id: "starfire.local".to_string(),
@ -3815,6 +3821,41 @@ mod tests {
);
}
#[test]
fn voidbot_release_authority_is_yggdrasil_local_only() {
let yggdrasil = swarm_targets(&SwarmOptions {
profile: "yggdrasil-local".to_string(),
repo_root: PathBuf::from("/srv/odin/source"),
})
.expect("yggdrasil-local targets");
let voidbot = yggdrasil
.iter()
.find(|target| target.daemon_id == "yggdrasil-voidbot")
.expect("Yggdrasil VoidBot target");
assert_eq!(voidbot.verse_id, "yggdrasil.local");
assert_eq!(
voidbot.deploy_command.as_deref(),
Some("sudo -n /usr/local/libexec/idunn-yggdrasil deploy voidbot")
);
assert_eq!(
voidbot.restart_command.as_deref(),
Some("sudo -n /usr/local/libexec/idunn-yggdrasil restart voidbot")
);
let release = voidbot.release.as_ref().expect("VoidBot release target");
assert_eq!(release.repo_path, PathBuf::from("/srv/build/VoidBot"));
assert_eq!(release.upstream_remote, "origin");
assert_eq!(release.upstream_branch, "main");
let starfire = swarm_targets(&SwarmOptions {
profile: "starfire-local".to_string(),
repo_root: PathBuf::from("E:/Projects/Odin"),
})
.expect("starfire-local targets");
assert!(starfire.iter().all(|target| target.daemon_id != "voidbot"
&& target.daemon_id != "yggdrasil-voidbot"));
}
#[test]
fn starfire_and_nightwing_muninn_restart_when_health_publication_is_missing() {
let options = SwarmOptions {

View file

@ -12,14 +12,17 @@ $deployScriptsWithoutIdunnGuard = @(
$IdunnDeploymentTargets |
Where-Object { $_.Status -eq "enforced" -and -not [string]::IsNullOrWhiteSpace($_.Deploy) } |
Where-Object {
if ($_.Deploy -match '^sudo -n /usr/local/libexec/idunn-yggdrasil deploy [a-z0-9-]+$') {
return $false
}
-not (Test-Path -LiteralPath $_.Deploy) -or
-not ((Get-Content -Raw -LiteralPath $_.Deploy) -match 'IDUNN_ACTUATOR')
-not ((Get-Content -Raw -LiteralPath $_.Deploy) -match 'IDUNN_ACTUATOR')
}
)
$knownActuatorPaths = @{}
foreach ($target in $IdunnDeploymentTargets) {
foreach ($path in @($target.Deploy, $target.Restart) + @($target.Aliases)) {
if (-not [string]::IsNullOrWhiteSpace($path)) {
if (-not [string]::IsNullOrWhiteSpace($path) -and (Test-Path -LiteralPath $path)) {
$knownActuatorPaths[[System.IO.Path]::GetFullPath($path).ToLowerInvariant()] = $target.Id
}
}

View file

@ -70,19 +70,6 @@ $IdunnDeploymentTargets = @(
Aliases = @()
Reason = "Weksa provider state and health are daemon-owned CultMesh/CultNet records; local restart is an Idunn actuator only."
},
[pscustomobject]@{
Id = "voidbot"
Repo = "VoidBot"
LocalPath = "E:\Projects\VoidBot"
Host = "starfire"
Service = "VoidBot local stack"
Status = "runtime-enforced"
Health = "daemon-published-rudp:voidbot.cultnet-rudp-stack-health"
Deploy = $null
Restart = "$repoRoot\scripts\restart-voidbot.cmd"
Aliases = @()
Reason = "VoidBot stack health and provider state publish through daemon-owned CultMesh/CultNet records; restart is an Idunn actuator only."
},
[pscustomobject]@{
Id = "starfire-muninn"
Repo = "Odin"
@ -166,6 +153,24 @@ $IdunnDeploymentTargets = @(
ZeroDowntime = "restart-required"
Reason = "Nightwing framebuffer compositor has a committed artifact manifest and automatic Idunn deploy lane."
},
[pscustomobject]@{
Id = "yggdrasil-voidbot"
Repo = "VoidBot"
LocalPath = "/srv/build/VoidBot"
Host = "yggdrasil"
Service = "voidbot.service"
Status = "enforced"
Health = "daemon-published-rudp:voidbot.cultnet-rudp-stack-health"
Deploy = "sudo -n /usr/local/libexec/idunn-yggdrasil deploy voidbot"
Restart = "sudo -n /usr/local/libexec/idunn-yggdrasil restart voidbot"
Aliases = @()
UpstreamRemote = "origin"
UpstreamBranch = "main"
RolloutStrategy = "restart-after-verified-build"
StateMigration = "daemon-owned-noop"
ZeroDowntime = "restart-required"
Reason = "Yggdrasil-local Idunn deploys upstream VoidBot releases through the narrow root-owned manifest; local checkouts have no deployment authority."
},
[pscustomobject]@{
Id = "yggdrasil-bifrost"
Repo = "Bifrost"

View file

@ -20,6 +20,14 @@ case "$action:$target" in
restart:streampixels)
docker compose -f "$compose" restart streampixels-service streampixels-web
;;
deploy:voidbot|restart:voidbot)
manifest="/srv/odin/deploy-manifests/voidbot"
if [ ! -x "$manifest" ] || [ ! -O "$manifest" ]; then
echo "root-owned executable deploy manifest is not installed: $manifest" >&2
exit 1
fi
exec "$manifest" "$action"
;;
deploy:heimdall|deploy:repixelizer|deploy:streampixels)
manifest="/srv/odin/deploy-manifests/$target"
if [ ! -x "$manifest" ] || [ ! -O "$manifest" ]; then

View file

@ -1,10 +0,0 @@
@echo off
if not "%IDUNN_ACTUATOR%"=="1" (
echo restart-voidbot.cmd is an Idunn actuator body. Redeploy by poking Idunn; direct service restart is not an owned path. 1>&2
exit /b 1
)
if /I not "%IDUNN_COMMAND_AUTHORITY%"=="idunn-daemon" (
echo restart-voidbot.cmd is an Idunn actuator body. Redeploy by poking Idunn; direct service restart is not an owned path. 1>&2
exit /b 1
)
powershell.exe -NoProfile -ExecutionPolicy Bypass -File E:\Projects\VoidBot\scripts\start-voidbot-stack.ps1

View file

@ -52,10 +52,10 @@ instead of building one more private watchdog.
## Current State
Idunn is a Rust daemon inside Odin's Cargo workspace. The live local runtime is
one long-lived `idunn.exe` process that owns the whole Starfire-local swarm:
Odin, local adjunct daemons, the Yggdrasil deploy lanes, and the Nightwing
display services. Each target declares a daemon-owned health contract and keeps
Idunn is a Rust daemon inside Odin's Cargo workspace. Starfire and Yggdrasil
run separate host-local swarm profiles. Starfire owns its local adjunct daemons
and remote display/telemetry lanes. Yggdrasil owns its hosted release targets,
including VoidBot. Each target declares a daemon-owned health contract and keeps
its own interval and deploy/restart authority. Daemon truth comes from typed
CultNet/RUDP publication and daemon-owned boundary stores. Shell scripts remain
deployment, restart, and manual diagnostic lowerings only; they do not satisfy
@ -63,6 +63,14 @@ health.
The scheduler and continuity witness now belong to one Rust process instead of
a PowerShell-herded pile of one-daemon workers.
VoidBot deployment authority is deliberately absent from `starfire-local`.
Pushing VoidBot's upstream `main` branch is the release input; Yggdrasil-local
Idunn observes `/srv/build/VoidBot` and invokes only
`sudo -n /usr/local/libexec/idunn-yggdrasil deploy voidbot`. The privileged
actuator delegates deploy and restart to the root-owned executable
`/srv/odin/deploy-manifests/voidbot`. A developer checkout is not a deployment
target and agents must not create a local keepalive or deploy path for VoidBot.
```text
scratch/idunn/idunn.keepalive.cc
```
@ -126,6 +134,12 @@ To run the built-in Starfire-local swarm profile directly:
npm run idunn:start -- --swarm-profile starfire-local --repo-root E:\Projects\Odin --execute
```
The Yggdrasil service runs the hosted profile directly:
```sh
/usr/local/bin/idunn --swarm-profile yggdrasil-local --repo-root /srv/odin/source --store /var/lib/gamecult/idunn/yggdrasil.keepalive.cc --rudp-health-bind 10.77.0.1:17870 --execute
```
Optional store override:
```powershell