fix(worker): deploy persistent runtime companions

This commit is contained in:
DCCONSTRUCTIONS
2026-07-29 14:57:34 +03:00
parent 9db39347bd
commit 611853d3af
6 changed files with 193 additions and 24 deletions
+46
View File
@@ -0,0 +1,46 @@
from pathlib import Path
REPOSITORY_ROOT = Path(__file__).resolve().parents[1]
def test_persistent_launcher_deploys_required_docker_names_companion() -> None:
deployment = (
REPOSITORY_ROOT
/ "deploy"
/ "telemetry-plane"
/ "telegraf"
/ "Update-NdcMissionCorePersistentLauncher.ps1"
).read_text(encoding="utf-8")
launcher = (
REPOSITORY_ROOT
/ "experiments"
/ "perception"
/ "worker"
/ "Invoke-E15PersistentShadowRun.ps1"
).read_text(encoding="utf-8")
assert '. (Join-Path $PSScriptRoot "MissionCoreDockerNames.ps1")' in launcher
assert "[string]$DockerNamesCandidate" in deployment
assert "[string]$ExpectedDockerNamesSha256" in deployment
assert "[string]$ExpectedDockerNamesPredecessorSha256" in deployment
assert '$dockerNamesPredecessor = if ($hadDockerNames)' in deployment
assert "Copy-Item -LiteralPath $DockerNamesCandidate" in deployment
assert "Remove-Item -LiteralPath $dockerNamesTarget" in deployment
def test_perception_runner_deploys_required_runtime_companion() -> None:
deployment = (
REPOSITORY_ROOT
/ "deploy"
/ "telemetry-plane"
/ "telegraf"
/ "Update-NdcMissionCorePerceptionRunner.ps1"
).read_text(encoding="utf-8")
assert "[string]$RuntimeCandidate" in deployment
assert "[string]$ExpectedRuntimeSha256" in deployment
assert "[string]$ExpectedRuntimePredecessorSha256" in deployment
assert '$runtimeTarget = Join-Path $RunnerRoot "e15_shadow_runtime.py"' in deployment
assert "Copy-Item -LiteralPath $RuntimeCandidate" in deployment
assert "Copy-Item -LiteralPath $runtimeBackup" in deployment
assert "RuntimeCandidateSha256" in deployment