fix: compose named cockpit modes from capabilities

This commit is contained in:
vee
2026-09-07 20:52:19 +08:00
parent cf9b89508c
commit 6b2b644ee6
23 changed files with 2917 additions and 124 deletions
+9 -1
View File
@@ -47,8 +47,13 @@ def test_compose_provides_a_writable_codex_home_and_fast_defaults() -> None:
"../../artifacts/server:/app/artifacts/server",
"../../artifacts/tmp:/app/artifacts/tmp",
"../../artifacts/self-repair:/app/artifacts/self-repair",
"../../artifacts/mode-profiles:/app/artifacts/mode-profiles",
):
assert writable_mount in web["volumes"]
assert not any(
str(mount).endswith(":/app/config/modes/vehicles/denza_n7/user")
for mount in web["volumes"]
)
assert "codex_home" in compose["volumes"]
assert web["read_only"] is True
assert web["user"] == "10001:10001"
@@ -57,6 +62,9 @@ def test_compose_provides_a_writable_codex_home_and_fast_defaults() -> None:
def test_deployment_prepares_non_root_bind_mounts_and_checks_codex_readiness() -> None:
dockerfile = (ROOT / "deploy/server/Dockerfile").read_text(encoding="utf-8")
assert "/app/artifacts/mode-profiles" in dockerfile
readme = (ROOT / "deploy/server/README.md").read_text(encoding="utf-8")
setup_block = readme.split("```bash", 1)[1].split("```", 1)[0]
writable_directories = (
@@ -65,7 +73,7 @@ def test_deployment_prepares_non_root_bind_mounts_and_checks_codex_readiness() -
"artifacts/server",
"artifacts/tmp",
"artifacts/self-repair",
"config/modes/vehicles/denza_n7/user",
"artifacts/mode-profiles",
)
assert "mkdir -p" in setup_block
assert "chown -R 10001:10001" in setup_block