Skip to content

test(tasks): isolate dispatch rail fixture - #2553

Merged
ymichael merged 1 commit into
mainfrom
bb/ci-flake-fix-tasks-dispatch-target-readiness-thr_icwb6gktfg
Aug 27, 2026
Merged

test(tasks): isolate dispatch rail fixture#2553
ymichael merged 1 commit into
mainfrom
bb/ci-flake-fix-tasks-dispatch-target-readiness-thr_icwb6gktfg

Conversation

@ymichael

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

The dispatch-target rail test mounted the entire Tasks navigation panel even though it only exercises PropertiesRail. That made the "Edit dispatch target" trigger wait for DetailView's unrelated listProjects effect while jsdom rendered the editor, activity view, and the rest of the task shell. In the failing package-shard run, a 4-vCPU runner executed 67 Turbo test tasks; the Tasks suite took 159.69s, this file took 16.55s, and the first case exhausted the existing 8-second Testing Library deadline at 10.62s while its sibling passed after 5.91s. Withholding only listProjects locally reproduced the exact missing-button error and rendered shell in 8.03s. Scheduler oversubscription amplified the avoidable dependency and accessibility-query cost; it was not itself the root cause. PR #2512 changed no Tasks files and its final package run passed, which is consistent with a main-rooted flake.

What changed

  • Install the fake plugin runtime directly and import the exported PropertiesRail instead of loading the full plugin app.
  • Mount the rail with the real TasksRefreshProvider and prebuilt task/project fixtures.
  • Keep the real listBbProjects query, popover interactions, save/unlink RPC lifecycle, and exact payload assertions.
  • Make the project-backed trigger a synchronous assertion because the project is now part of the fixture under test.

No production behavior, wire contract, CLI surface, or deadline changed. Increasing the already-raised 8-second async utility timeout would only move the failure. Awaiting the full panel's project query would remove polling but retain the unrelated editor/tree work; the direct rail seam removes both the irrelevant readiness gate and repeated large accessibility-tree transforms while keeping the behavior lifecycle this test owns. The fresh-main gate was independently verified clean at 1d97c63ed13b5231c1051b7af7ac36661d1f65ab before inspection or edits.

How you verified

  • Exact GitHub open PR/issue searches and literal BB signature searches found no overlapping fix.
  • Diagnostic red: withholding only listProjects made the focused first case fail with Unable to find role="button" and name "Edit dispatch target" after 8.03s; the diagnostic was removed.
  • Controlled 48-burner stress, eight forced package runs before and after:
    • rail file before: 2.82–3.98s, median 3.18s
    • rail file after: 1.00–1.84s, median 1.40s (56% lower)
    • whole Tasks suite before: 17.56–23.94s
    • whole Tasks suite after: 15.84–18.05s; all 2,888 assertions passed
  • pnpm --dir plugins/tasks exec vitest run --config vitest.config.ts views/detail/rail.test.tsx — 2/2 passed in 229ms.
  • pnpm exec turbo run test --filter=bb-plugin-tasks --force — 35 files and 361 tests passed; rail file 348ms.
  • pnpm exec turbo run typecheck --filter=bb-plugin-tasks --force — 5/5 tasks passed.
  • pnpm exec turbo run build --filter=bb-plugin-tasks --force — 6/6 tasks passed.
  • pnpm exec oxfmt plugins/tasks/views/detail/rail.test.tsx --check and git diff --check passed.

AGENT GENERATED: by GPT-5.6-Sol

@ymichael
ymichael merged commit 5cf2f40 into main Aug 27, 2026
24 of 25 checks passed
@ymichael
ymichael deleted the bb/ci-flake-fix-tasks-dispatch-target-readiness-thr_icwb6gktfg branch August 27, 2026 18:29
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.

1 participant