fix(desktop): externalize WebView2 release smoke / 将 WebView2 发版烟测移出生产 EXE - #8333
Open
SivanCola wants to merge 4 commits into
Open
fix(desktop): externalize WebView2 release smoke / 将 WebView2 发版烟测移出生产 EXE#8333SivanCola wants to merge 4 commits into
SivanCola wants to merge 4 commits into
Conversation
Problem: The Windows approval smoke compiled test-only environment triggers, HTML injection, a Wails bridge, and automated interaction code into the customer Desktop executable. That expanded the signed binary surface and could affect heuristic antivirus classification. Root cause: The release gate used the production executable as both the shipped application and the approval-test harness. Fix: Move approval interaction coverage to a real Chromium browser gate, replace the Windows check with an external exact-binary startup/renderer/health/graceful-close smoke, remove all embedded smoke instrumentation, and lock the split with workflow contracts. Verification: - pnpm --dir desktop/frontend test:motion - pnpm --dir desktop/frontend test:motion-browser - pnpm --dir desktop/frontend build - cd desktop && go test ./... - bash scripts/release-workflows.test.sh - actionlint for ci.yml and release-desktop.yml
Sync the published PR branch with the latest protected base without rewriting fork history. This incorporates the current task-budget and completion-receipt changes before the Windows smoke follow-up.
Problem: The Windows native smoke failed immediately during a transient WebView2 renderer handoff, while its browser gate still exercised Vite preview instead of proving that the exact production executable rendered its UI. Root cause: The health loop treated one unhealthy sample as terminal and only checked the native window plus renderer process. It had no deterministic state-machine coverage and no external page-readiness signal for the built executable. Fix: Require a consecutive healthy interval that resets on transient samples, inspect the production window accessibility tree for a WebView2 document and editable composer, and add a PowerShell self-test plus CI/release contract coverage. Verification: - go test focused Windows release contracts - pnpm test:motion and test:motion-browser - pnpm frontend production build and bundle budgets - release workflow contract tests - repolint and git diff --check - transient updater test repeated five times
Problem: The external WebView2 smoke treated any UI Automation Edit control as the desktop composer, so the first-run API key input could satisfy the readiness gate. Root cause: The smoke queried only ControlType.Edit and did not bind the result to the composer's DOM automation identity. Fix: Require both ControlType.Edit and AutomationId composer-input, and extend the source-level release contract test to preserve the exact selector. Verification: - focused Windows WebView2 smoke contract test - release workflow contract suite - desktop motion suite - repolint and git diff --check
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
REASONIX_WEBVIEW2_APPROVAL_SMOKElifecycle, HTML injection, Wails bridge, and automated approval driver from the shipped Desktop executableIssues
No linked issue.
Verification
pnpm --dir desktop/frontend test:workspacepnpm --dir desktop/frontend test:motionpnpm --dir desktop/frontend buildpnpm --dir desktop/frontend test:motion-browsergo test ./...fromdesktop/bash scripts/release-workflows.test.shgo run github.com/rhysd/actionlint/cmd/actionlint@v1.7.7 -ignore 'label "windows-11-arm" is unknown' .github/workflows/ci.yml .github/workflows/release-desktop.ymlThe approval animation keeps the production CSS easing contract
cubic-bezier(0.8, 0, 0.8, 0.28). Browser coverage asserts that the native Web Animations API is called once and approval submits after completion. Existing unit coverage retains cancellation, synchronous rejection, and one-shot submission fallbacks. The exact production EXE remains free of test-only bridge or remote-debug switches; its rendered page is observed externally through Windows UI Automation.Documentation impact
Documentation-impact: none - this changes internal release validation and removes test-only production instrumentation; user-facing Desktop behavior and embedded help remain unchanged.
Cache impact
Cache-impact: none - no provider-visible prompts, memory prefixes, tool schemas, serialization, or ordering changed.
Cache-guard: N/A - no cache-sensitive surface changed.
System-prompt-review: N/A