Own the patched runsc artifact and bind recovery identity

This commit is contained in:
ms2k 2026-07-26 18:01:03 +09:00
commit 2c420012bd

View file

@ -382,6 +382,7 @@ class VerificationTests(unittest.TestCase):
self.assertIn(
'"$(dirname "$0")/materialize-fuser" --test-dependencies', entrypoint
)
self.assertIn('"$(dirname "$0")/materialize-runsc"', entrypoint)
self.assertIn(
"uv run --python '>=3.11' --no-project --offline "
"--no-python-downloads --no-cache python3",
@ -404,6 +405,25 @@ class VerificationTests(unittest.TestCase):
[f".lazaret/vendor/fuser-{fuser['version']}"],
)
def test_runsc_materializer_and_install_identity_are_exact(self) -> None:
build_id = "904ab3c9bd4c99a27181076f2c9ea2fecc041db5a728c999540d6664174d2cd4"
materializer = (ROOT / "tools/materialize-runsc").read_text()
installer = (ROOT / "tools/install-to-host").read_text()
runtime = (ROOT / "crates/lazaret-runtime-supervisor/src/sandbox.rs").read_text()
self.assertIn(
"revision=9f8f6c917885d9ef3d84c17280939c012dea0dfe", materializer
)
self.assertIn(f"build_id={build_id}", materializer)
self.assertIn(f"runsc_build_id={build_id}", installer)
self.assertIn(f'"lazaret-runsc-{build_id}"', runtime)
self.assertIn("cmp --silent", installer)
self.assertTrue(
(ROOT / "patches/gvisor-9f8f6c917-directory-handles.patch").is_file()
)
self.assertTrue(
(ROOT / "patches/gvisor-9f8f6c917-MODULE.bazel.lock").is_file()
)
def test_workspace_tests_use_nextest_and_cargo_retains_doctests(self) -> None:
source = (ROOT / "tools/lazaret_verify.py").read_text()
expected = [