Repository navigation
Commit e5cce09
test(ui): promote the Studio live specs into Live E2E UI, with a stored-state re-read each (#27770)
<!-- claude-projects-attribution: {"github_login":"os-bill"} -->
_Requested by **Bill** · [project
thread](https://claude.ai/code/project/chan_016iMXWSZDzqWRWvWzdNo8wg?thread=cmsg_016iMXWSZDzqWRWvWzdNo8wg4i9JiKjEjwtuVzd4gKy9hB)_
Fixes #27554
Clause-②: no
Metadata-protocol: none
## 维护者速读
- **改了什么**:Studio 的两组浏览器实时用例(对象设计器 F1–F4、页面编辑器)从「只在夜间跑」移进必过检查 `Live E2E
UI` 的清单;两组各加一条「保存后经 `/meta` 回读存储内容」的断言。
- **为什么改**:Studio
保存路径近期多次在合并后才被发现坏掉(#27459、#27461、#26917),而这两组用例只在夜间跑、红了不拦合并;加回读断言后,测的是真正存下来的东西,而不只是界面状态。
- **风险与回滚**:只动测试和 `ui/package.json` 的两条脚本清单,不改产品代码。代价是 `Run the live e2e
specs` 步骤本地从约 18 秒变成约 36 秒,仍远低于 #27550 定的 2 分钟预算。回滚 = 把两个文件名移回
`test:e2e:live:nightly`。
- **先看**:`ui/e2e/live/studio-object-designer.spec.ts` 的
F4(新建可写包、保存、回读草稿);`ui/e2e/live/studio-editor.spec.ts` 的 Add block
用例尾部;`ui/package.json` 两条脚本。
- **两分钟验证**:看本 PR 的 `Live E2E UI` 检查日志,`Run the live e2e specs` 步骤应列出 11
条全部通过,其中 6 条来自两个 studio 文件,步骤耗时在 2 分钟内。
- **需要你做的**:无,席位落地。
## What changes
- `ui/package.json`: `studio-object-designer.spec.ts` and
`studio-editor.spec.ts` move from `test:e2e:live:nightly` to
`test:e2e:live:ci`, the allowlist the required `Live E2E UI` job runs.
Both passed the promotion rule (readings below), so neither stays in
nightly and no header carries a "kept in nightly" reason.
- `studio-object-designer.spec.ts` F4 now saves and reads back. The
showcase package is provided by code, so a save into it is refused
(`WRITABLE_PACKAGE_REQUIRED`, measured: `PUT
/api/v1/meta/object/NAME?mode=draft&package=com.example.showcase`
answers 422). F4 therefore authors its own package through `POST
/api/v1/packages`, opens the designer on it, runs the same picklist +
empty-row steps and the same two negative banner assertions as before,
clicks Save, asserts the `PUT ...?mode=draft` answered 2xx, and reads
`GET /api/v1/meta/object/NAME?state=draft`: the stored object has
exactly one `select` field and its `options` equal `[{ value: 'open',
label: 'Open' }]`, so the empty row was not stored. The package is
deleted in `finally`, as F1 already does for its own.
- `studio-editor.spec.ts` "Add block opens a block-type picker…" now
picks Card after asserting the picker, waits for the editor's autosave
`PUT /api/v1/meta/page/NAME?mode=draft` (asserted 2xx), and reads `GET
/api/v1/meta/page/NAME?state=draft`: the first region holds one more
block than the shipped copy, and the new last block is `page:card`.
- Both headers say they are in the `:ci` allowlist since this card,
under the rule, the way `saved-view-filter.spec.ts` says it.
## Why
The card's task 1–4: measure, promote what passes the 3/3 + 5/5 rule,
add one stored-state re-read per spec, stay inside #27550's 2-minute
budget for the `Run the live e2e specs` step. Both specs fit, so the
higher-yield-only fallback (F4 / F1) did not apply.
## Verification
All runs: this branch's workspace backend
(`ui/e2e/live/ci/start-backend.sh`, `objectstack dev --seed-admin
--fresh` on `examples/app-showcase`, port 4010) and the Console
production build (`VITE_BASE_PATH=/ vite build`) served by `vite
preview` on 5190 with `DEV_PROXY_TARGET`, the `Live E2E UI` job's stack
step for step; `--retries 0`; one long-lived backend across all runs
(the CI job boots a fresh one per run, so this is the harder condition).
Container: 4 shared cores.
| Reading | Runs | Result | Playwright total per run |
|---|---|---|---|
| Baseline, both specs unchanged (task 1) | 10 | 10/10 green, 60/60
tests | 16.4–17.9 s |
| Both specs as changed here | 10 | 10/10 green, 60/60 tests (incl. 3/3
consecutive) | 19.1–20.0 s |
| Enlarged allowlist, `pnpm run test:e2e:live:ci` (task 2's 5/5) | 5 |
5/5 green, 55/55 tests | 33.9–37.2 s (wall 35.3–38.7 s) |
| Incumbent four specs alone (control) | 3 | 3/3 green | 16.7–17.8 s
(wall 18.0–19.3 s) |
<details><summary>Per-test time, 10 runs each (mean / max)</summary>
| Test | Before | After |
|---|---|---|
| designer F1 (package switcher) | 2.4 / 2.5 s | 2.4 / 2.5 s |
| designer F2 (typed underscore) | 2.1 / 2.2 s | 2.2 / 2.3 s |
| designer F3 (label to API name) | 2.3 / 3.3 s | 2.4 / 2.6 s |
| designer F4 (picklist empty row; now saves + re-reads) | 3.6 / 4.0 s |
4.0 / 4.4 s |
| editor, page editor loads | 2.8 / 3.0 s | 2.8 / 3.0 s |
| editor, Add block picker (now adds Card + re-reads draft) | 2.8 / 3.1
s | 4.6 / 5.0 s |
</details>
Budget: the two specs add about 18–20 s to the step locally (incumbent
four 18–19 s wall, enlarged six 35–39 s). The job comment in `ci.yml`
measured the incumbent step at 14–24 s (median 21 s) on CI, so the
projected step is about 40 s, against the 120 s budget. This PR's own
`Live E2E UI` run is the first CI reading.
Nightly readings: the nightly live tier that runs
`test:e2e:live:nightly`
(`examples/app-showcase/test/console-live-specs.live.test.ts`) has at
most two scheduled runs since it was wired (2026-10-28 and 2026-10-29),
and both of those `Nightly tiers` runs failed on other shards' packages;
their per-spec logs were not readable from this container (the job-log
download is refused by the proxy). The ≥ 10 readings are therefore the
local ones above, which the card allows.
No ablation: the diff changes tests and a script list only, no product
behaviour.
Gates at head `75f8060c`: `node scripts/pm/dispatch-gates.mjs
--commands` derived 31 families from the three changed paths; each ran
locally, plus `node scripts/check-sdui-manifest.mjs`: 32 lines, every
one exit 0; `--ran` reconciliation: 31 derived, 31 run, 0 NOT-MEASURED,
0 UNRUN. CI runs the rest (the repo-wide scans, `Live E2E UI` itself).
<details><summary>Gate lines (command :: exit code)</summary>
```text
node scripts/check-closing-keyword-parity.mjs :: exit 0
node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0
node scripts/check-comment-mask-corpus.mjs :: exit 0
node scripts/check-osv-exemptions.mjs :: exit 0
node scripts/check-osv-exemptions.mjs --self-test :: exit 0
node scripts/osv-base-relative.mjs --self-test :: exit 0
pnpm --filter @objectstack/spec run check:llms-txt :: exit 0
pnpm check:changeset-fixed :: exit 0
pnpm check:cross-package-test-inputs :: exit 0
pnpm check:dispatcher-error-vocabulary :: exit 0
pnpm check:driver-memory-census :: exit 0
pnpm check:engine-double-contract :: exit 0
pnpm check:gitlink-declared :: exit 0
pnpm check:manifest-repository-directory :: exit 0
pnpm check:merge-driver :: exit 0
pnpm check:nul-bytes :: exit 0
pnpm check:override-consistency :: exit 0
pnpm check:pnpm-flag-spellings :: exit 0
pnpm check:published-files :: exit 0
pnpm check:query-options-erasure :: exit 0
pnpm check:refd-timer-probe :: exit 0
pnpm check:test-source-alias :: exit 0
pnpm check:tier-file-adoption :: exit 0
pnpm check:turbo-task-graph :: exit 0
pnpm check:type-check-coverage :: exit 0
pnpm check:type-check-debt :: exit 0
pnpm check:undeclared-dep-imports :: exit 0
pnpm check:vendor-export-contract-resolve :: exit 0
pnpm check:watch-hint-literal :: exit 0
pnpm check:where-matcher :: exit 0
pnpm check:workspace-manifest-cycles :: exit 0
node scripts/check-sdui-manifest.mjs :: exit 0
```
</details>
## Acceptance notes
- `.github/workflows/ci.yml`'s `live-e2e-ui` comment still says "What it
runs: the four allowlisted live specs"; it is now six. `ci.yml` is out
of bounds for this card, so the wording is left for whoever next edits
that job; the count is not read by any gate.
- `examples/app-showcase/test/console-live-specs.live.test.ts` says
"Four of its specs are the required `Live E2E UI` job". Same stale
count, outside this card's file surface; the test reads the nightly
script by name, so its behaviour is unchanged (13 specs instead of 15).
- `docs/qa/platform-checklist/areas/studio-authoring.json` says F4
"never publishes or reads the stored options". F4 now saves a draft and
reads its stored options (it still does not publish), so that note is
narrower than the spec now is; the ledger is its owner's to re-read,
outside this card.
- Siblings #27551 and #27552 edit the same two script lines; whichever
lands second takes a one-line merge.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01Utp6CaYrosoxy8gyWwRM83)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent 21c4bdd commit e5cce09
3 files changed
Lines changed: 89 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
20 | 24 | | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
24 | | - | |
25 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
26 | 32 | | |
27 | 33 | | |
28 | 34 | | |
29 | 35 | | |
30 | 36 | | |
31 | 37 | | |
32 | 38 | | |
| 39 | + | |
33 | 40 | | |
34 | 41 | | |
35 | 42 | | |
36 | 43 | | |
37 | 44 | | |
38 | 45 | | |
39 | | - | |
| 46 | + | |
40 | 47 | | |
41 | 48 | | |
42 | 49 | | |
| |||
62 | 69 | | |
63 | 70 | | |
64 | 71 | | |
65 | | - | |
66 | | - | |
| 72 | + | |
| 73 | + | |
67 | 74 | | |
68 | 75 | | |
69 | 76 | | |
| |||
76 | 83 | | |
77 | 84 | | |
78 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
79 | 101 | | |
80 | 102 | | |
81 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
| |||
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
24 | 42 | | |
25 | 43 | | |
26 | 44 | | |
| |||
52 | 70 | | |
53 | 71 | | |
54 | 72 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
72 | 113 | | |
73 | 114 | | |
74 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
115 | | - | |
| 114 | + | |
| 115 | + | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| |||
0 commit comments