Phase 12.L.E.6 — Linux HealthcheckRetries env var (Windows J.E.5 parity) + healthz responder seam
Summary
Linux production-hardening parity with Windows J.E.5. Adds operator-tunable healthcheck poll count + a python3 healthz responder seam in the test service, paving the way for J.L.E.7's first Linux full lifecycle test.
Why narrowed scope (not full lifecycle yet)
Linux full lifecycle requires:
- Working healthz endpoint (otherwise .sh always rolls back at 90s healthz timeout)
- Tarball with proper structure (
Squid.Tentacle+version.txt) - BuildV2BundleTarGz helper in LinuxLifecycleContext
Each piece is independently small but together = larger PR. This PR delivers the production hardening + healthz seam; J.L.E.7 layers on the lifecycle test.
Production changes
| File | Change |
|---|---|
LinuxTentacleUpgradeStrategy.cs |
New HealthcheckRetriesEnvVar (Rule 8) + DefaultHealthcheckRetries=90 + ResolveHealthcheckRetries() + {{HEALTHCHECK_RETRIES}} placeholder |
upgrade-linux-tentacle.sh |
HEALTHCHECK_RETRIES={{HEALTHCHECK_RETRIES}} + loop uses seq 1 "$HEALTHCHECK_RETRIES"
|
squid-linux-test-service.sh |
Optional python3 healthz responder gated on SQUID_TEST_SERVICE_HEALTHZ=1 env var |
Unit tests (5 new + 1 drift updated)
- Rule 8 const pin
- Default returns 90 (preserves pre-PR behaviour)
- Theory valid: 1 / 180 / 3600 / whitespace
- Theory invalid: 0 / -1 / "90s" / non-numeric / empty → fallback
- Substitution + variable-reference reverse-pin
- Default render injects 90
- Drift detector updated (9 placeholders)
Local verification
5068+ unit tests pass (85 Linux strategy tests now). 7/7 Linux E2E pass (3 cross-platform run, 4 Linux-only skip).
Next (J.L.E.7)
First Linux full lifecycle test (E1.h-Linux). Consumes retries=1 + SQUID_TEST_SERVICE_HEALTHZ=1 to run REAL Phase A + Phase B + healthz against real systemd. Expected to surface remaining production .sh bugs (analogous to J.E.3.1's 3 Windows P0s).