Skip to content

Stabilize browser Xvfb lifecycle tests under full-suite load #32

Closed

Description

@ElbertePlinio

Problem

Browser lifecycle tests intermittently fail only under the fully parallel suite while passing consistently in isolation. Recent evidence-foundation branches do not touch browser/X11 code, but independently observed failures around:

  • X11 socket cleanup after cancellation
  • abort during Xvfb startup
  • display/socket liveness timing

The focused packages/browser/test/session.test.ts suite passes 25/25, and subsequent full/coverage reruns pass. This is test/environment nondeterminism rather than an evidence-feature regression, but it can block unrelated PRs and hosted CI.

Checklist

  • Capture exact failing branches and timing under repeated full-suite load
  • Determine whether shared /tmp/.X11-unix, display allocation, or cleanup observation races
  • Add deterministic synchronization rather than increasing timeouts
  • Stress the focused browser suite alongside other Xvfb suites
  • Verify local and hosted CI stability

No feature flag: test reliability only.

Current status: Planned
Next: reproduce with a targeted parallel stress harness after issue #20 foundation PRs.

Activity

  1. ElbertePlinio commented on Jul 13, 2026

    @ElbertePlinio
    MemberAuthor

    Agent plan

    Goal: remove the deterministic Xvfb startup/cleanup race now blocking PR #35 without weakening lifecycle assertions or increasing timeouts.

    Checklist:

    • Reproduce the full-suite timing failure
    • Identify the ownership-handoff/startup-marker race
    • Add a focused regression test and smallest synchronization fix
    • Stress browser + desktop Xvfb suites in parallel
    • Full test, coverage, build, typecheck
    • Focused review and PR

    No feature flag: test/lifecycle reliability only.

    Current status: In progress
    Next: trace the failing startup branch and reproduce it under parallel load.

  2. ElbertePlinio commented on Jul 13, 2026

    @ElbertePlinio
    MemberAuthor

    Progress update:

    • Reproduced the marker publication assumption deterministically
    • Wait for a complete PID/display marker before aborting
    • Preserved all Xvfb process-group, socket, record, and runtime cleanup assertions
    • 60 focused stress passes
    • 12 parallel browser + desktop-linux suite passes
    • Full test + coverage: 820 passed / 2 skipped
    • Typecheck + build
    • Independent review: clean
    • Required CI
    • Merge

    PR: #36
    Blocked: none
    Next: verify required CI, then merge and unblock #35.

  3. ElbertePlinio commented on Jul 13, 2026

    @ElbertePlinio
    MemberAuthor

    Done:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions