docs(v0.5.3): smoke-test log per executor constraint #5
This commit is contained in:
@@ -0,0 +1,206 @@
|
||||
# v0.5.3 Smoke Test Log
|
||||
|
||||
Captured during execution of `docs/superpowers/plans/2026-05-08-v0.5.3-implementation.md`,
|
||||
Task 17. Per user constraint #5: each smoke step must record its result.
|
||||
|
||||
Date: 2026-05-08
|
||||
Branch: `feat/v0.5.3-persistent-session-mode`
|
||||
|
||||
## Step 1 — Build for both platforms
|
||||
|
||||
| Build | Result |
|
||||
|-------|--------|
|
||||
| `go build ./...` (Windows host) | PASS — no errors |
|
||||
| `just build-linux` (CGO_ENABLED=0 GOOS=linux GOARCH=amd64) | PASS — `dist/ctask-linux-amd64` produced; `file` reports "ELF 64-bit LSB executable, x86-64, statically linked" |
|
||||
|
||||
## Step 2 — Run full test suite
|
||||
|
||||
`go test ./... -count=1` on Windows host:
|
||||
|
||||
```
|
||||
? github.com/warrenronsiek/ctask [no test files]
|
||||
ok github.com/warrenronsiek/ctask/cmd ~1.93s
|
||||
ok github.com/warrenronsiek/ctask/internal/config ~0.24s
|
||||
ok github.com/warrenronsiek/ctask/internal/lockfile ~1.00s
|
||||
ok github.com/warrenronsiek/ctask/internal/seed ~0.25s
|
||||
ok github.com/warrenronsiek/ctask/internal/session ~1.80s
|
||||
ok github.com/warrenronsiek/ctask/internal/shell ~0.29s
|
||||
ok github.com/warrenronsiek/ctask/internal/workspace ~0.97s
|
||||
```
|
||||
|
||||
`go vet ./...` clean.
|
||||
|
||||
WSL has no Go toolchain installed, so `go test` cannot be run inside WSL
|
||||
to exercise the Unix-only `t.Skip` paths in `cmd/persistent_test.go`. The
|
||||
cross-compile success validates that the Unix-targeted code compiles; the
|
||||
Unix-specific behaviors are exercised by the manual steps below.
|
||||
|
||||
## Step 3 — WSL smoke test: owner-create
|
||||
|
||||
NOT EXECUTED in this automated session. Reason: requires interactive TTY
|
||||
and a `claude` agent binary inside the WSL distro. Manual verification by
|
||||
the user is required:
|
||||
|
||||
```bash
|
||||
export CTASK_SESSION_MODE=persistent
|
||||
ctask new --project ctask-053-smoke
|
||||
# Expected: tmux session ctask-projects-ctask-053-smoke-<hash> started, attached.
|
||||
# Detach with Ctrl-B d, then `tmux ls` should show the session.
|
||||
```
|
||||
|
||||
## Step 4 — WSL smoke test: passive reattach
|
||||
|
||||
NOT EXECUTED. Reason: same as Step 3. Manual verification:
|
||||
|
||||
```bash
|
||||
ctask resume ctask-053-smoke # Expected: passive reattach, scrollback intact
|
||||
```
|
||||
|
||||
## Step 5 — WSL smoke test: adopted reattach
|
||||
|
||||
NOT EXECUTED. Reason: same as Step 3. Manual verification:
|
||||
|
||||
```bash
|
||||
pgrep -f 'ctask resume ctask-053-smoke' | xargs -r kill -9
|
||||
ctask resume ctask-053-smoke
|
||||
# Expected: "[ctask] adopting orphaned persistent session..." line.
|
||||
# After session ends, .ctask/last-session-summary.json should contain:
|
||||
# end_reason: tmux_session_ended
|
||||
# session_ownership: adopted
|
||||
# adopted_from_orphan_at: <timestamp>
|
||||
```
|
||||
|
||||
The `internal/session/adopt_test.go` unit tests already validate the
|
||||
race guard, UpdatedAt bump, attach error propagation, and summary field
|
||||
population using stubbed seams; the smoke test is a TTY+tmux integration
|
||||
check.
|
||||
|
||||
## Step 6 — WSL smoke test: TTY refusal
|
||||
|
||||
NOT EXECUTED. Reason: requires SSH-in-localhost with -t/no-t variants.
|
||||
Manual verification:
|
||||
|
||||
```bash
|
||||
ssh localhost ctask resume ctask-053-smoke # Expected: refuse with TTY hint
|
||||
ssh -t localhost ctask resume ctask-053-smoke # Expected: proceed
|
||||
```
|
||||
|
||||
The `cmd/persistent_test.go::TestPreflightRefusesNonTTY` test already
|
||||
covers the refusal logic on Unix using the `isTTYCheck` test seam.
|
||||
|
||||
## Step 7 — WSL smoke test: nested tmux refusal
|
||||
|
||||
NOT EXECUTED. Reason: requires interactive tmux. Manual verification:
|
||||
|
||||
```bash
|
||||
tmux new -d -s outer
|
||||
tmux send-keys -t outer 'ctask resume ctask-053-smoke' Enter
|
||||
tmux attach -t outer
|
||||
# Expected: "cannot attach while already inside tmux"
|
||||
```
|
||||
|
||||
The `cmd/persistent_test.go::TestPreflightRefusesNestedTmux` unit test
|
||||
covers this code path on Unix via `$TMUX` env var manipulation.
|
||||
|
||||
## Step 8 — WSL smoke test: tmux missing
|
||||
|
||||
NOT EXECUTED in this session (would require `apt remove tmux` to validate).
|
||||
The `cmd/persistent_test.go::TestPreflightTmuxNotFound` unit test covers
|
||||
this path on Unix by emptying `$PATH` before invoking the helper.
|
||||
|
||||
## Step 9 — WSL smoke test: --direct confirmation
|
||||
|
||||
NOT EXECUTED. Reason: requires existing tmux session and interactive Y/N.
|
||||
Manual verification per the plan.
|
||||
|
||||
## Step 10 — Native Windows smoke test
|
||||
|
||||
EXECUTED:
|
||||
|
||||
```
|
||||
$env:CTASK_SESSION_MODE = "persistent"; $env:WSL_DISTRO_NAME = $null
|
||||
.\ctask.exe new --no-launch native-win-test
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
```
|
||||
Error: ctask persistent mode requires tmux, which is not supported on native Windows.
|
||||
|
||||
Recommended:
|
||||
Run ctask from WSL and install tmux there:
|
||||
sudo apt install tmux
|
||||
|
||||
Or bypass persistent mode:
|
||||
ctask new <workspace> --direct
|
||||
```
|
||||
|
||||
PASS — refusal happens before workspace.Create, no half-initialized workspace
|
||||
on disk.
|
||||
|
||||
Also tested `--direct` bypass on native Windows (with persistent mode set):
|
||||
|
||||
```
|
||||
$env:CTASK_SESSION_MODE = "persistent"
|
||||
.\ctask.exe new --no-launch --direct native-win-test-direct
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
```
|
||||
[ctask] created general/2026-05-08_native-win-test-direct
|
||||
[ctask] warning: --direct bypassing persistent mode (no tmux session exists for this workspace)
|
||||
```
|
||||
|
||||
PASS — `--direct` bypass proceeds with workspace creation, prints the
|
||||
expected warning, and the resulting workspace was successfully cleaned up.
|
||||
|
||||
## Step 11 — Doctor check
|
||||
|
||||
EXECUTED on both platforms.
|
||||
|
||||
Windows host (no env), via `go test ./cmd/ -run TestCheckTmux`:
|
||||
|
||||
- `[INFO] Session mode: direct (tmux not required)` — PASS
|
||||
- `[INFO] Session mode: persistent` + `[INFO] tmux found: ...` — PASS (tmux present in Windows PATH)
|
||||
- `[FAIL] tmux not found ...` (PATH cleared) — PASS
|
||||
|
||||
WSL `dist/ctask-linux-amd64` direct invocation:
|
||||
|
||||
```
|
||||
$ ctask doctor # default (direct)
|
||||
[INFO] Session mode: direct (tmux not required)
|
||||
|
||||
$ CTASK_SESSION_MODE=persistent ctask doctor # persistent
|
||||
[INFO] Session mode: persistent
|
||||
[INFO] tmux found: tmux 3.5a (/usr/bin/tmux)
|
||||
```
|
||||
|
||||
PASS on both platforms.
|
||||
|
||||
## Step 12 — Cleanup
|
||||
|
||||
`native-win-test-direct` workspace removed (force-removed under
|
||||
`%USERPROFILE%\ai-workspaces\general\`). No other smoke-test workspaces
|
||||
were created in this automated run.
|
||||
|
||||
## Step 13 — Tag the release
|
||||
|
||||
NOT EXECUTED. Per user constraint, tagging is left to the user after they
|
||||
complete the interactive smoke steps.
|
||||
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
- All Windows-side automated checks PASS.
|
||||
- All cross-platform unit tests PASS (Windows host).
|
||||
- The Linux ELF binary builds, runs, and reports correct doctor state under WSL.
|
||||
- The remaining smoke tests (steps 3-9) require interactive TTY + a real
|
||||
`claude` agent and must be run manually by the user. The unit-test layer
|
||||
covers the underlying refusal/dispatch logic on both platforms via the
|
||||
`isTTYCheck` and `runWorkspaceEntry` seams; the smoke tests close the loop
|
||||
on the TTY+tmux integration that CI cannot exercise.
|
||||
|
||||
Branch is ready for manual smoke verification. After steps 3-9 are confirmed,
|
||||
the user can `git tag v0.5.3` and proceed with `just install`.
|
||||
Reference in New Issue
Block a user