Skip to content

test(dashboard): make the W0 login journey deterministic - #15

Open
phibkro wants to merge 1 commit into
publish/0010-dashboard-sdkfrom
publish/0012-dashboard-w0
Open

test(dashboard): make the W0 login journey deterministic#15
phibkro wants to merge 1 commit into
publish/0010-dashboard-sdkfrom
publish/0012-dashboard-w0

Conversation

@phibkro

@phibkro phibkro commented Aug 12, 2026

Copy link
Copy Markdown
Member

Design spec

design-specs/0012-dashboard-playwright-w0-correction.md

Journey

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

  1. Check out this stacked branch.
  2. Run the standalone test:e2e:w0 command documented in apps/dashboard/README.md.
  3. Observe the invalid-credentials journey and bounded fixture shutdown.

Evidence

  • All five tracked implementation paths plus the 0012 spec are in this PR.
  • Tracked-file W0 passed twice: 5 tests with 3 expected skips.
  • Independent code/runtime review: PASS.

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread apps/dashboard/README.md
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" \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment on lines +208 to +209
process.stdout.write(`${SHUTDOWN_LINE}\n`);
process.exit(exitCode);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant