harden(e2e): staging-canvas Playwright — condition-waits + real-content assertions + fail-closed #2277
Reference in New Issue
Block a user
Delete Branch "harden/e2e-staging-canvas-deflake"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Harden the staging Canvas Playwright E2E toward a real gate (CTO "no non-gating CI / real-e2e gate").
continue-on-errorleft in place — promotion to required is the CTO's call.Weak assertions → deterministic fixes (staging-tabs.spec.ts):
assertPanelRendered()polls for settled non-empty non-spinner content.[role="alert"]:has-text("Failed to load")only → any visible alert in the panel fails non-degraded tabs.display/container-configexcluded; display owned by #2275).aria-selected=truebefore asserting content.Fail-closed:
staging-setup.tsnow hard-fails on empty slug/tenantURL/workspaceId/token (no silent partial-state handoff);CANVAS_E2E_STAGING=1+ no state = loud provisioning-failure, not skip→green.PROMOTION-READINESS (still blocks required): real staging EC2 per run (cold-boot infra dependency), shared-zone TLS/DNS flake (upstream),
CP_STAGING_ADMIN_API_TOKENskip-if-absent would skip-green a required check (core#2225), single hermes/platform_managed workspace boots no agent (#2162) so live chat round-trip is unexercised.Verified: tsc --strict clean; playwright --list collects; no-env skips clean exit 0; env-set-no-token hard-errors. Live suite needs staging infra (not run here).
Reviewed: staging-canvas Playwright hardening — condition/content-based waits replacing weak 'renders' gates, stale TAB_IDS parity guard, fail-closed setup. COE preserved (promotion is a separate call). CI green. Approve.
REQUEST_CHANGES: direct Gitea verification does not support approval at head
32e6427483.Source-of-truth combined CI is failure across 30 contexts at the current head. I cannot post a counting approval while the PR is red/pending, even with an existing CEO Assistant approval. Please re-request CR2 review after CI is success on the current head; I will re-run the normal 5-axis review then.
APPROVED after re-review using branch-protection required contexts rather than combined status.
Required-context check: present required context(s) are green at head 32e6427483e1; absent required contexts are path-filter absent for this PR. 5-axis review found no blocking issue.
Summary: Staging canvas Playwright hardening adds condition waits, real content assertions, and fail-closed tab checks.
Correctness/robustness: change adds targeted regression coverage or fail-closed behavior for the reported bug class. Security: no new secret exposure or auth broadening found. Performance: no concerning runtime cost. Readability: comments/tests are explicit about the incident class and gate semantics.