Skip to content

test(desktop): await Plan turn settlement - #3836

Open
liugddx wants to merge 1 commit into
apache:mainfrom
liugddx:fix/3814-plan-catalog-refresh-e2e
Open

test(desktop): await Plan turn settlement#3836
liugddx wants to merge 1 commit into
apache:mainfrom
liugddx:fix/3814-plan-catalog-refresh-e2e

Conversation

@liugddx

@liugddx liugddx commented Aug 26, 2026

Copy link
Copy Markdown
Member

Summary

Stabilize the Plan/catalog-refresh Desktop e2e scenarios by waiting for Runtime Host's authoritative terminal turn ownership before latching the next session-catalog read.

  • adds one shared barrier that requires runningTurnIds to be known-empty;
  • applies it to the four Plan scenarios that first create a session through the fake backend;
  • preserves the existing pending refresh, rejected refresh, queued latest-intent, and deletion-race assertions.

Why

The fake backend response can become visible before Runtime Host publishes terminal turn ownership. The tests previously treated that text as a completion barrier, then observed the Plan row enabled briefly before a late running projection disabled it between the assertion and click.

This reproduced on two unrelated #3789 heads:

  • run 32867280955 timed out on the second Plan click in the latest-intent scenario;
  • run 32870919058 timed out on the first Plan click in the committed-state scenario.

The new barrier uses the same known-empty runningTurnIds authority already used by the Desktop streaming e2e suite. It runs before sessions.list is latched, so the latch still owns only the Plan commit's catalog refresh.

Verification

Local Windows Electron did not create its first test window, so the focused runtime assertion requires the hosted Linux/xvfb CI lane. The failure occurred before the test body and is not counted as passing evidence.

AI use

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool and scope: Codex analyzed the two hosted traces, added the test-only settlement barrier, and ran the listed local gates.

Fixes #3814.

Checklist

  • Tests cover the timing boundary that failed in hosted CI
  • Lint, format, build, typecheck, knip, and diff checks pass locally
  • Hosted test passes on exact head cf56ebbd1

Does this PR entail a change in behavior?

  • Yes
  • No - this changes only Desktop e2e synchronization.

@liugddx

liugddx commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

@Astro-Han Hosted exact-head test is green, including the complete Desktop e2e suite. This PR keeps the existing catalog-failure assertions and adds only the authoritative runningTurnIds settlement barrier before the latch. Could you please review when available?

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Update on cf56ebb: GO — test-only stability fix waits for authoritative terminal state, hosted test green.

简体中文仅测试,无阻断。

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.

test(desktop): stabilize Plan catalog-refresh e2e after turn completion

2 participants