Skip to content

feat(LinuxTentacleE2E): Phase 12.M.L.B.4 — full operator workflow E2E (register + service start)

Summary

THE confidence-anchor test for the user's original goal: "from install to register to service-lifecycle to upgrade — all confident". This test composes:

  1. C1.h-style register against StubSquidServer (config persisted with Tentacle:Registered=true so subsequent run skips re-registration)
  2. B1.h-style service install (writes systemd unit, enables, starts)
  3. NEW: poll systemctl is-active until "active" — proves the agent's run command actually starts up + reads config + binds the listening port

What this test catches that prior tests don't

Catches Why prior tests miss this
Config persisted by register is READABLE by run Register tests verify file exists; don't verify run can parse it
Tentacle:Registered=true persists correctly Without it, run would try to re-register against a now-gone stub
Cert file generated by register is readable by service-started process Cert ownership handover must permit service user to read
Listening port bind succeeds end-to-end through systemd Service install tests don't actually wait for the agent to start
Type=simple correctly tracks agent state Unit-content tests check the directive is present; this proves it works

Test mechanism

  • Stub server for register
  • Pre-create /etc/squid-tentacle/ (per J.M.L.C.1.2 fix)
  • Register with --listening-port 51933 (high port, defensive vs collisions on the GHA runner; default 10933 is unlikely-but-possible to be in use)
  • Service install + 15s is-active poll loop
  • Diagnostic dump on timeout: systemctl status + journalctl -n 30 so failure tells operator WHY agent didn't reach active

Why ship-blocking

Without this pin, prior tests cover the operator workflow's pieces but never the END-TO-END chain. Operator deploying a fresh host could see all individual commands succeed but the service itself fails to come up — and we wouldn't catch it.

Fidelity tier

🟢 High (Rule 12.4) — THE highest-fidelity E2E in the suite. Composes Register + Service flows through systemd to actually-running agent.

Test class is in LinuxTentacleHostStateCollection (serializes against upgrade + install + service-fixture + binary-smoke + service-command + register tests).

Expected runtime: ~10-15s.

Test plan

  • Linux E2E workflow runs (manual workflow_dispatch after merge)
  • B3h_FullWorkflow_RegisterAndServiceStart_ReachesActiveState passes within ~20s
  • No regression on existing 36 Linux E2E tests
  • Diagnostic dump (status + journalctl) only triggers on actual failure

🤖 Generated with Claude Code

Merge request reports

Loading