Skip to content

feat(LinuxTentacleE2E): Phase 12.M.L.B.5 — `service stop` returns to inactive

Summary

Composes J.M.L.B.4's full-workflow setup (register + install + wait active) + adds the stop-and-verify-inactive step.

sudo squid-tentacle service stop --service-name <name>

Real-world drivers

  • Operator takes agent down for maintenance (host reboot, hardware swap, OS upgrade)
  • Operator drains running agent before uninstall (prevents in-flight script kill)
  • Fleet automation pauses agents during deploy windows

Why ship-blocking

Without this E2E pin, regressions ship silently:

  • Stop exits 0 but service still running → operator believes down, host reboot interrupts work hours later
  • Stop hangs because TimeoutStopSec coordination broke (SIGKILL after 5min instead of clean drain)
  • Stop succeeds but corrupts state (no clean shutdown drain)

Test mechanism

  1. B3h's full-workflow setup (register + install + wait active)
  2. Service stop via production CLI
  3. Poll is-active for non-zero + "inactive" output (10s budget)
  4. Diagnostic dump on inactive-not-reached: systemctl status + journalctl tail

Why this test couldn't exist before B3h: stop assertion only meaningful if service was actually running. B3h proved that; B4h builds on it.

Assertions

Assertion Pins
service stop exit 0 Stop CLI chain succeeded
is-active returns non-zero systemd sees the service as not-active
Output starts with "inactive" (NOT "failed") Clean stop, not crash
Reached within 10s TimeoutStopSec coordination working

Fidelity tier

🟢 High (Rule 12.4) — composes Register + Service install + Service stop through systemd to actually-running-then-stopped agent.

Expected runtime: ~15-20s.

Test plan

  • Linux E2E workflow runs (manual workflow_dispatch after merge)
  • B4h_FullWorkflow_ServiceStop_ReturnsToInactiveState passes within ~25s
  • No regression on existing 37 Linux E2E tests
  • Diagnostic dump only triggers on actual stop failure

🤖 Generated with Claude Code

Merge request reports

Loading