feat(lab): install sealed component adapters

This commit is contained in:
DCCONSTRUCTIONS
2026-08-31 19:46:47 +03:00
parent 759830b054
commit 7b021782d3
11 changed files with 4545 additions and 14 deletions
+7 -5
View File
@@ -22,7 +22,10 @@ def test_eomt_tree_sealer_is_local_fixed_and_adapter_compatible() -> None:
assert '"tree-receipt.json"' in script
assert '"D:\\NDC_MISSIONCORE\\runtime"' in script
assert '"derived\\perception-e3-opencv413092-v1"' in script
assert '"cache\\perception-e3-models-v1"' in script
assert '"eomt-model-cache-cityscapes-large-1024-v1"' in script
assert "Install-SafeEomtModelCache" in script
assert 'New-Item -ItemType HardLink -Path $blobTarget -Target $source' in script
assert 'New-Item -ItemType HardLink -Path $snapshotTarget -Target $source' in script
assert '"derived\\perception-p0-env-v1"' in script
assert '"derived\\perception-p0-transformers4576-v1"' in script
assert '$Utf8.GetByteCount($component) -gt 255' in script
@@ -39,15 +42,14 @@ def test_eomt_tree_sealer_is_local_fixed_and_adapter_compatible() -> None:
assert "smb" not in lowered
def test_eomt_tree_sealer_has_atomic_commit_marker_and_no_rehash_fast_path() -> None:
def test_eomt_tree_sealer_has_atomic_commit_marker_and_rehashes_existing_seal() -> None:
script = SEALER_PATH.read_text(encoding="utf-8")
fast_path = script.split("function Test-ExistingSeal", maxsplit=1)[1].split(
"function New-SealedReceipt", maxsplit=1
)[0]
assert "-HashPayload:$false" in fast_path
assert "-HashPayload:$true" not in fast_path
assert "Get-FileDigest" not in fast_path
assert "-HashPayload:$true" in fast_path
assert "Assert-InventoryMatches $manifest.records $observed $Asset $false $true" in fast_path
publish = script.split("$manifestPath = Join-Path $Root $ManifestName", maxsplit=1)[1]
manifest_move = publish.index("[IO.File]::Move($stagedManifest, $manifestPath)")
@@ -0,0 +1,55 @@
from __future__ import annotations
from pathlib import Path
REPOSITORY_ROOT = Path(__file__).resolve().parents[1]
INSTALLER_PATH = (
REPOSITORY_ROOT
/ "experiments"
/ "perception"
/ "worker"
/ "observatory_portable"
/ "Install-LabV1PortableStaticAssets.ps1"
)
def test_lab_v1_static_installer_is_fixed_offline_and_content_addressed() -> None:
script = INSTALLER_PATH.read_text(encoding="utf-8")
assert '"D:\\NDC_MISSIONCORE\\runtime"' in script
assert '"staging\\observatory-lab-v1-static-v1"' in script
assert '"eomt-runner-bundle-v1"' in script
assert '"lab-v1-static-files-v1"' in script
assert "New-Item `\n -ItemType HardLink" in script
assert "Get-FileIdentity" in script
assert "tree-manifest.tsv" in script
assert "tree-receipt.json" in script
lowered = script.lower()
assert "invoke-webrequest" not in lowered
assert "start-bitstransfer" not in lowered
assert "docker " not in lowered
assert "ssh " not in lowered
assert "smb" not in lowered
def test_lab_v1_static_installer_seals_expected_exact_payloads() -> None:
script = INSTALLER_PATH.read_text(encoding="utf-8")
expected = {
"651e8e06c3912dffb036b7fd08f2c0623f7563d8306cc7aee05db562798518f4",
"01881862d4eaa218955f776a948124bf19c34be2b5ec282115daeacb15c53ae6",
"4dcc4fc8bdf33702651a199be69d0dd4fadb243d2e65aee1c3d1ae7a58fdf675",
"25baf30c0df564734e08f38ace88cc4bc147cacf240c761622279511e361daa4",
"ea583966bc3409f5cf563cbf4fad05e366907e67187082eb692aff53d9f5d875",
"b99c2838051bcd7b092fd3970aa62a77d5c0bbb809c9b9afb2ff4b0ebdaa4ee6",
"88ae319ba5a3877dd3ae0773f693a6a5fdc283934140de9dfaff029108aefd7f",
"b18ad60f277eea69a240a28f290611b94627fb9707faf1bb3e6e22102dad67c1",
"b75c4ac841d7b4bcc57f7a9c8417ca2317d8ecfa499e72a9af8a8591a2ec0d35",
"f2b69046b6a740fd9532d2d88e7fabae7c20fb662f783c9502adc9026406f352",
"a40cee06b7c6f69b6a09a11563dcfd237f3de833b1ccd31459e66692e528ba63",
}
assert all(digest in script for digest in expected)
assert "259419077" in script
assert "32877" in script
assert "1427" in script
File diff suppressed because it is too large Load Diff
@@ -552,7 +552,11 @@ def test_component_adapter_images_are_thin_offline_wrappers() -> None:
).read_text(encoding="utf-8")
assert "FROM nvcr.io/nvidia/tritonserver:26.06-py3@sha256:" in eomt
assert "FROM ndc/mission-core-lab-v1-goose:sg3.2.0-cu117-v1" in ddrnet
assert (
"FROM sha256:"
"591cb382c099eeb05e7ec16e2371e0b2da54d2bb5c49ec0f4ac88dbf72b0f0cd"
in ddrnet
)
assert "COPY portable_lab_v1_component_adapter.py" in eomt
assert "COPY portable_lab_v1_component_adapter.py" in ddrnet
assert 'ENTRYPOINT ["python3"]' in eomt