Repository navigation
test(evals): fail the packaged first-launch gate on late caught crashes and unhealthy final UI - #4814
Conversation
…es and unhealthy final UI The packaged first-launch and activated-launch specs re-read renderer exceptions after the settle window but not the surface itself. A React error caught by the root boundary after the screenshot emits no Runtime exception, so a launch whose gate was replaced by the recovery screen, or whose controls vanished, still passed. After the settle wait the world now takes one fresh observation (`world.health()`): the exception witness must still be attached, the Electron process alive, and the final #root must show the expected gate heading with its controls visible and enabled, never the recovery heading. A lost observer or a missing binary is an error, not a skip.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Passed · 12/12 tests · 18/18 assertions · 8 images Commit |
Warden review summary — ClearNative findings: 0. Blocking policy matches before consolidation: 0. Full finding text remains in Warden's native checks and review threads. This comment retains only native IDs, severity, skill attribution, and safe locations. Analysis run Reported trigger coverage (not proof of complete repository or context coverage): diff-security-review (15846 ms), confidentiality-review (25639 ms), spec-provenance-review (49271 ms). Blockers
Advisories
Needs recheck
Observed review-thread metrics
Thread states are read-only collection snapshots. These metrics are neither lifetime totals nor exact resolution times, and this summary is not clearance authority. |
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (aece4bdb2d7dcc9023be4de7f0f1c25d76ae947b). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
Test evidence — a packaged flavor renders its first-launch gate without a render crash — ✅ passedSHA aece4bd · engine v1 ✅ 0/1 screenshots passed · 1 assertion · 1 expectations passed · 0 failed · 0 pending
[probe] eventually(packaged distribution flavor) · eventually(enterprise first-launch gate mounted in #root) ℹ️ ASSERTION — 1. The enterprise desktop mounts "Link this app to your organization" on first launch without a render crash or an unexpected unhandled rejectionFinal #root after 3000 ms: "OpenWork Enterprise\nLink this app to your organization\n\nEnter your workspace address — the page where you downloaded this app. Sign-in finishes in your browser and returns here.\n\nWorkspace address\nCon"; visible enabled controls: [{"tag":"input","text":"","testId":"organization-server-input","visible":true,"enabled":true},{"tag":"button","text":"Continue","testId":"organization-server-continue","visible":true,"enabled":true}]; render crashes: 0; allowlisted rejections: 0 of 0 known; unexpected rejections: 0
⚪ UNVALIDATED — 2. a packaged flavor renders its first-launch gate without a render crash artifact 1
Test run created 2026-09-10T16:48:49.557Z · Source: Companion to the sticky test-evidence comment (which holds |
Pick up #4888 so ci-tests.yml's packaged Fast module step finds its test file. Signed-off-by: Guillaume Loret <[email protected]>
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (13ea80fd9ec839313fcbe2673bded1502224d916). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
…ocker #4814 (merged after #4849 was written) turned the packaged-launch world's missing-binary SkipError into a plain Error. The catalog/spec/world parity test only recognised SkipError guards, so packaged-first-launch and packaged-activated-launch looked like drift although the lane still cannot run them. Recognise `throw new Error` in the same guard window, with a unit case. Signed-off-by: Guillaume Loret <[email protected]>
…ourney failures (split of #4849, no workflow change) (#4901) * ci(evals): report packaged and macOS-only journeys as not applicable in the CI lane The scheduled Full regression selected six packaged enterprise journeys and computer-use-window-scope as local jobs, but no job in daytona-e2e.yml builds a packaged desktop binary or runs on macOS, so each one threw SkipError, recorded 'not tested', and turned red on every run. The lane could neither confirm nor refute changes to activation, updater or quit paths. Journeys now declare what they need beyond placement (an env var or a platform) in the catalog. The planner compares those needs with what the lane provides, excludes journeys it cannot satisfy from the matrix, and lists them in the plan and the verdict as 'not applicable' with the missing need. They no longer count toward passed, failed or not tested, so red means red. The packaged journeys stay covered against a real enterprise build by apps/desktop/scripts/packaged-smoke.mjs in ci-tests.yml on every PR and push. Building that binary inside the nightly is a follow-up. The 'only' dispatch input accepts a comma-separated list so a targeted run can name several journeys. * ci(evals): declare every lane prerequisite a journey guards and refuse delimiter-only filters Second-opinion review of #4849 (9ce91b0), §4 "Requirements and scope": - journey-catalog.mjs:26 declared only OPENWORK_EVAL_ELECTRON_BINARY for released-enterprise-activated, but the spec's update case also requires OPENWORK_EVAL_RELEASED_BASELINE_BINARY (released-enterprise-activated .e2e.test.ts:18-20). A lane providing only the main binary would have scheduled it and skipped. The catalog now names both. - TestNeeds (evals/packages/env/src/needs.ts:3-10) had no `platform`, so the catalog's `needs: { platform }` was planner-only vocabulary. `platform` now lives in TestNeeds and unmetNeeds checks it, and computer-use-window-scope declares `needs: { platform: "darwin" }` alongside its world guard (evals/worlds/computer-use.ts:73), so specs and catalog share one vocabulary. - Parity guard: for every catalog entry with `needs`, journey-ci.test.mjs statically scans the spec and the worlds it imports for `needs: { env, platform }` declarations and for `process.env.OPENWORK_EVAL_*` / `process.platform` checks leading to `throw new SkipError`, and fails on drift in either direction (spec-only addition -> red; catalog-only addition -> silently dropped coverage). Scoped to declared journeys because shared worlds (first-run.ts:582,725) carry scenario-specific guards; per-scenario world plans remain #4771's job. - selectJourneys (journey-catalog.mjs:76-78) treated `only=", ,"` as "run everything". Nonblank delimiter-only input now throws a clear error; blank input still selects everything. Unit-tested. node --test evals/scripts/journey-ci.test.mjs: 16 pass, 0 fail. * ci(evals): report unschedulable journeys as "skipped: lane cannot satisfy prerequisites" in every run Second-opinion review of #4849 (9ce91b0), §3 "Framing and downstream effects": unqualified "not applicable" makes an infrastructure omission sound intentional. The state is a coverage gap and is now named as one. - plan.json / journey-report.json field renamed `notApplicable` -> `excluded` (the only consumers are plan-journeys.mjs, journey-report.mjs and notify-journeys.mjs in the same workflow; nothing external reads it). - Human label everywhere: "skipped: lane cannot satisfy prerequisites" (journey-report.mjs EXCLUDED_LABEL). - The plan step summary and the Full regression verdict summary both print `N journeys skipped (prerequisites unmet)` followed by the list with each journey's unmet need, on every run — not only inside the artifact. The count line reads `P passed · F failed · N not tested · X skipped (prerequisites unmet)`. - Excluded journeys still count toward neither passed, failed nor not tested, a stray result for one cannot count as coverage, and an all-excluded selection still fails the plan job (now with the new wording). node --test evals/scripts/journey-ci.test.mjs: 16 pass, 0 fail. * ci(evals): alert on reclassified journeys as reclassified, never as recovered Second-opinion review of #4849 (9ce91b0), §3 "Must fix": notify-journeys.mjs:7-14 dropped the excluded journeys when validating the report, and :20-28 built incident state from executed entries only, so a journey that went failed -> excluded disappeared from `failures` and the next scheduled run would have announced "Recovered — all selected checks passed" without that journey ever passing. - validateReport keeps `excluded` (spec, name, reason; capped, no overlap with executed results) next to `entries` and `counts`. - Incident state gains `excluded: [spec]`. State written before this field existed reads as "nothing excluded". - A previously failing journey that is now excluded is reported as "reclassified: prerequisite unsatisfied (needs: ...)" with the summary "Executed checks passed — not a recovery"; "Recovered" is only said when nothing was reclassified. Failure alerts carry the excluded count in their count line and list excluded journeys with reasons. Healthy runs with persisting exclusions stay quiet; excluded -> passed is a healthy run. - Transition tests in evals/scripts/notify-journeys.test.mjs: failed -> excluded (reclassified, not Recovered), genuine recovery, excluded persists, excluded -> passed, payload counts/reasons, untrusted reasons escaped. - ci-tests.yml `openwork-tests-core` runs the new file alongside journey-ci.test.mjs and flake-report.test.mjs (evals `pnpm test` already globs scripts/*.test.mjs). node --test evals/scripts/journey-ci.test.mjs evals/scripts/flake-report.test.mjs evals/scripts/notify-journeys.test.mjs: 27 pass, 0 fail. * ci(evals): catalog needs mean whole-file blockers; keep released baseline a case-level need Second-opinion review of #4849 (comment 5628206745, §4) and the audit correction (comment 5628261660): "Do not union prerequisites across a file: that would suppress its runnable launch world." 18d26d6 had declared OPENWORK_EVAL_RELEASED_BASELINE_BINARY as a journey-level need for released-enterprise-activated; only its update case needs it (released-enterprise-activated.e2e.test.ts:18-20), the launch case runs with the main binary alone. - The catalog declares the main binary only again and documents that `needs` means a whole-file blocker; case-level prerequisites stay in that case's own `needs` and skip with their own reason (the verdict counts such a skip as not tested, so the lane that runs this journey must provide both binaries to pass it — #4848). - The parity guard now computes whole-file blockers explicitly: the intersection of every `needs: { env }` declaration in the spec, plus env reads / platform checks leading to `throw new SkipError` in imported world bodies (which every case runs). Mixed-world unit test: a need one case declares is never promoted to the file; world-body guards always are; an optional env read without a SkipError is not a blocker. - `needs` vocabulary stays TestNeeds (needs.ts); no third authority. Per- scenario world plans remain #4771/#4762. node --test evals/scripts/journey-ci.test.mjs: 17 pass, 0 fail. * ci(evals): announce a selection change (newly skipped journey) once, quietly thereafter Second-opinion review of #4849 (comment 5628206745, §3): "propagate count/reasons and selection changes through Slack/state". 31131a4 carried excluded journeys in state and distinguished reclassification from recovery, but a journey that moved from passing to excluded (a lane or catalog change removing coverage) stayed silent. - When prior state exists, journeys excluded now but not in `previous.excluded` (and not reclassified failures) are announced once as "Executed checks passed — coverage changed: N journey(s) newly skipped (prerequisites unmet)" with each journey's need; the next run with the same exclusions is quiet. State from before the field existed announces the current exclusions once. No prior state at all stays quiet. - Failure alerts already list every excluded journey with reasons and are unchanged. node --test evals/scripts/journey-ci.test.mjs evals/scripts/flake-report.test.mjs evals/scripts/notify-journeys.test.mjs: 29 pass, 0 fail. * ci(evals): distinguish unsatisfied lane prerequisites from executed journey failures, without workflow edits Split of #4849: every behavioural change lives in evals/scripts (planner, report, alert), evals/packages/env (TestNeeds.platform) and one spec's needs declaration. The two one-line .github/workflows edits (the `only` input description in daytona-e2e.yml and the explicit notify-journeys test in ci-tests.yml's core job) are dropped here so Warden can self-clear this PR; they stay in #4849, stacked on this branch, for a human review. Signed-off-by: Guillaume Loret <[email protected]> * test(evals): count a hard-error prerequisite guard as a whole-file blocker #4814 (merged after #4849 was written) turned the packaged-launch world's missing-binary SkipError into a plain Error. The catalog/spec/world parity test only recognised SkipError guards, so packaged-first-launch and packaged-activated-launch looked like drift although the lane still cannot run them. Recognise `throw new Error` in the same guard window, with a unit case. Signed-off-by: Guillaume Loret <[email protected]> --------- Signed-off-by: Guillaume Loret <[email protected]>
Summary
packaged-first-launchandpackaged-activated-launchare the only specs that boot the packaged cloud/enterprise artifacts on a fresh profile. After the screenshot they wait a 3 s settle window and then re-read renderer exceptions only. A React error caught by the rootAppErrorBoundaryin a production build emits noRuntime.exceptionThrown, so a launch whose gate was replaced by the "OpenWork hit an unexpected error" recovery screen during that window — or whose controls vanished — still passed. The premise still holds ondev(2ed12f72d).This makes the gate re-observe the actual surface after the last wait:
evals/worlds/packaged-first-launch.ts: newworld.health()takes one fresh observation — the exception witness must still be attached, the Electron process alive (kill -0), and it returns#roottext plus everyinput/buttonwithvisible/enabledstate.exceptions()also asserts the witness is still attached, so a lost observer can no longer heal into a green run. A missingOPENWORK_EVAL_ELECTRON_BINARYis now an error, not aSkipError(a named spec that skipped already exited 2 viaevals:e2e; the journey report treats both as "not tested").#rootdoes not match the recovery heading (now alsoOpenWork couldn't start), still contains the expected gate heading, and that the gate's controls (organization-server-input/organization-server-continue, orSign in to OpenWork/Paste sign-in code) remain visible and enabled. The assertion evidence now records the final state and controls instead of the pre-screenshot DOM.No product code changes. +66/−13 across the three files.
Verification (head
aece4bdb2, rebased ondev2ed12f72d)Lane: local (macOS arm64). The packaged journeys are catalog placement
localand need a packaged binary the Daytona lane does not provision; the original investigation of this false positive ran on Daytona against Linux packages built in-sandbox (baseline 2/2 red → patched 4/0, plus fresh enterprise / activated / cloud 1/0/0 each with WebGL unavailable) on586c4100f.Enterprise build from this head:
node apps/desktop/scripts/electron-build.mjs && CSC_IDENTITY_AUTO_DISCOVERY=false pnpm --dir apps/desktop exec electron-builder --config electron-builder.enterprise.yml --mac --dir --publish never(both exit 0). Every spec run usedOPENWORK_EVAL_ELECTRON_RESOURCES_PREPARED=1 OPENWORK_EVAL_ENGINE=v1and an isolatedOPENWORK_EVAL_SURFACES_DIR, withOPENWORK_EVAL_ELECTRON_BINARYpointing at the built.app.pnpm evals:e2e packaged-first-launch --localpnpm evals:e2e packaged-activated-launch --localtsconfig.primitives.json)pnpm --dir evals exec tsc -p <scoped tsconfig>pnpm --dir evals run check:browsergit diff --check origin/dev HEADpnpm --dir evals run typecheck(tsc -p .) reports 400 pre-existing errors, all under../apps/appand../packages/email, none in the changed files.evals/scripts/spec-channel-ratchet.mjsis red ondevfor unrelated specs (same failure reproduced in a cleandevworktree).CI on this head (
openwork-tests-build→packaged-smoke, Linux/xvfb, no WebGL) ran the new gate against the packaged artifacts it builds:desktop-boot-enterprise(packaged-first-launch, enterprise),desktop-boot-cloud(packaged-first-launch, cloud) anddesktop-boot-enterprise-activated(packaged-activated-launch) all exit 0 — run 34505357196.Negative control: the old gate passes a late caught crash, the new gate fails it
A throwaway enterprise build (never committed) adds a child inside the unchanged
AppErrorBoundarythat throws during render N ms after the gate heading mounts — after the spec'snotSeeobservation(s) and screenshot, inside the 3 s settle window. Same head, same commands, only the binary and the gate files differ:origin/devpackaged-first-launchpackaged-first-launchstartup recovery appeared during settle: expected 'OpenWork hit an unexpected error…' not to match …origin/devpackaged-activated-launchpackaged-activated-launchstartup recovery appeared during settle(A fault fired earlier, at heading+1.2 s or +4.5 s on the activated surface, is caught by both gates'
notSeeobservation — the false positive is specific to the settle window after the screenshot.)Not included
The Daytona fixture used for the original investigation (
followup-startup-*.live.test.ts,evals/fixtures/followup-startup-health/) is bound to one sandbox id and the586c4100fsource pin and mocks@openwork/testkit; it stays as investigation evidence rather than repo tooling.