Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions draft/progress.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,3 +210,22 @@
- Run reached terminal FAILURE before plan generation or any build. Checkout credential removal failed with `fatal: No url found for submodule path 'omnibioai-tool-runtime' in .gitmodules`, Git exit 128. Selection job `111517949752`; native matrix skipped, zero actual native entries/OCI/SIF builds. Reconciliation checkout failed for the same cause. Zero GHCR writes/publications.
- Deterministically reproduced the exact `git submodule foreach --recursive true` failure locally. Existing gitlink is already pinned to `a4f3da56c2e6e9fd85e54ba009f6f3456de3b5b5`; the frozen workflow independently identifies its repository as OmniBioAI/omnibioai-tool-runtime. Added only the missing `.gitmodules` path/URL registration; gitlink SHA and frozen factory are unchanged. The same command now exits zero, without fetching or executing submodule code.
- Added static checkout registration regression. Full suite **8,393 PASS / 13 SKIP / 0 FAIL**, Ruff/actionlint/diff checks PASS. This source-metadata repair must pass fresh remote CI before a fresh-source validation run; failed run history is not rewritten or rerun. Evidence retained at `~/omnibioai-native-validation-evidence/run-37230154387.json`.

### Fresh-source native validation — 2026-10-04

- PR #13 exact head `6cf5af6698abe16d22c70431ee80620f90f3316d` passed remote CI `37230480205` and merged as `df4db5ffaa5022354bf68d737569213d98671370`.
- Native-only run [37230822914](https://github.com/OmniBioAI/omnibioai-tool-images/actions/runs/37230822914) is running at that exact source. Checkout and plan generation passed; all fourteen native matrix entries are present. Initial amd64/arm64 jobs are installing tooling; no native PASS claimed yet.
- Scope remains seven static-ready tools; 594 contracts blocked. Zero publications/GHCR writes. All fourteen entries plus reconciliation must pass before publication eligibility.

### Native run 37230822914 terminal result — status audit

- Run completed FAILURE. Selection/checkout passed; all fourteen native matrix jobs reached terminal FAILURE, and reconciliation correctly failed closed. Zero successful native entries.
- Downloaded all run artifacts outside the repositories to `~/omnibioai-native-validation-evidence/run-37230822914/`. Every entry failed command 007: the first OCI runtime architecture probe through micromamba.
- Shared exact cause in all fourteen stderr files: micromamba attempts to create `/root/.cache/mamba/proc` under the intentionally read-only container filesystem, then exits with a filesystem error. This is a validation-runtime cache configuration blocker, not evidence that scientific smoke or version gates passed or failed.
- No publication/GHCR write path exists in this workflow. Publication remains blocked; frozen factory unchanged. Next engineering step is a narrowly scoped writable ephemeral cache configuration, preserving read-only rootfs and network isolation, followed by regression testing before any fresh-source validation.

### Ephemeral micromamba cache repair — 2026-10-04

- Confirmed upstream micromamba 1.5.8 `run.cpp` uses `user_cache_dir()/proc`; `environment.cpp` reads `XDG_CACHE_HOME` before falling back to the home cache. Runtime invocations now explicitly set `XDG_CACHE_HOME=/tmp/omnibioai-validation-cache` in Docker and Apptainer.
- Docker retains read-only rootfs, network none, writable isolated /tmp tmpfs and read-only fixtures. Apptainer retains cleanenv, containall, network none and no writable image/overlay; explicit container environment avoids leaking host cache settings. No Dockerfile, scientific contract, package pin or frozen factory file changed.
- Four new OCI/SIF × amd64/arm64 argument regressions assert exact temporary cache, host-cache exclusion, environment activation and retained isolation. Adapter **159 PASS**; full repository **8,397 PASS / 13 SKIP / 0 FAIL**. Ruff/actionlint PASS; native execution remains unproven until fresh-source run passes.
7 changes: 5 additions & 2 deletions scripts/contract_native_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,16 @@ def smoke_result(contract: dict, repo: Path, work: Path, result: dict) -> dict:


def runtime_argv(phase: str, artifact: str, arch: str, work: Path, fixtures: Path, argv: list[str]) -> list[str]:
# micromamba run writes process bookkeeping below XDG_CACHE_HOME/mamba/proc.
# Keep it in isolated writable /tmp, never the image's read-only /root cache.
cache_environment = "XDG_CACHE_HOME=/tmp/omnibioai-validation-cache"
if phase == "oci":
prefix = ["docker", "run", "--rm", "--platform", f"linux/{arch}", "--network", "none", "--read-only",
"--tmpfs", "/tmp:rw", "--user", "0:0", "--volume", f"{work}:/work:rw",
"--tmpfs", "/tmp:rw", "--env", cache_environment, "--user", "0:0", "--volume", f"{work}:/work:rw",
"--volume", f"{fixtures}:/work/validation-contracts/fixtures:ro", "--workdir", "/work",
"--entrypoint", "micromamba", artifact]
elif phase == "sif":
prefix = ["sudo", "apptainer", "exec", "--cleanenv", "--containall", "--net", "--network", "none",
prefix = ["sudo", "apptainer", "exec", "--cleanenv", "--containall", "--env", cache_environment, "--net", "--network", "none",
"--bind", f"{work}:/work:rw", "--bind", f"{fixtures}:/work/validation-contracts/fixtures:ro",
"--pwd", "/work", artifact, "micromamba"]
else:
Expand Down
21 changes: 21 additions & 0 deletions tests/test_contract_native_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,27 @@ def test_argv_boundaries_and_network(tmp_path):
assert any(value.endswith(":ro") for value in argv)


@pytest.mark.parametrize("phase", ["oci", "sif"])
@pytest.mark.parametrize("arch", ["amd64", "arm64"])
def test_micromamba_cache_is_ephemeral_without_relaxing_isolation(phase, arch, tmp_path, monkeypatch):
# A host setting must not leak into --cleanenv SIF execution or Docker.
monkeypatch.setenv("XDG_CACHE_HOME", "/unsafe/host-cache")
command = ["uname", "-m"]
argv = native.runtime_argv(phase, "artifact", arch, tmp_path / "work", tmp_path / "fixtures", command)
assert argv.count("--env") == 1
assert argv[argv.index("--env") + 1] == "XDG_CACHE_HOME=/tmp/omnibioai-validation-cache"
assert "/unsafe/host-cache" not in " ".join(argv)
assert argv[argv.index("--network") + 1] == "none"
assert f"{tmp_path / 'fixtures'}:/work/validation-contracts/fixtures:ro" in argv
assert argv[-6:] == ["run", "--no-capture-output", "--prefix", "/opt/conda", *command]
if phase == "oci":
assert "--read-only" in argv
assert argv[argv.index("--tmpfs") + 1] == "/tmp:rw"
else:
assert "--cleanenv" in argv and "--containall" in argv
assert "--writable" not in argv and "--writable-tmpfs" not in argv


@pytest.fixture
def repo_copy(tmp_path):
root = tmp_path / "repo"
Expand Down
Loading