test(dashboard): make the W0 login journey deterministic - #15
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fc8f3b959b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| unshare -Urn sh -c ' | ||
| ip link set lo up 2>/dev/null || true | ||
| CI=1 \ | ||
| PATH="$(dirname "$NODE_22_BIN"):$(dirname "$BUN_1_3_10_BIN"):$PATH" \ |
There was a problem hiding this comment.
Invoke the validated runtimes directly
When either operator-supplied executable is not literally named node or bun (for example, /opt/bin/node22), prepending only its directory does not make the validated executable resolve under those bare names. The package script and both webServer.command values subsequently invoke bare node/bun, so this canonical command can silently use an older runtime already on PATH despite validating NODE_22_BIN and BUN_1_3_10_BIN. Use the validated paths directly or create and verify matching command shims before running the journey.
Useful? React with 👍 / 👎.
| process.stdout.write(`${SHUTDOWN_LINE}\n`); | ||
| process.exit(exitCode); |
There was a problem hiding this comment.
Flush the shutdown marker before exiting
Because the fixture's stdout is configured as a pipe, process.stdout.write() may complete asynchronously; immediately calling process.exit() can terminate Node before the required shutdown line reaches Playwright. This makes the supposedly deterministic lifecycle evidence intermittently omit its shutdown marker even after a graceful SIGTERM. Exit from the write callback or set process.exitCode and let the event loop drain instead.
Useful? React with 👍 / 👎.
Design spec
design-specs/0012-dashboard-playwright-w0-correction.mdJourney
A maintainer runs the tracked W0 login journey through the app-local Playwright CLI, fixed synthetic fixture, fixed viewport, Chromium project, and zero retries.
Experience it
test:e2e:w0command documented inapps/dashboard/README.md.Evidence
What is real
The W0 harness contract is conforming and deterministic for the named browser journey. This is harness evidence, not broad dashboard type correctness, product visual acceptance, provider behavior, deployment, or production acceptance.