Skip to content

fix(desktop): revive Desktop Smoke E2E shard 4 after the outcome-first Projects redesign - #129

Merged
oscarlehuu merged 4 commits into
mainfrom
devin/1786362727-fix-109-project-plumbing-e2e
Aug 11, 2026
Merged

fix(desktop): revive Desktop Smoke E2E shard 4 after the outcome-first Projects redesign#129
oscarlehuu merged 4 commits into
mainfrom
devin/1786362727-fix-109-project-plumbing-e2e

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Aug 10, 2026

Copy link
Copy Markdown

Summary

Desktop Smoke E2E (4) has been cancelled at the 30m timeout on every main run since #95. Root cause confirmed by local repro, not inferred: #95 (b57d26def) deliberately moved WorkspaceTabs under <details data-testid="project-plumbing">, closed by default (ProjectOutcomeDetail.tsx:227), and replaced the old overview panel with ProjectOutcomeLanding (ProjectsView.tsx:822). ~19 upstream project-* tests still drive the pre-#95 contract, so each died on getByRole("tab", …) at a 30s timeout; ×3 retries ≈ 95s/test consumed the whole job budget.

Per the founder decision on #109, the upstream specs are adapted (not skipped with Crew-native replacements per the #65 precedent). Recorded as D-034, matching the orchestrator's allocation.

1. Test adaptation — the fork delta

One helper, desktop/tests/helpers/projectPlumbing.ts:

expandProjectPlumbing(page) // waits for project-plumbing, opens it if `open` is absent, waits for tabs to be actionable

called at each project/repository-open site in project-inbox, project-issue-comments, project-pr-review, project-commit-detail. Idempotent, no assertion rewrites. The helper carries a sync-hint comment: on upstream refreshes of these specs, keep both sides and re-add the helper calls. No changes to e2eBridge.ts, so no collision with the #125 / #110 harness work.

Also in the spec layer: the two seeded events below now carry the repo's standard "mocksig".repeat(20).slice(0, 128); the issue-comments test synchronises on the "Comment posted." toast between submissions (pre-existing product behaviour the test simply never reached before); the overview-CSS test is retargeted from the deleted projects-overview-panel/projects-overview-stat nodes to projects-outcome-landing + project-outcome-card-*, preserving its intent (no background painted behind the cards) rather than being skipped.

2. Product fix — the outcome landing lost its work-items error state (regression from #95)

ProjectsWorkItemsLoadNotice was rendered by the pre-#95 activity feed. #95's filter === "all" branch passes only onOpen/projects/pullRequests, while the PR and Issues surfaces kept their error/retry wiring (ProjectsView.tsx:845–882). A failed work-items query therefore rendered a silently empty landing with no way to retry. The notice is restored above the landing with the same inputs. project-pr-review.spec.ts:954 now passes on merit — that test was not modified.

3. Product fix — one malformed relay event could kill the app's relay transport

User-facing bug, found while chasing the last red test, well beyond a CI lane. An event without a sig reaching isVerifiedRelayEvent() threw on event.sig.startsWith(...). The throw escapes handleWsMessage(), whose catch calls resetConnection() — which nulls wsId and rejects in-flight history subscriptions. Every subsequent relay operation then fails at RelayTransportLeaseAuthority.capture() with Relay is not connected., with no user-visible cause and no reconnect. Captured sequence from instrumented run:

[relay-debug] message handler error
  { generation: 3, error: "TypeError: Cannot read properties of undefined (reading 'startsWith')",
    message: ["EVENT","history-5d4f2ba3-…",{"kind":30617,…}] }   ← event has no `sig`
[relay-debug] resetConnection
  { message: "Cannot read properties of undefined (reading 'startsWith')",
    wsId: 2, generation: 3, subscriptions: [ …92 subscriptions… ] }
→ later mutation: fetchEvents() → capture() → "Relay is not connected."

That is 92 live subscriptions torn down by a single malformed event. isVerifiedRelayEvent() now fails closed on a missing/non-string sig or malformed tags instead of throwing, with unit coverage in relayEventVerification.test.mjs. Verification semantics for well-formed events are unchanged.

Related issue

Fixes #109.

Out of scope, per founder: project-outcomes.spec.ts:108 (Crew-only) still fails on getByTestId('message-thread-panel') — untouched here, owned by #125 (root-caused there as a spec-side race where window.__BUZZ_E2E_SEED_MOCK_MESSAGE__?.(…) runs before the bridge globals exist and silently no-ops).

Newly-visible preexisting failures surfaced by reviving the lane are tracked in #132 (see below).

Testing

Acceptance met on this PR's CI — Desktop Smoke E2E (4) completed instead of being cancelled:

Running 250 tests using 1 worker, shard 4 of 4
227 passed / 17 failed / 4 skipped — 22.1m

vs main run 31362178966, where shard 4 was cancelled at the 30m limit with no verdict.

Local, xvfb-run -a pnpm exec playwright test --project=smoke over the four affected spec files:

before after
result ~19 tests × 30s first-assertion timeout (31.4–31.6s in CI, ×3 retries) 32 passed, 0 failed, 4 skipped
wall time shard killed at the 30m job timeout after test 106/250 1.9m

Reproduced the original failure first to confirm the diagnosis:

Error: locator.click: Test timeout of 30000ms exceeded.
Call log: - waiting for getByRole('tab', { name: 'Pull Request' })
  > 30 |   await page.getByRole("tab", { name: "Pull Request" }).click();

Also confirmed the clobber-guard test passes at b57d26def^ in a separate worktree, isolating the regression rather than assuming it.

Gates: pnpm --filter buzz build:e2e, pnpm --filter buzz check, pnpm --filter buzz typecheck, just test-unit (8 groups, 0 failed) all pass.

Docs: STATE.md records the revived shard-4 lane; DECISIONS.md adds D-034.

Remaining red checks are preexisting

Link to Devin session: https://app.devin.ai/sessions/ce99f3d1cda240b78a31902e1b527e3f
Requested by: @oscarlehuu


Open in Devin Review

@oscarlehuu oscarlehuu self-assigned this Aug 10, 2026
@devin-ai-integration

Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

devin-ai-integration Bot and others added 3 commits August 11, 2026 21:10
Signed-off-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Oscar Le <oscar.lehuu@gmail.com>
Signed-off-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Oscar Le <oscar.lehuu@gmail.com>
Signed-off-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Oscar Le <oscar.lehuu@gmail.com>
@oscarlehuu
oscarlehuu force-pushed the devin/1786362727-fix-109-project-plumbing-e2e branch from 240224b to e5b0b7a Compare August 11, 2026 11:40
@oscarlehuu
oscarlehuu merged commit 4b279d6 into main Aug 11, 2026
9 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

e2e shard 4 is a dead lane: cancelled at the 30m timeout on 6/6 consecutive main runs since #95

1 participant