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
TimeoutStopSeccoordination broke (SIGKILL after 5min instead of clean drain) - Stop succeeds but corrupts state (no clean shutdown drain)
Test mechanism
- B3h's full-workflow setup (register + install + wait active)
- Service stop via production CLI
-
Poll
is-activefor non-zero + "inactive" output (10s budget) - Diagnostic dump on inactive-not-reached:
systemctl status+journalctltail
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
Expected runtime: ~15-20s.
Test plan
-
Linux E2E workflow runs (manual workflow_dispatchafter merge) -
B4h_FullWorkflow_ServiceStop_ReturnsToInactiveStatepasses within ~25s -
No regression on existing 37 Linux E2E tests -
Diagnostic dump only triggers on actual stop failure