Summary
stack logs --follow already exists (closed #51). Ensure it:
- Tails through deploy completion (closes stream cleanly when server signals end, not on first idle).
- Respects
Ctrl-C without leaking goroutines.
- Reuses the WS auth chain from 7.1 if it migrates from polling to WS.
Files to touch
cli/cmd/stack.go — logsCmd follow path.
Tests (all three layers required)
- Unit:
cli/cmd/stack_test.go + (if migrated to WS) cli/pkg/client/websocket_test.go — terminal-status close path, Ctrl-C path, goleak.VerifyNone(t).
- Integration: extend
cli/test/integration/stack_integration_test.go — Cobra in-process logs --follow completes when stub signals end.
- E2E:
cli/test/e2e/cli_e2e_test.go — stackctl stack logs <id> --follow against stub returns 0 within timeout.
Acceptance
Tracks #59
Summary
stack logs --followalready exists (closed #51). Ensure it:Ctrl-Cwithout leaking goroutines.Files to touch
cli/cmd/stack.go—logsCmdfollow path.Tests (all three layers required)
cli/cmd/stack_test.go+ (if migrated to WS)cli/pkg/client/websocket_test.go— terminal-status close path, Ctrl-C path,goleak.VerifyNone(t).cli/test/integration/stack_integration_test.go— Cobra in-processlogs --followcompletes when stub signals end.cli/test/e2e/cli_e2e_test.go—stackctl stack logs <id> --followagainst stub returns 0 within timeout.Acceptance
goleak.VerifyNone(t)passes for the follow command test.--follow=falsepath.Tracks #59