|
| 1 | +# WebUI Smoke CLI — Dev Plan |
| 2 | + |
| 3 | +## Spec Reference |
| 4 | + |
| 5 | +- Spec: `.specs/FR-2871-webui-smoke-cli/spec.md` |
| 6 | +- Epic: [FR-2871](https://lablup.atlassian.net/browse/FR-2871) |
| 7 | +- Spec Task: [FR-2872](https://lablup.atlassian.net/browse/FR-2872) |
| 8 | +- Spec PR (parent in stack): [#7375](https://github.com/lablup/backend.ai-webui/pull/7375) |
| 9 | + |
| 10 | +## Sub-tasks |
| 11 | + |
| 12 | +GitHub mirror issue numbers are populated by the Jira → GitHub webhook clone; if a row shows `pending`, the webhook has not yet completed at the time of writing — batch-implement should look the cloned issue up by Jira key. |
| 13 | + |
| 14 | +| FR | Jira | Tier | GitHub | Title | |
| 15 | +|----|------|------|--------|-------| |
| 16 | +| FR-A | [FR-2875](https://lablup.atlassian.net/browse/FR-2875) | MVP | pending | chore(WebUI Smoke CLI): introduce @smoke tag convention for e2e specs | |
| 17 | +| FR-B | [FR-2876](https://lablup.atlassian.net/browse/FR-2876) | MVP | pending | feat(WebUI Smoke CLI): scaffold backend.ai-webui-smoke-cli workspace package | |
| 18 | +| FR-C | [FR-2877](https://lablup.atlassian.net/browse/FR-2877) | MVP | pending | feat(WebUI Smoke CLI): implement runner with tag filter and external endpoint support | |
| 19 | +| FR-D | [FR-2878](https://lablup.atlassian.net/browse/FR-2878) | Phase 2 | pending | feat(WebUI Smoke CLI): add preflight/doctor subcommand and role auto-detection | |
| 20 | +| FR-E | [FR-2879](https://lablup.atlassian.net/browse/FR-2879) | Phase 2 | pending | feat(WebUI Smoke CLI): post-process report with summary.json and diagnostic block | |
| 21 | +| FR-F | [FR-2880](https://lablup.atlassian.net/browse/FR-2880) | Phase 2 | pending | refactor(WebUI Smoke CLI): extract single-account-safe e2e utilities | |
| 22 | +| FR-G | [FR-2881](https://lablup.atlassian.net/browse/FR-2881) | Phase 2 | pending | feat(WebUI Smoke CLI): bundle Chromium and add air-gap + insecure-tls support | |
| 23 | +| FR-H | [FR-2882](https://lablup.atlassian.net/browse/FR-2882) | Phase 2 | pending | chore(WebUI Smoke CLI): SEA/pkg binary build and internal release workflow | |
| 24 | +| FR-I | [FR-2883](https://lablup.atlassian.net/browse/FR-2883) | Phase 2 | pending | docs(WebUI Smoke CLI): operator README in English and Korean | |
| 25 | +| FR-J | [FR-2884](https://lablup.atlassian.net/browse/FR-2884) | Phase 2 | pending | feat(WebUI Smoke CLI): expand smoke coverage (App launcher P1, model serving, RBAC basics) | |
| 26 | + |
| 27 | +## Dependency Graph |
| 28 | + |
| 29 | +```mermaid |
| 30 | +graph LR |
| 31 | + A[FR-A / FR-2875] |
| 32 | + B[FR-B / FR-2876] |
| 33 | + C[FR-C / FR-2877] |
| 34 | + D[FR-D / FR-2878] |
| 35 | + E[FR-E / FR-2879] |
| 36 | + F[FR-F / FR-2880] |
| 37 | + G[FR-G / FR-2881] |
| 38 | + H[FR-H / FR-2882] |
| 39 | + I[FR-I / FR-2883] |
| 40 | + J[FR-J / FR-2884] |
| 41 | +
|
| 42 | + A --> C |
| 43 | + B --> C |
| 44 | + A --> F |
| 45 | + C --> D |
| 46 | + C --> E |
| 47 | + C --> G |
| 48 | + C --> J |
| 49 | + G --> H |
| 50 | + H --> I |
| 51 | + F -. relates .-> J |
| 52 | +``` |
| 53 | + |
| 54 | +Encoded Jira links (`blocks` unless noted): |
| 55 | + |
| 56 | +- FR-2875 blocks FR-2877 |
| 57 | +- FR-2876 blocks FR-2877 |
| 58 | +- FR-2875 blocks FR-2880 |
| 59 | +- FR-2877 blocks FR-2878 |
| 60 | +- FR-2877 blocks FR-2879 |
| 61 | +- FR-2877 blocks FR-2881 |
| 62 | +- FR-2881 blocks FR-2882 |
| 63 | +- FR-2882 blocks FR-2883 |
| 64 | +- FR-2877 blocks FR-2884 |
| 65 | +- FR-2880 *relates to* FR-2884 (soft) |
| 66 | + |
| 67 | +## Wave Ordering |
| 68 | + |
| 69 | +### Wave 1 — MVP foundation (parallel) |
| 70 | + |
| 71 | +| FR | Files touched | Verification | |
| 72 | +|----|---------------|--------------| |
| 73 | +| FR-A | `E2E-TEST-NAMING-GUIDELINES.md`, `e2e/tests/**` (tag annotations only) | `pnpm --filter ./e2e exec playwright test --grep @smoke --list` lists starter specs; existing e2e CI run count unchanged | |
| 74 | +| FR-B | `packages/backend.ai-webui-smoke-cli/` (new), `pnpm-workspace.yaml` | `pnpm install && pnpm --filter backend.ai-webui-smoke-cli run build`; `bai-smoke list|version|run --help` | |
| 75 | + |
| 76 | +### Wave 2 — MVP runner |
| 77 | + |
| 78 | +| FR | Depends on | Files touched | Verification | |
| 79 | +|----|------------|---------------|--------------| |
| 80 | +| FR-C | FR-A, FR-B | `packages/backend.ai-webui-smoke-cli/playwright.smoke.config.ts`, `src/runner.ts`, `src/commands/run.ts`, `src/auth/storage-state.ts` | Smoke run against staging produces a report with **login + dashboard + 1 session lifecycle** PASS; HTML report at `./report/index/index.html`; non-zero exit on forced failure | |
| 81 | + |
| 82 | +### Wave 3 — Phase 2 expansion (parallel; all depend on FR-C) |
| 83 | + |
| 84 | +| FR | Files touched | Verification | |
| 85 | +|----|---------------|--------------| |
| 86 | +| FR-D | `src/commands/{doctor,preflight}.ts`, `src/role/detect.ts`, updates to `src/commands/run.ts` | `doctor` distinguishes "unreachable" from "login failed"; `--role auto` picks correct tag set | |
| 87 | +| FR-E | `src/report/{summary,environment,prune,diagnostic}.ts` | After a forced failure, output directory matches the documented shape; `summary.json` and `environment.json` parse and contain required fields | |
| 88 | +| FR-F | `e2e/utils/test-util.ts` (audit), `e2e/utils/smoke-util.ts` (new), smoke-tagged spec imports | Single-account fixture: smoke run green; full e2e suite: no regression | |
| 89 | +| FR-G | `scripts/bundle-browsers.*`, `src/runtime/{browsers,network-allowlist}.ts`, `playwright.smoke.config.ts` | Outbound-blocked host completes a smoke run; `--insecure-tls` accepts self-signed certs | |
| 90 | + |
| 91 | +### Wave 4 — Packaging + coverage expansion (parallel; FR-J only soft-relates to FR-F) |
| 92 | + |
| 93 | +| FR | Depends on | Files touched | Verification | |
| 94 | +|----|------------|---------------|--------------| |
| 95 | +| FR-H | FR-G | `scripts/build-{linux,mac,win}.sh`, `.github/workflows/webui-smoke-cli-release.yml` | Each platform binary extracted on a no-Node host runs a smoke pass against staging | |
| 96 | +| FR-J | FR-C (hard), FR-F (soft / relates) | `e2e/tests/smoke/{app-launcher,model-serving,rbac-basics}.spec.ts` | App-launcher smoke distinguishes session-runtime failure from app-proxy 502 | |
| 97 | + |
| 98 | +### Wave 5 — Documentation (gated on final CLI surface) |
| 99 | + |
| 100 | +| FR | Depends on | Files touched | Verification | |
| 101 | +|----|------------|---------------|--------------| |
| 102 | +| FR-I | FR-H | `packages/backend.ai-webui-smoke-cli/README.md`, `README.ko.md` | Both READMEs print on one A4 page; a Field-Ops engineer completes the documented flow on a fresh host | |
| 103 | + |
| 104 | +## Per-wave batch-implement guidance |
| 105 | + |
| 106 | +- **Common verification command** for every Wave: `bash scripts/verify.sh` (Relay / Lint / Format / TypeScript), in addition to the per-FR functional check above. |
| 107 | +- **PR titles** follow `prefix(JIRA-KEY): title` from CLAUDE.md (e.g., `feat(FR-2877): ...`). |
| 108 | +- **PR body** starts with `Resolves #<github-mirror>(FR-2877)` once the webhook has cloned each Jira sub-task. |
| 109 | +- **Graphite stack**: each FR is one PR stacked on the previous wave's PRs. Use `gt create` / `gt submit --stack`. The MVP slice (FR-A → FR-B → FR-C) is the critical path stacked above the spec PR (#7375) and this dev-plan PR. |
| 110 | +- **Single-account staging account** is required from Wave 2 onward for runtime verification. |
| 111 | + |
| 112 | +## Risks / notes |
| 113 | + |
| 114 | +- The Jira → GitHub webhook clone is asynchronous; the table's `pending` entries should be filled in by batch-implement at the moment each FR is picked up. |
| 115 | +- FR-F is intentionally Phase 2 even though FR-C will rely on the smoke specs being single-account-safe in practice. If a tagged spec in FR-C fails because of a multi-account assumption, **exclude it from the `@smoke` selection** and note it on the FR-F ticket — do not fix it inside FR-C. |
| 116 | +- FR-J's "App launcher P1" check is the highest-signal Phase 2 deliverable; prioritize it within Wave 4. |
0 commit comments