diff --git a/runner/harness/generic.py b/runner/harness/generic.py index 60a0057..b714a33 100644 --- a/runner/harness/generic.py +++ b/runner/harness/generic.py @@ -163,7 +163,14 @@ def assert_upgraded(domain: str, meta: dict) -> None: "PR-head checkout (the code under test was not exercised by the upgrade)" ) # chaos-version is an abbreviated commit (e.g. '8a026066'); head_ref may be full or short. - assert head_ref.startswith(chaos) or chaos.startswith(head_ref), ( + # abra appends a working-tree-state marker (e.g. '+U' = untracked file present) to the + # chaos-version when a cc-ci DEPLOY OVERLAY sits in the recipe checkout as an untracked file + # (e.g. ghost's compose.ccci-health.yml, provided by install_steps). That marker is NOT part + # of the commit identity — strip it before the HC1 commit match. HC1 is preserved: the + # underlying COMMIT must still equal head_ref; a stale prev-checkout chaos redeploy would + # stamp prev's commit (also '+U' if overlaid) and STILL not match head_ref after stripping. + chaos_commit = chaos.split("+", 1)[0] + assert head_ref.startswith(chaos_commit) or chaos_commit.startswith(head_ref), ( f"{domain}: upgrade deployed chaos commit {chaos!r}, not the intended PR-head " f"{head_ref[:12]!r} — the re-checkout to the code under test failed, so the upgrade is " "not exercising the PR's changes (HC1)"