The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(update): CI routes each update-path file to the suites that exercise it
Tekniumae91994515f3
diff --git a/scripts/ci/classify_changes.py b/scripts/ci/classify_changes.pyindex 83520cfc911..67096589bf0 100644--- a/scripts/ci/classify_changes.py+++ b/scripts/ci/classify_changes.py@@ -144,6 +144,9 @@ _DESKTOP_UPDATER_FILES = {"apps/desktop/electron/handoff-result.ts",# Stops a remote backend for the update the hand-off script then runs."apps/desktop/electron/remote-lifecycle.ts",+ # The SSH remote's marker judge/gate programs: marker.sh/marker.ps1's contract, run remotely.+ "apps/desktop/electron/remote-update-marker-programs.ts",+ "apps/desktop/electron/remote-update-marker-programs.test.ts",# Python the script runs: the post-update verify and the staged app swap."hermes_cli/desktop_update_verify.py","hermes_cli/main_desktop.py",@@ -208,9 +211,9 @@ _DESKTOP_E2E_SHARED = ("apps/desktop/e2e/fix-electron-tracing","apps/desktop/e2e/run-tmp",)-# The Tauri updater's claim on the update marker (the same A7 contract every updater honours,-# and the held-checkout rule the real-update suites kill-test).-_TAURI_UPDATE_MARKER = ("apps/bootstrap-installer/src-tauri/src/marker.rs",)+# The Tauri updater (update.rs, its marker claim marker.rs, the paths.rs both resolve) is+# compiled and tested by ``cargo test`` alone (the ``rust`` lane, via ``.rs``): no slow lane+# builds the bootstrap installer, so none of the three starts one.# What `hermes update` runs outside the update_* module family: the steps of the# pipeline (entry, lock, early recovery, completion tail, launchers, fleet# restart/verify, Windows pause/resume) and the lock / marker / recovery state@@ -244,16 +247,13 @@ _UPDATE_PIPELINE = ("hermes_cli/gateway_supervised_restart.py","hermes_bootstrap.py", # every launch's prepare_launch"hermes_constants.py", # root home = update marker location- # Prefix: status.py (code_sha stamp the fleet verify reads) and its status_*- # siblings (the Windows pause matches gateway argv with status_inline_source).- "gateway/status",+ "gateway/status.py", # code_sha stamp the fleet verify reads"gateway/control_socket.py", # pause-for-update verb"gateway/code_skew.py","gateway/host_rendezvous.py","gateway/shutdown_forensics.py","gateway/restart.py","scripts/desktop-update/", # the hand-off scripts run `hermes update`- *_TAURI_UPDATE_MARKER,)# Selectors are owned by the import graph, not remembered. The update# transaction's own modules (what `hermes update` and the launch-time completion@@ -438,7 +438,9 @@ _E2E_LANES: dict[str, tuple[str, ...]] = {"scripts/msix-shared.mjs",# The launchers the Desktop relaunches through reach the launch-time repair first."hermes_cli/_launchers.py",- *_TAURI_UPDATE_MARKER,+ # The backend's /api/health `commit`, which host-backend-attach compares to the+ # checkout before attaching to a running backend after an update.+ "hermes_cli/web_routers/status.py",),}# The upgrade journeys are their own lane; editing one does not start ``e2e``.diff --git a/tests/ci/test_update_ci_routing.py b/tests/ci/test_update_ci_routing.pyindex f440cb426dc..c8552da5cda 100644--- a/tests/ci/test_update_ci_routing.py+++ b/tests/ci/test_update_ci_routing.py@@ -287,8 +287,8 @@ _R6_CASES = {"apps/desktop/electron/update-marker-gate.ts": ("desktop_updater", "e2e_desktop_update"),# Stops the backend before a remote update: typecheck/vitest and the hand-off script tests."apps/desktop/electron/remote-lifecycle.ts": ("frontend", "desktop_updater"),- # The Tauri updater's marker claim: cargo and the real-update suites it gates.- "apps/bootstrap-installer/src-tauri/src/marker.rs": ("rust", "e2e_upgrade", "e2e_desktop_update"),+ # The Tauri updater's marker claim: cargo, the only CI that builds it (review CI3).+ "apps/bootstrap-installer/src-tauri/src/marker.rs": ("rust",),# The launchers reach the launch repair: the Desktop update relaunches through them too."hermes_cli/_launchers.py": ("e2e_upgrade", "e2e_desktop_update"),}@@ -307,6 +307,40 @@ def test_update_path_change_selects_every_suite_that_exercises_it(path, lanes):assert _windows_desktop_updater_tests_selected(run), f"{path}: desktop_updater never reaches its tests"+# Review CI2/CI3: update-path files the classifier sent to the wrong suites.+_CI3_CASES = {+ # /api/health `commit`: host-backend-attach compares it before attaching after an update.+ "hermes_cli/web_routers/status.py": ("python", "e2e_desktop_update"),+ # The SSH remote's marker judge/gate: typecheck/vitest and the marker contract's script tests.+ "apps/desktop/electron/remote-update-marker-programs.ts": ("frontend", "desktop_updater"),+ "apps/desktop/electron/remote-update-marker-programs.test.ts": ("frontend", "desktop_updater"),+}++[email protected]("path,lanes", list(_CI3_CASES.items()))+def test_update_path_change_reaches_the_suites_that_consume_it(path, lanes):+ test_update_path_change_selects_every_suite_that_exercises_it(path, lanes)+++_TAURI_UPDATER = tuple(f"apps/bootstrap-installer/src-tauri/src/{name}.rs" for name in ("marker", "update", "paths"))++[email protected]("path", _TAURI_UPDATER)+def test_tauri_updater_routes_as_one_unit_to_the_lane_that_builds_it(path):+ """No slow lane builds the bootstrap installer: starting one for its updater runs nothing of it."""+ assert (_REPO / path).is_file(), f"{path} moved: update this table"+ classified = _real_classifier([path])+ assert classified["rust"], f"{path}: cargo test never runs"+ started = [lane for lane in ("e2e", "e2e_upgrade", "e2e_desktop_update", "e2e_desktop_core") if classified[lane]]+ assert not started, f"{path}: starts {started}, which never build the Tauri installer"+++def test_gateway_status_routing_names_the_stamp_not_its_prefix_siblings():+ assert _real_classifier(["gateway/status.py"])["e2e_upgrade"]+ assert not _real_classifier(["gateway/status_phrases.py"])["e2e_upgrade"], \+ "status_phrases.py (turn-status wording) is not on the update path"++def test_every_detect_output_a_lane_sets_is_consumed_by_some_job():"""A lane output nothing reads is a lane that can never run anything."""ci = _yaml(".github/workflows/ci.yaml")