Skip to content

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

Merged
M4n5ter merged 1 commit into
apache:mainfrom
liugddx:fix/3814-plan-catalog-refresh-e2e
Aug 26, 2026
Merged

test(desktop): await Plan turn settlement#3836
M4n5ter merged 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

  • npm run lint
  • npm run format:check
  • npm run build
  • npm run typecheck
  • npx knip --workspace apps/desktop
  • git diff --check
  • Playwright discovery compiles and selects the focused scenario correctly.
  • Hosted test passed in 9m11s, including the complete Desktop e2e suite.

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 e62c5756e

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.

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

@liugddx
liugddx force-pushed the fix/3814-plan-catalog-refresh-e2e branch from cf56ebb to e62c575 Compare August 26, 2026 01:17
@liugddx

liugddx commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

Fresh exact-head est is green on �62c5756e after rebasing onto main=8ff9528eb, including the full Desktop e2e suite. #3814 is ready for maintainer review and merge.

@liugddx

liugddx commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

@Astro-Han Current exact head �62c5756e is rebased onto main=8ff9528eb. Hosted est run 32918399089 is green, including all Desktop e2e tests. The barrier is test-only and #3814 remains open until this PR merges.

@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.

I reviewed this head and found no blocking issues.

Rebase-only change from cf56ebb; test-only Plan turn settlement still waits for authoritative empty runningTurnIds before latching catalog. Hosted test: SUCCESS (32918399089).

No P0-P3.

简体中文该头无阻断。

Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.

@M4n5ter
M4n5ter merged commit f6bc66a into apache:main Aug 26, 2026
1 check 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.

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

3 participants