feat(FR-2877): implement webui-smoke-cli runner with tag filter and external endpoint#7392
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has required the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
2223e33 to
ef08c87
Compare
There was a problem hiding this comment.
Pull request overview
Implements the FR-2877 MVP “smoke CLI runner” by wiring bai-smoke run to spawn Playwright against an operator-supplied WebUI/webserver endpoint, applying smoke-tag filtering and emitting HTML/JSON reports plus a lightweight summary.json.
Changes:
- Add a Playwright runner (
runSmoke) that composes env/grep filters, spawns Playwright with a smoke-specific config, and writessummary.json. - Introduce CLI option parsing for
run(endpoint/webserver/auth/role/pages/tag filters/workers/timeout/output) and add password-stdin + argv scrubbing. - Add a smoke Playwright config that reuses the repo’s
e2e/tree and produces HTML + JSON reports; add@playwright/testas a direct dependency and expose Playwright/WebUI SHA inversion.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/backend.ai-webui-smoke-cli/src/version.ts | Resolve CLI version, Playwright version, and best-effort WebUI SHA. |
| packages/backend.ai-webui-smoke-cli/src/runner.ts | Spawn Playwright with smoke config, auto-detect role, and generate summary.json. |
| packages/backend.ai-webui-smoke-cli/src/config.ts | Pure helpers to map CLI options → env vars + grep/grepInvert regex. |
| packages/backend.ai-webui-smoke-cli/src/cli.ts | Implement bai-smoke run command and option parsing (incl. password-stdin). |
| packages/backend.ai-webui-smoke-cli/README.md | Document alpha usage, flags, and MVP limitations. |
| packages/backend.ai-webui-smoke-cli/playwright.smoke.config.ts | Smoke-focused Playwright config pointing at repo e2e/ with report outputs. |
| packages/backend.ai-webui-smoke-cli/package.json | Ship smoke config in package files and add @playwright/test dependency. |
3e3d64d to
0819c45
Compare
ef08c87 to
766d67e
Compare
…mplify argv scrub
766d67e to
a5a6a58
Compare
0819c45 to
0897166
Compare

Resolves #7381(FR-2877)
Part of Epic FR-2871 — WebUI Smoke CLI. Stacked on top of #7391.
Summary
bai-smoke runagainst external WebUI + webserver endpoints/server/loginresponse (defaults touseron detection failure)--include,--exclude,--pages); grep regex composed as(@smoke|@smoke-any|@smoke-{role})playwright.smoke.config.tsthat extends repoe2e/directorysummary.json(env + role + counts)WEBUI_SHA(viagit rev-parse HEADfallback) andPLAYWRIGHT_VERSION(from@playwright/test/package.json)@playwright/testas a direct dep on the packageOut of scope (Phase 2)
doctor/preflightsubcommands → FR-2878Verification
pnpm install+pnpm --filter backend.ai-webui-smoke-cli build→ PASSbai-smoke version/bai-smoke list/bai-smoke run --help→ PASS, all new flags documentedbash scripts/verify.sh→ Relay / Lint / Format PASS. TypeScript fails only on pre-existing errors on unrelated files — same set already present onmainand PR feat(FR-2875,FR-2876): introduce @smoke tag convention and scaffold webui-smoke-cli package #7391.tsc -p packages/backend.ai-webui-smoke-cli/tsconfig.json --noEmit→ clean.Live staging run (added post-implementation)
Ran against staging webserver
https://3398ac.public.isla-sorna.backend.ai(same host serves WebUI):Runner-level acceptance: PASS
adminsummary.jsonwritten with env + role + counts (total: 39, passed: 0, failed: 29, skipped: 10)Spec-level result: 29 failures, all sharing the same root cause —
e2e/utils/test-util.ts:136cannot find the "Password" label on the login page of this staging instance. This is not a smoke-CLI bug; it is an upstream e2e helper / staging-UI mismatch that already affects regular e2e runs against this server. Tracked as a separate concern, not blocking this PR.Observation flagged for review —
--include @smoke-anyproduced the composed grep(@smoke\b|@smoke-any\b|@smoke-admin\b|@smoke-any). The user-supplied include is OR'd with the implicit@smokebase, so--includecannot currently narrow the run; it can only widen it. Decide in review whether to:--includeis given.The current behavior is acceptable for MVP but worth resolving before Phase 2.
TODO markers left for Phase 2
WEBUI_SHAbuild-time injection is still best-effort viagit rev-parse; FR-2881 will replace this with a generated module shipped in the tarball.🤖 Generated with Claude Code