test(e2e): restore workspace-aware P0 coverage - #6445
Conversation
mrcfps
left a comment
There was a problem hiding this comment.
@AmyShang-alt thank you for this careful E2E cleanup — it is a real reliability win.
I reviewed the full changed range on 01e8647c:
- Hermetic Vela status —
routeSignedOutVelaStatusinapplyStandardMocks(and the targeted use inapi-empty-response) correctly isolates local/BYOK project-create flows from a host machine’s signed-in AMR session, while still letting suite-level signed-in routes register later and win under Playwright’s LIFO route matching. - Suite consolidation — moving app / design-files / manual-edit / restoration onto
applyStandardMockspreserves the prior standard config and adds the missing authority witness without changing those specs’ agent fixtures. - Coverage matrix —
entry-automationsis wired consistently throughuiP0Groups,uiP0CiMatrix, coverage files, the six-domain scope guard, and the packaged-smoke / scopes expectations, so the six Automations P0 cases actually run in CI. - Obsolete P0 removal — dropping the permanently skipped Home starters plugin-input P0 is appropriate now that
plugins-home-sectionis gone after #5517.
No correctness, safety, or maintainability blockers in the changed ranges. Nice work making the P0 surface workspace-aware and less environment-dependent. 🙌
🔁 Powered by Looper · runner=reviewer · agent=grok-build · An autonomous AI dev team for your GitHub repos.
|
The E2E coverage cleanup itself looks solid, and the root-cause + validation sections already make the test intent easy to follow. One quick PR-body follow-up: could you add a short Why section (the user/problem framing), a What users will see section, and tick the Surface area box — likely |
Generated-By: looper 0.11.7 (runner=fixer, agent=codex)
mrcfps
left a comment
There was a problem hiding this comment.
@AmyShang-alt thank you for this careful E2E reliability cleanup — the second commit makes the collab waits as deliberate as the hermetic mock work.
I re-reviewed the full changed range on 589e66f6:
- Hermetic Vela status —
routeSignedOutVelaStatusinapplyStandardMocks(and the targeted use inapi-empty-response) keeps local/BYOK project-create flows independent of a host machine’s signed-in AMR session, while suite-level signed-in routes registered later still win under Playwright’s LIFO matching. - Suite consolidation — app / design-files / manual-edit / restoration now share
applyStandardMocks, so they pick up the authority witness without changing their agent fixtures or standard config shape. - Coverage matrix —
entry-automationsis wired consistently throughuiP0Groups,uiP0CiMatrix, coverage files, the six-domain scope guard, and the packaged-smoke / scopes expectations; CI already shows the new shard green. - Obsolete P0 removal — dropping the permanently skipped Home starters plugin-input case is appropriate after the gallery retirement, with remaining P2 coverage still exercising plugin input binding.
- Collab race hardening — the replacement client now dispatches
pagehide(matchinguseCollab→leaveBeacon) and awaits the daemon leave beforepage.close(), andopenHomeAndPinWorkspacewaits for/api/workspace/eventsafter reload so live invalidations are not emitted against a shell that has not finished hop 2.
No correctness, safety, or maintainability blockers in the changed ranges. Nice work making the P0 surface workspace-aware and less flaky. 🙌
🔁 Powered by Looper · runner=reviewer · agent=grok-build · An autonomous AI dev team for your GitHub repos.
mrcfps
left a comment
There was a problem hiding this comment.
@AmyShang-alt thank you for this careful E2E reliability cleanup — the collab slim-down is a real CI-budget win without abandoning the cross-layer witness.
I re-reviewed the full changed range on 1af2d83b:
- Hermetic Vela status —
routeSignedOutVelaStatusinapplyStandardMocks(and the targeted use inapi-empty-response) keeps local/BYOK project-create flows independent of a host machine’s signed-in AMR session, while suite-level signed-in routes registered later still win under Playwright’s LIFO matching. - Suite consolidation — app / design-files / manual-edit / restoration now share
applyStandardMocks, so they pick up the authority witness without changing their agent fixtures or standard config shape. - Coverage matrix —
entry-automationsis wired consistently throughuiP0Groups,uiP0CiMatrix, coverage files, the six-domain scope guard, and the packaged-smoke / scopes expectations, so the Automations P0 cases actually run in CI. - Obsolete P0 removal — dropping the permanently skipped Home starters plugin-input case is appropriate after the gallery retirement.
- Collab cluster lifecycle — concurrent
Promise.allSettledstart with partial-acquisition cleanup, parallel close, and the new concurrent start/stop unit coverage look correct; port allocation still holds sockets until start and retries on conflict. clusterTest+ pin-before-navigate — skipping the unused worker runtime for the cluster-owned shard, pinning active Workspace before first navigation, waiting for/api/workspace/events, and keeping the P0 chain on content / presence / unshare / role transitions is a coherent cross-layer gate; lower-layer contracts remain owned elsewhere as the PR describes.
No correctness, safety, or maintainability blockers in the changed ranges. Nice work making the P0 surface workspace-aware, hermetic, and runnable under the 12-minute fleet budget. 🙌
🔁 Powered by Looper · runner=reviewer · agent=grok-build · An autonomous AI dev team for your GitHub repos.
mrcfps
left a comment
There was a problem hiding this comment.
@AmyShang-alt thank you for this careful E2E reliability cleanup — the workspace split and upload assertion fix are a real CI-budget and flake-reduction win.
I re-reviewed the full changed range on 843fd1fd:
- Hermetic Vela status —
routeSignedOutVelaStatusinapplyStandardMocks(and the targeted use inapi-empty-response) keeps local/BYOK project-create flows independent of a host machine’s signed-in AMR session, while suite-level signed-in routes registered later still win under Playwright’s LIFO matching. - Suite consolidation — app / design-files / manual-edit / restoration now share
applyStandardMocks, so they pick up the authority witness without changing their agent fixtures or standard config shape. - Coverage matrix —
entry-automationsandproject-workspace-editorare wired consistently throughuiP0Groups,uiP0CiMatrix,uiP0CoverageFiles, the guard’s seven-domain contract, and the scope/workflow topology tests; no file falls out of the merge gate. - Collab lifecycle — concurrent start/stop with partial-acquisition cleanup,
clusterTest(no unused default worker runtime), pin-before-navigate + workspace event readiness, and the slimmed cross-layer witness remain sound; the new concurrency unit test pins the parallel lifecycle intent. - Assertion hardening — locator-native
toHaveCSSavoids stale iframe execution contexts; removing the globalreference.txttext match leaves the staged-attachment and post-send.user-attachmentswitnesses intact.
No correctness, safety, or maintainability blockers in the changed ranges. Nice work getting P0 coverage hermetic and keeping the long shards under the runner budget.
🔁 Powered by Looper · runner=reviewer · agent=grok-build · An autonomous AI dev team for your GitHub repos.































































Why
Workspace-aware project creation made several P0 suites depend on the runner's real Vela session, while the Automations P0 cases were absent from the merge-gated matrix. The multi-client collaboration shard also paid for redundant and serial runtime startup, pushing the runner past its 12-minute hard limit. This cleanup restores hermetic, complete P0 coverage and keeps the collaboration gate inside the runner budget.
After the collaboration optimization,
project-workspacebecame the remaining long UI P0 path: the slowest observed job took 13m12s, while a later merge-queue run still took 9m26s with one retry. The workspace suite is now split into two runner-isolated, balanced jobs without enabling unsafe in-job client parallelism.What users will see
No product UI changes. Contributors get deterministic local/BYOK project-creation tests, CI runs the Automations P0 scenarios in their own shard, and both collaboration and workspace gates finish substantially faster.
Surface area
What changed
entry-automationsshard, and update the coverage guard accordingly.project-collablimited to the cluster-owned spec and move the ordinary keyboard-flow spec back toproject-workspace.project-workspaceinto core and editor jobs using historical file timings while retainingworkers: 1inside each isolated runner.evaluate()poll with locator-nativetoHaveCSS, so navigation does not leave a stale execution context.Root cause
After Workspace support was merged, a signed-in Vela account requires an exact Workspace authority. Several older E2E suites did not mock the login status, so their behavior depended on the runner's real account state. Project creation could therefore be rejected before
POST /api/projectswas sent.In addition,
automations-page.test.tscontained P0 tests but was not registered in the UI P0 coverage list or CI matrix, so CI could not detect regressions in those scenarios.The collaboration spec owned two isolated daemon/web clients but still inherited the default Playwright worker runtime, started and stopped both clients serially, navigated both clients through redundant Home reloads, and repeated lower-layer scenarios inside the longest browser chain. That made a passing shard exceed the runner's 12-minute wall-clock limit. The optimized lifecycle removes the unused runtime, starts the real clients concurrently, performs one readiness-gated navigation per browser witness, and keeps the P0 chain at the cross-layer boundary.
The workspace P0 job then ran all editor, core project, management, keyboard, and design-system scenarios serially in one runner. Directly increasing Playwright workers breaks Workspace/API authority isolation, so the safe optimization is runner-level file sharding with one worker per job. Two navigation-sensitive assertions also caused avoidable whole-worker retries.
Validation
UI P0 (project-collab): 2/2 passed; test domain completed in 2m11s and the full job in 3m34s.project-collabentry: 2/2 passed in 1.8 minutes locally.mainintegration.31064947330passed the full workflow and both workspace jobs without retries:project-workspace: 25/25 tests in 4.0m; full job 5m32s.project-workspace-editor: 13/13 tests in 4.4m; full job 5m51s.pnpm guardpassed.pnpm typecheckpassed.pnpm -C e2e typecheckpassed.Hosted runner wall-clock acceptance and the complete required matrix passed on the exact optimization commit now at this PR's head.