The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
ci: the Windows update E2E fails when the crash journey ran no cells
Teknium448add284ab0
diff --git a/.github/workflows/windows-install-update-e2e.yml b/.github/workflows/windows-install-update-e2e.ymlindex 06344679624..8e23e667b37 100644--- a/.github/workflows/windows-install-update-e2e.yml+++ b/.github/workflows/windows-install-update-e2e.yml@@ -88,6 +88,20 @@ jobs:OPENAI_API_KEY: ''NOUS_API_KEY: ''+ - name: Every crash cell ran+ # run_tests.sh passes a file whose tests were all deselected (pytest exit 5) or skipped,+ # so a lost marker or opt-in would run zero crash cells green. The crash journey writes+ # this manifest only when it ran (tests/e2e/core/windows_update/test_crash_cells.py).+ shell: pwsh+ env:+ HERMES_E2E_ARTIFACTS: ${{ runner.temp }}\win-update-e2e+ run: |+ $manifest = Join-Path $env:HERMES_E2E_ARTIFACTS 'crash-cells-ran.txt'+ if (-not (Test-Path -LiteralPath $manifest)) {+ throw "test_crash_cells.py ran no crash cells: $manifest is missing"+ }+ Get-Content -LiteralPath $manifest+- name: Upload transcripts, logs and receiptsif: always()uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1diff --git a/tests/ci/test_windows_update_crash_oracles.py b/tests/ci/test_windows_update_crash_oracles.pyindex bff205a6c14..9d7134367de 100644--- a/tests/ci/test_windows_update_crash_oracles.py+++ b/tests/ci/test_windows_update_crash_oracles.py@@ -200,6 +200,33 @@ def test_orphan_marker_guard_fires_once_the_fix_lands(monkeypatch):test_orphan_marker_wrapper_expires_once_its_fix_is_in_the_tree()+# Review 5411223855 (F52): a runtime proof the crash file ran, beside the static selection check+# above: a lost opt-in env or any other zero-execution path also exits 0 per file.+def test_workflow_requires_the_crash_journey_manifest(tmp_path, monkeypatch):+ from tests.ci import workflow_steps++ yaml = pytest.importorskip("hermes_yaml")+ wf = yaml.safe_load((_REPO / ".github/workflows/windows-install-update-e2e.yml").read_text(encoding="utf-8-sig"))+ steps = wf["jobs"]["install-update"]["steps"]+ names = [s.get("name") for s in steps]+ run, check = steps[names.index("Run Windows install + update E2E")], steps[names.index("Every crash cell ran")]+ assert names.index("Every crash cell ran") > names.index("Run Windows install + update E2E")+ workflow_steps.required(check, {"inputs": {}}) # neither disabled nor advisory+ assert check["env"]["HERMES_E2E_ARTIFACTS"] == run["env"]["HERMES_E2E_ARTIFACTS"]+ assert f"'{crash.CELLS_RAN_MANIFEST}'" in check["run"] and "throw" in check["run"]++ j = crash.Journey(_Machine(tmp_path))+ j.step("install", lambda: "ok")+ j.step("mid_fetch", lambda: (_ for _ in ()).throw(RuntimeError("boom")))+ monkeypatch.delenv("HERMES_E2E_ARTIFACTS", raising=False)+ crash._record_cells_ran(j)+ assert not list(tmp_path.rglob(crash.CELLS_RAN_MANIFEST))+ monkeypatch.setenv("HERMES_E2E_ARTIFACTS", str(tmp_path / "artifacts"))+ crash._record_cells_ran(j)+ assert (tmp_path / "artifacts" / crash.CELLS_RAN_MANIFEST).read_text(encoding="utf-8") == (+ "install: ok\nmid_fetch: failed\n")++# Review 5411223855 (crash-cell timing): while the hold filter blocks git, the op and index.lock# cannot move, so a starved runner must get more wall time, never fewer looks, before the verdict.def test_mid_git_hold_verdict_needs_looks_as_well_as_seconds(tmp_path, monkeypatch):diff --git a/tests/e2e/core/windows_update/test_crash_cells.py b/tests/e2e/core/windows_update/test_crash_cells.pyindex 438584c19f1..2e959e53ea8 100644--- a/tests/e2e/core/windows_update/test_crash_cells.py+++ b/tests/e2e/core/windows_update/test_crash_cells.py@@ -60,6 +60,7 @@ from __future__ import annotationsimport contextlibimport json+import osimport reimport shleximport shutil@@ -726,6 +727,21 @@ def _run_cells(machine, j: Journey, cells) -> None:previous = name+# run_tests.sh reports a file whose every test was deselected (pytest exit 5) or skipped as+# passed, so the workflow's "Every crash cell ran" step requires this manifest: the journey+# writes it only when it actually ran (review F52).+CELLS_RAN_MANIFEST = "crash-cells-ran.txt"+++def _record_cells_ran(j: Journey) -> None:+ artifacts = os.environ.get("HERMES_E2E_ARTIFACTS")+ if not artifacts:+ return+ Path(artifacts).mkdir(parents=True, exist_ok=True)+ lines = [f"{name}: {'ok' if j.ok(name) else 'failed'}" for name in j.results]+ (Path(artifacts) / CELLS_RAN_MANIFEST).write_text("\n".join(lines) + "\n", encoding="utf-8")++@pytest.fixture(scope="module")def journey(tmp_path_factory):with FakeLLMServer() as srv:@@ -754,6 +770,7 @@ def journey(tmp_path_factory):machine, srv, "mid-git-bootstrap", _cli_update(machine, "mid-git-bootstrap-update"),boot_hold.point, boot_hold, runtime_files=("hermes_bootstrap.py", *RUNTIME_FILES))),))+ _record_cells_ran(j)yield jfinally:machine.teardown()