You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit dfe85c9
Browse filesBrowse the repository at this point in the historyBrowse files
ci(live-e2e): boot the workspace backend and run the live lane as the required Live E2E UI job (#27212)
Fixes#27154
Clause-②: no
Metadata-protocol: none
## 维护者速读
- **改了什么:** live e2e 四条 spec 改为用本树工作区自建的 `@objectstack/cli` 启动
`examples/app-showcase` 后端(HEAD console 对 HEAD
backend),已发布版本钉退役;`ci.yml` 新增 `Live E2E UI` job,并登记进
`REQUIRED_CONTEXTS`。
- **为什么改:** 按已发布版本钉后端,每次发版都得同步抬钉,否则 `ui/` 的 PR 全红(#25914 实测 18.1.0 下
0/5);裁决 6464191239 字母 D 第 2 步要求改为工作区后端后再升为 required。
- **风险与回滚:** Tier H(`.github/workflows/ci.yml`、`AGENTS.md`);回滚 = 还原本
PR(job、注册行、两处名单文字、两个脚本)。新 job 超时上限 40 分钟由一次本地冷跑推得,首批 CI 数据后需复核。
- **先看:** `ui/e2e/live/ci/start-backend.sh`(prepare 只校验构建产物、不再拉包)→
`ci.yml` 的 `live-e2e-ui` job → `scripts/check-required-contexts.mjs`
新注册行。
- **两分钟验证:** 打开本 PR 的 checks,`Live E2E UI` 应为绿色,日志 “Run the live e2e
specs” 一步显示 `5 passed`。
- **需要你做的:** 合并后在 `main` 的 ruleset 里把 `Live E2E UI` 勾为 required(席位做不了)。
## What changes
- `ui/e2e/live/ci/start-backend.sh` boots the WORKSPACE backend: this
tree's built `@objectstack/cli` (through
`examples/app-showcase/node_modules/.bin/objectstack`) runs `objectstack
dev --seed-admin --fresh -p $LIVE_BACKEND_PORT` from the checked-out
showcase. Same default port (4010), same seeded sign-in readiness poll
(300 s), same pid file, so `stop-backend.sh` is unchanged and its PID
contract holds. `prepare` no longer resolves a release tag,
sparse-checks-out a release or `npm install`s published tarballs; it
checks the build prerequisite (the app's config, the installed CLI bin,
`packages/cli/dist/index.js`) and refuses by name with the build command
when one is missing. The vitest override and the stamp retire with the
install.
- `ui/e2e/live/ci/backend.env` declares
`LIVE_BACKEND_APP=examples/app-showcase` and no published pin; its
comment records why `OBJECTSTACK_VERSION` retired.
- `.github/workflows/ci.yml` adds `live-e2e-ui` / `Live E2E UI`:
install, build the CLI + showcase closure and the seven packages the
Console builds against, `vite build` the Console with
`VITE_BASE_PATH=/`, provision Chromium through
`ensure-chromium-ready.sh`, boot the backend, serve `vite preview` on
:5190 with `DEV_PROXY_TARGET=http://localhost:4010`, and run `pnpm --dir
ui run test:e2e:live:ci --retries 0`. Triggers: the workflow's existing
`pull_request` and `merge_group` (plus push/schedule, as every job in
the file). `if:` is Build & E2E UI's condition verbatim (`ui_tree`, `ui
|| ui_consumers`, with `!cancelled()`). No `continue-on-error`, no retry
wrapper, no spec edited or skipped. Caches are restore-only (pnpm store,
Build Core's turbo seed, the Playwright browsers Build & E2E UI saves).
- `scripts/check-required-contexts.mjs`: a `REQUIRED_CONTEXTS` row for
`ci.yml:live-e2e-ui → 'Live E2E UI'`, and the name added to the two
`statesTheSet` instruction surfaces' `mustName`; `AGENTS.md` (nine → ten
contexts) and
`.claude/skills/pm-dispatch/references/platform-readings.md` (九个 → 十个)
name it.
- `ui/scripts/__tests__/ensure-chromium-ready.test.ts` reads the new job
as a second Chromium provisioner (its comment said `live-e2e.yml` "comes
back here with that port"); `helpers/root-ci.ts` exports the job id as
`UI_LIVE_E2E_JOB`, outside `UI_JOBS`.
- `docs/agents/multi-agent-discipline.md` (advisory checks ride through)
now counts ten required contexts, and the `ci.yml` `filter` job comment
counts five `* UI` jobs (Type Check UI, Test UI, Lint UI, Build & E2E UI
and Live E2E UI).
## Tests
Measured before wiring, on the workspace boot, at commit `7a48258d` (the
re-shaped scripts; base `2f96d874`). Setup: `pnpm install
--frozen-lockfile`; turbo build of the CLI + showcase closure and the
seven Console packages (65/65 tasks, 384 s cold under the shared-box
lock); `VITE_BASE_PATH=/ vite build` of `ui/apps/console` (119 s);
`start-backend.sh` exit 0, ready in 19 s (`@objectstack/cli 18.2.0`
workspace); `vite preview --port 5190` with
`DEV_PROXY_TARGET=http://localhost:4010`;
`LIVE_API_URL=http://localhost:4010`,
`LIVE_APP_URL=http://localhost:5190`; one backend for all five runs, as
one CI job boots once.
| Run | Exit | Wall (s) | action-modal | master-detail: populated parent
| master-detail: task line | saved-view-filter | screen-flow |
|---|---|---|---|---|---|---|---|
| 1 | 0 | 26 | pass | pass | pass | pass | pass |
| 2 | 0 | 23 | pass | pass | pass | pass | pass |
| 3 | 0 | 22 | pass | pass | pass | pass | pass |
| 4 | 0 | 23 | pass | pass | pass | pass | pass |
| 5 | 0 | 21 | pass | pass | pass | pass | pass |
5/5 runs green, 5/5 tests per run; Playwright's own totals 24.1 s / 20.5
s / 20.7 s / 21.2 s / 19.9 s. Wall times are shared-box seconds.
Teardown: `stop-backend.sh` stopped the recorded pid; the preview
processes I started were stopped by pid.
Derived gates (`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` at `191e9d5e`, after merging `origin/main`):
87 commands, each exit captured before any pipe. 85 exit 0, including
`pnpm check:required-contexts` (lists `ci.yml:live-e2e-ui → 'Live E2E
UI'`), `check:workflow-status-functions`, `check:stall-guard-budget`,
`check:pm-expected-skips`, `check:aggregator-roster`,
`check:bash32-floor`, `check:ci-filter-parity`,
`check:pm-skill-ratchet`, and `pnpm --dir ui exec vitest run scripts/`
(175 files passed, 2 skipped; 5020 tests passed). Two did not measure
the diff: `check:dual-build-cjs-loads` exit 3 (PREREQUISITE NOT MET: no
full `pnpm build` here) and `check:dts-closure` exit 1, which named only
`ui/apps/console/plugin.d.ts`, missing from the `dist/` my bare `vite
build` left behind; with that ignored directory removed it exits 0
(233/233 declaration files present). `--ran` with exit codes: 87
derived, 86 run, 1 NOT-MEASURED (the exit 3). No package changes, so no
changeset (`skip-changeset`).
On head `3f0b396f` (the text patch round): `CI` pull_request run
40678137074; `Live E2E UI` (job 122782123641) concluded success in 87 s
of job wall time (Console build 11 s, backend boot 10 s, specs 18 s).
## Acceptance notes
- **The one step left is the maintainer's:** add `Live E2E UI` to the
`main` ruleset's required status checks, in the same sitting as the
merge (#9325 two-step). Until then `--verify-required-set` reports the
row in direction A (pinned, not required), report-only.
- Ceiling `timeout-minutes: 40` is derived from one cold local run (≈730
s ⇒ max(36.5, 27.2) ⇒ 40, the rule above Lint UI), since the job has no
CI population yet; the derivation sits beside the job and asks to be
re-derived from the first population. Follow-up: #27228 (re-derive from
at least 20 CI runs and pin it in `turbo-cache-save-bound.test.ts`).
- The gate is Build & E2E UI's, as the card asks: a PR that changes only
backend packages outside `ui/` and the seven `ui_consumers` packages
(for example `packages/runtime`) skips this job, so a backend regression
that breaks the live specs surfaces on the next `ui` PR or on `main`'s
push run. Recorded, not widened.
- Not edited (claim: no spec edited): the header of
`ui/e2e/live/saved-view-filter.spec.ts` still describes the retired
`OBJECTSTACK_VERSION` pin. Follow-up: #27228.
- `vite preview` runs in the background for the rest of the job and is
reaped by the runner at job end; the backend is stopped by
`stop-backend.sh` under `if: always()`.
## Verification
Read this PR's `Live E2E UI` check: steps "Boot the workspace backend"
(ends `ready: seeded sign-in answered on :4010`) and "Run the live e2e
specs" (ends `5 passed`).
---
_Generated by [Claude
Code](https://claude.ai/code/session_01QSeKYoUcDM1MUzjdaCjt6U)_
---------
Co-authored-by: Claude <noreply@anthropic.com>
# The backend's closure (the CLI and the showcase app, the `pkg...` form
4536
+
# Dogfood Verify CLI uses) plus the seven packages the Console builds
4537
+
# against, the same filters as Build & E2E UI's build step.
4538
+
- name: Build the workspace backend and the @objectstack packages objectui consumes
4539
+
run: |
4540
+
pnpm exec turbo run build --concurrency=4 \
4541
+
--filter=@objectstack/cli... \
4542
+
--filter=@objectstack/example-showcase... \
4543
+
--filter=@objectstack/spec... \
4544
+
--filter=@objectstack/client... \
4545
+
--filter=@objectstack/core... \
4546
+
--filter=@objectstack/formula... \
4547
+
--filter=@objectstack/lint... \
4548
+
--filter=@objectstack/sdui-parser... \
4549
+
--filter=@objectstack/types...
4550
+
4551
+
# Served at the root, where the live specs navigate.
4552
+
- name: Build the Console for the live lane
4553
+
env:
4554
+
VITE_BASE_PATH: /
4555
+
run: pnpm --dir ui/apps/console exec vite build
4556
+
4557
+
- name: Get the Playwright version
4558
+
id: playwright-version
4559
+
run: |
4560
+
set -eo pipefail
4561
+
if ! version=$(pnpm --dir ui list @playwright/test --depth=0 --json | jq -r '.[0].devDependencies["@playwright/test"].version'); then
4562
+
echo "::error::Reading the @playwright/test version failed (pnpm list --json | jq). Refusing to write a Playwright browser cache key from it."
4563
+
exit 1
4564
+
fi
4565
+
if [ -z "$version" ] || [ "$version" = "null" ]; then
4566
+
echo "::error::Could not resolve the @playwright/test version (got: '${version}'). Refusing to write an empty or null version into the Playwright browser cache key."
4567
+
exit 1
4568
+
fi
4569
+
echo "version=$version" >> "$GITHUB_OUTPUT"
4570
+
4571
+
# Build & E2E UI saves this key; this job only reads it.
0 commit comments