Fail the macOS smoke run when the dashboard frame never connects, and update the checklist

AI Assisted
This commit is contained in:
Seth committed 2026-12-05 00:10:45 -08:00
1 parent a9e0bf49f0
commit 615e98e11e
10 files changed
+418 -3

No files matched your search

+26
View File
@@ -178,6 +178,32 @@ jobs:
echo "plan2code-app exited within 5s (exit code $?); smoke test failed"
exit 1
fi
- name: Smoke-test the dashboard frame connects (macOS)
if: runner.os == 'macOS'
shell: bash
# A window whose dashboard frame never signs in still passes the alive check above
# (WebKit gives the frame no cookie, so macOS signs it in by a path prefix:
# takeFramePrefix in routes.mjs). Here the app autostarts
# scripts/smoke-agent.mjs, which opens a real console as an agent would, and
# scripts/smoke-frame.mjs waits up to 60s for that console's /health to count the
# frame as a browser. Runs only where the matrix has macOS: manual runs and pull
# requests labeled `full-matrix`.
run: |
project="$(mktemp -d)"
export PLAN2CODE_CONSOLE_HOME="$(mktemp -d)"
export PLAN2CODE_CONSOLE_DIR="$GITHUB_WORKSPACE/src/web-console"
export PLAN2CODE_APP_AGENT_BIN="$(pwd)/scripts/smoke-agent.mjs"
# No browser of the console's own, so only the app's frame can count as one.
export PLAN2CODE_NO_BROWSER=1
target/release/plan2code-app --project "$project" --agent claude &
pid=$!
status=0
node scripts/smoke-frame.mjs "$PLAN2CODE_CONSOLE_HOME" || status=$?
kill "$pid" 2>/dev/null || true
# The console is detached from the agent, so it outlives the app: stop it from the
# project folder it was opened in, under the same console home.
(cd "$project" && node "$PLAN2CODE_CONSOLE_DIR/console.mjs" stop --all) || true
exit "$status"
node-tests:
name: npm test (${{ matrix.os }})