Skip to content

Phase 12.L.E.7 — first Linux full lifecycle (E1.h-Linux happy path)

Summary

🎯 The Linux milestone. First high-fidelity end-to-end test driving the production upgrade-linux-tentacle.sh through Phase A + Phase B + healthz + swap + restart against REAL systemd + bash + python3 healthz responder + LocalReleaseMirror tar.gz.

Mirrors Windows J.E.3 E1.h structure exactly. Expected to surface remaining production .sh bugs (analogous to J.E.3.1's 3 Windows P0s — the ArgumentList bug from J.L.E.3 was the first one).

New infrastructure

Artifact Role
LinuxLifecycleContext.BuildV2BundleTarGz Hand-rolled multi-entry POSIX ustar + gzip. Bundle: Squid.Tentacle placeholder + script + version.txt
LinuxLifecycleContext.RenderProductionScriptForVersion Sets HEALTHCHECK_RETRIES=1 (cuts 90s wait → 1s)
LinuxServiceFixture.InstallAndStart New optional extraEnvironment dict — adds Environment=KEY=VALUE lines to systemd unit. Used to enable SQUID_TEST_SERVICE_HEALTHZ=1 for full lifecycle

New E2E test

E1h_FullLifecycle_HappyPath_WritesSuccessAndSwapsBinary:

  1. v1 service running with healthz responder
  2. v2 tarball staged at mirror
  3. Run .sh end-to-end
  4. Phase A: download → extract → systemd-run --scope handoff
  5. Phase B: mv swap → chmod/symlink → systemctl restart → healthz curl OK → SUCCESS

Assertions (with 4 reverse-asserts on different failure exit codes pointing at specific layers):

  • exit 0
  • last-upgrade.json: SUCCESS / target version / tarball method
  • Marker swapped from "1.0.0" to "2.0.0"
  • systemctl is-active returns true

Local verification (macOS)

8/8 pass: 3 cross-platform run, 5 Linux-only skip-guard. Real Linux runner verification on this PR.

Expected Linux runner outcomes

May surface bugs (J.E.3.1 found 3 Windows P0s; J.L.E.3 found 1 Linux ArgumentList bug). Detailed customMessages + reverse-asserts on multiple exit codes will point directly at the failing layer.

🤖 Generated with Claude Code

Merge request reports

Loading