Skip to content

test(desktop): stabilize collaboration mode updates during Runtime Host session churn #2545

Closed

Description

@M4n5ter

Summary

The Desktop E2E test slash suggestions: project gating, collaboration modes, and Deep Research filtering intermittently fails while switching a Session to Plan mode. The Runtime Host Session identity keeps changing throughout the existing bounded poll, so sessions:setCollaborationMode never converges.

This occurred on a PR that only changes activity-card rendering and its E2E coverage. The other E2E shard and all non-E2E CI lanes passed, which points to a timing-sensitive Runtime Host lifecycle race rather than a deterministic regression in that PR.

Observed behavior

Error: page.evaluate: Error: Error invoking remote method 'sessions:setCollaborationMode': DesktopRuntimeHostClientError: Runtime Host Session kept changing during update: dd1f8626-2952-4128-943e-ab8dca42ed8a

The shard result was 19 passed and 1 failed. The sibling E2E shard passed.

Expected behavior

A collaboration-mode update should either:

  • target a stable Runtime Host Session and complete; or
  • cross an explicit readiness/reconnect boundary and retry against the canonical replacement Session.

The caller should not exhaust its bounded wait because Session identity continues changing without a stable point.

Investigation scope

  • Identify why the Session is repeatedly replaced while this test updates collaboration mode.
  • Determine whether the production client needs a canonical reconnect-and-retry contract or the E2E fixture is missing a real readiness boundary.
  • Preserve bounded failure behavior; do not hide the race with an unbounded retry or a fixed delay.
  • Add a deterministic regression at the layer that owns Session replacement and update routing.

Reproduction

npm run e2e --workspace @maka/desktop -- \
  --grep "slash suggestions: project gating, collaboration modes, and Deep Research filtering" \
  --repeat-each=10

Related

Activity

  1. self-assigned this
    on Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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