Skip to content

The agent that grows with you

ci: route the remaining update-path files to every suite that exercises them (m11)

Tekniumf46974992239
diff --git a/scripts/ci/classify_changes.py b/scripts/ci/classify_changes.py
index 60b738793db..6665773aed5 100644
--- a/scripts/ci/classify_changes.py
+++ b/scripts/ci/classify_changes.py
@@ -140,7 +140,10 @@ _DESKTOP_UPDATER_FILES = {
"apps/desktop/electron/managed-ssh-update.ts",
# The other half of the marker / result contract the script implements.
"apps/desktop/electron/update-marker.ts",
+ "apps/desktop/electron/update-marker-gate.ts", # the gate's live-marker probe
"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",
# Python the script runs: the post-update verify and the staged app swap.
"hermes_cli/desktop_update_verify.py",
"hermes_cli/main_desktop.py",
@@ -204,6 +207,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",)
# 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
@@ -242,6 +248,7 @@ _UPDATE_PIPELINE = (
"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
@@ -415,6 +422,9 @@ _E2E_LANES: dict[str, tuple[str, ...]] = {
# Imported by the Desktop build's scripts (scripts/build/desktop.mjs closure).
"apps/desktop/product-identity.cjs",
"scripts/msix-shared.mjs",
+ # The launchers the Desktop relaunches through reach the launch-time repair first.
+ "hermes_cli/_launchers.py",
+ *_TAURI_UPDATE_MARKER,
),
}
# 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.py
index 7f5a576b928..5d7f3c14a55 100644
--- a/tests/ci/test_update_ci_routing.py
+++ b/tests/ci/test_update_ci_routing.py
@@ -247,6 +247,34 @@ def test_update_owner_change_dispatches_its_suites_end_to_end(path, lanes):
assert all(reached.values()), f"{path}: {lane}=true never reaches {reached}"
+# Review R6 m11: update-path files whose suites the classifier left off. Some land in a sibling
+# PR of the update stack (update-marker-gate.ts), so the table routes paths, not files on disk.
+_R6_CASES = {
+ # The Desktop gate's marker reader: the hand-off script's contract (desktop_updater) and the
+ # Desktop update E2E that drives the gate.
+ "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 launchers reach the launch repair: the Desktop update relaunches through them too.
+ "hermes_cli/_launchers.py": ("e2e_upgrade", "e2e_desktop_update"),
+}
+
+
[email protected]("path,lanes", list(_R6_CASES.items()))
+def test_update_path_change_selects_every_suite_that_exercises_it(path, lanes):
+ classified = _real_classifier([path])
+ run = _ci_run(classified)
+ for lane in lanes:
+ assert classified[lane], f"{path}: classifier leaves {lane} off"
+ if lane.startswith("e2e"):
+ reached = _consumers_reached(run, lane)
+ assert all(reached.values()), f"{path}: {lane}=true never reaches {reached}"
+ if lane == "desktop_updater":
+ assert _windows_desktop_updater_tests_selected(run), f"{path}: desktop_updater never reaches its tests"
+
+
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")