Skip to content

Add P1-#4: Tentacle upgrade + polling composite E2E (R5h-Linux)

Placeholder ppxd requested to merge feat/upgrade-polling-composite-e2e into main

Summary

  • Composite E2E joining two previously-separate tier 🟢 H flows into one real-world deployment scenario
  • Pins the operator's actual production upgrade path: polling agent survives a mid-flight binary upgrade
  • Two key assertions: capabilities probe reports v2 version + dispatch round-trips on v2

Coverage delta

Existing test What it pins Gap
U1h (TentacleLinuxUpgradeBinaryIntegrationE2ETests) Binary-swap mechanics + thumbprint preservation Registers as Listening (no --comms-url) — never exercises polling or dispatch
R1h (TentacleLinuxRealBinaryIntegrationE2ETests) Polling-agent dispatch round-trip Never upgrades binary mid-test
R5h (this PR) Polling agent surviving a mid-flight upgrade — register → polling → dispatch v1 → swap → reconnect → dispatch v2 → capabilities reports v2 (closes the composition gap)

Test mechanism (12 steps, ~90-120s)

1-2. Per-test v1 binary at /tmp/tentacle-r5h-<guid>/Squid.Tentacle + register polling 3. Service install + wait active (v1) 4. Wait for polling channel up via capabilities probe 5. ASSERT: capabilities reports v1 version (BuildVersion) 6. Dispatch BEFORE upgrade (proves v1 baseline) 7. Service stop + wait inactive (drain) 8. SWAP: cp v2-binary over v1's path (mirrors upgrade-linux-tentacle.sh's Phase B) 9. Service start + wait active (v2) 10. Wait for polling channel reconnect via capabilities probe 11. THE PIN: capabilities reports v2 version (BuildVersionV2) — operator-visible upgrade visibility 12. THE OTHER PIN: dispatch AFTER upgrade succeeds with marker round-trip — v2's LocalScriptService still works 13. Cleanup: service uninstall --purge

What this catches that prior tests don't

  • Polling channel loss during binary swap → must reconnect on new binary using same persisted config (CertsPath, ServerCommsUrl, SubscriptionId)
  • v2 binary fails to load persisted v1 config (config-format drift between versions)
  • v2 binary regresses Halibut polling behaviour (compatible wire format but degraded reconnect logic)
  • Capabilities version reporting — server cache refresh after upgrade reads v2 version via probe (key for operator UI showing "Tentacle is now on v100.0.0")

Test plan

  • dotnet build — 0 errors
  • CI on ubuntu-latest runs Category=LinuxTentacleBinaryE2E:
    • R5h_PollingAgent_BinarySwapUpgrade_DispatchesResumeOnNewVersion passes
    • All other R1h/R2h/R4h tests still green
  • Re-run 2-3 times to confirm timing is deterministic

Phase status — P0/P1 sweep after 1.6.4 release

PR Priority Title Status
#275 P0-#3 LocalScriptService async-flush race fix 🟡 CI
#276 P0-#1 SCM-launched real-binary E2E 🟡 CI
#277 P0-#2 Server-restart polling-reconnect E2E 🟡 CI
this P1-#4 Upgrade + polling composite E2E 🟡 CI pending
(next) P1-#5 Long-soak (5min+ probe + dispatch loop) pending
(next) P1-#6 Capabilities cache TTL invalidation pending

🤖 Generated with Claude Code

Merge request reports

Loading