Skip to content

Phase 12.L.E.1 — Linux E2E foundation + bash parse pin

Placeholder ppxd requested to merge phase12.L.E.1-linux-upgrade-lifecycle into main

Summary

Closes the largest audit gap from PR #201's deep review: pre-this-PR no test in the repo ran the rendered upgrade-linux-tentacle.sh through a real bash parser. The same bug class as the J.E.3.1 Windows {{INSTALL_METHODS}}-in-comment P0 could be sitting in the .sh today and nobody would know until the next operator-broken-upgrade incident.

This PR establishes the Linux E2E foundation. Subsequent phases (12.L.E.2+) will build full systemd-driven lifecycle tests on top.

Deliberately narrow scope (Rule 12.3 split-PR discipline)

  • Project structure + GHA workflow + 3 foundational tests
  • NO production code changes — pure additive scaffolding
  • NO systemd / fixture / full lifecycle yet — separate PRs

Foundation pieces

Artifact Role
Squid.LinuxTentacleE2ETests project Cross-platform compile, skip-on-non-Linux pattern, parity with Windows project
tentacle-linux-e2e.yml workflow Nightly + push-to-main + workflow_dispatch on ubuntu-latest
LinuxTentacleE2ECategories.UpgradeScript xUnit Trait pattern matching Windows
Squid.LinuxTentacleE2ETests added to InternalsVisibleTo Allows direct strategy method calls (no reflection)

3 foundational tests (Tier 🟢 high-fidelity)

  1. LinuxScript_PlaceholderSet_PinnedToProductionContract — drift detector. 8 placeholders incl. Linux-specific SERVICE_USER (Windows uses SYSTEM)
  2. LinuxScript_PlaceholderTokens_AppearExactlyOnceInTemplate — pins against the J.E.3.1 Windows P0 bug class on the Linux side
  3. LinuxScript_RenderedFromStrategy_ParsesCleanlyAsBash — belt-and-braces. Renders via production BuildScript, runs bash -n (parse-only). Catches multi-line substitution splicing into heredoc / string / case branch contexts that substring pins might miss

Local verification (macOS)

3/3 pass — including the bash parse check actually running against macOS's /bin/bash. The Linux .sh is currently parse-clean; this PR establishes the pin so it stays that way.

Deferred to 12.L.E.2+

  • SQUID_TENTACLE_STATE_DIR env-var override (Linux equivalent of Windows $env:ProgramData redirect). Required for full lifecycle tests.
  • LinuxServiceFixture (systemd analog of WindowsServiceFixture)
  • First full lifecycle test (Linux E1.h analog)
  • Linux-side production hardening parity with Windows J.E.5/6/7/8 (HEALTHCHECK_RETRIES, auto-rollback, stale-lock recovery, SERVICE_TIMEOUT_SECONDS)

🤖 Generated with Claude Code

Merge request reports

Loading