Skip to content

test(desktop): stabilize WorkHub correction E2E - #3763

Merged
Astro-Han merged 1 commit into
apache:mainfrom
sunrioa:codex/fix-workhub-correction-e2e-title-race
Aug 25, 2026
Merged

Astro-Han merged 1 commit into
apache:mainfrom
sunrioa:codex/fix-workhub-correction-e2e-title-race

Conversation

@sunrioa

@sunrioa sunrioa commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Make the WorkHub natural-language correction E2E independent of asynchronous automatic title generation.
  • Explicitly rename the source Session through the existing Desktop session API before enabling WorkHub.
  • Reuse the same deterministic Session name for input and assertions.
  • This is a test-only change and does not modify production behavior.

Fixes #3762

Verification

  • Before the fix, the focused test failed 3 of 10 repeated runs because the Session was still named New Chat.
  • After the fix, the same 10-run test was executed twice: 20/20 passed.
  • WorkHub reconstruction E2E: 2/2 passed.
  • WorkHub-related Desktop unit tests: 92/92 passed.
  • Full Desktop E2E: 65 passed, 1 skipped.
  • Desktop unit suite on the CI Node.js 24 runtime: passed.
  • npm run lint
  • npm run format:check
  • npm run build
  • npm run typecheck
  • npx knip --workspace apps/desktop
  • npx knip --workspace packages/ui

AI use

Select exactly one:

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

Tool(s) and scope:

OpenAI Codex analyzed the title-generation race, implemented the E2E-only change, ran local verification, and reviewed the diff. The human contributor reviewed the final change and owns the submission.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

@sunrioa
sunrioa marked this pull request as ready for review August 25, 2026 05:16

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

The E2E now explicitly renames the Session to a deterministic constant before enabling WorkHub, so the async auto-title no longer renames it mid-assertion. Both the gate (titleIsManual) and the storage backstop (setGeneratedTitleIfAbsent) prevent overwrite, and the assertion covers the real product path.

Checks on 5bbebd8252 are test: success.

简体中文该头未发现阻断。

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

APPROVE — 5bbebd8, no P0-P2, E2E race correctly closed.

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

APPROVE — 5bbebd8, no P0-P2.

@Astro-Han
Astro-Han merged commit 475d546 into apache:main Aug 25, 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.

[Desktop E2E] WorkHub correction test flakes while automatic session title is pending

2 participants