fix(1e): HC1 upgrade/restore tier calls now pass head_ref (multi-line edit miss)

Earlier perl substitution missed the multi-line upgrade and restore run_lifecycle_tier calls (still
passed `target` = VERSION env, None for !testme runs), so perform_upgrade got head_ref=None for
upgrade tier → re-checkout skipped → chaos redeploy of leftover prev checkout (vacuous prev→prev that
'passed' via the chaos-label move fallback).

Verified e2e on hedgedoc (install,upgrade; commit pending push):
  upgrade→PR-head: head_ref=09bf4d54 chaos-version=09bf4d54 version=3.0.9+1.10.7→3.0.10+1.10.8
deploy-count=1, install/upgrade=pass, clean teardown. The chaos-version label deterministically
matches head_ref — direct proof PR-head code was deployed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-28 04:04:13 +01:00
parent 1a9632c2e8
commit 74725610ab
5 changed files with 192 additions and 89 deletions

View File

@ -377,7 +377,7 @@ def main() -> int:
if "upgrade" in stages:
results["upgrade"] = (
run_lifecycle_tier(
recipe, "upgrade", repo_local, domain, meta, target, op_state
recipe, "upgrade", repo_local, domain, meta, head_ref, op_state
)
if prev
else "skip" # only one published version → nothing to upgrade from
@ -394,7 +394,7 @@ def main() -> int:
if "restore" in stages:
results["restore"] = (
run_lifecycle_tier(
recipe, "restore", repo_local, domain, meta, target, op_state
recipe, "restore", repo_local, domain, meta, head_ref, op_state
)
if backup_cap
else "skip"