Support encoded launcher paths and verify native messaging handoff - #1536
Draft
benceruleanlu wants to merge 4 commits into
Draft
benceruleanlu wants to merge 4 commits into
benceruleanlu wants to merge 4 commits into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
benceruleanlu
added this pull request to stack #1529
September 16, 2026 03:48
This branch has not been deployed
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.
Behavior
Compare the bundled launcher document by decoded filesystem path, after matching protocol and origin. Electron's
loadFileleaves~literal while Node'spathToFileURLencodes it as%7E; Windows short paths such asRUNNER~1previously failed eligibility and never requested launcher identity. Other files and protocols remain rejected, and configured HTTP development URLs retain exact origin/path matching.Add a hermetic native Electron fixture using the production coordinator, document IPC and body-mode calculation, real WebContentsViews, shipped preloads/SDK, and production launcher CSP. Only external authentication/settings state is replaced. All HTTP(S) requests are intercepted and profiles are disposable. The fixture includes
~in its path on every platform, explicitly establishes application/window focus after navigation, and reports readiness state when a test fails.Documentation adds the native-host verification command and its coverage boundaries.
Validation
20 focused messaging tests pass, covering equivalent file encoding, rejected files/protocols/encoded separators, exact development URLs, eligibility, native links and identity races. The previous URL guard fails the equivalent-encoding regression and a native tilde-path reproduction. A separate mutation removing the coordinator's generation guard fails at the stale launcher identity assertion.
Both native cases passed three consecutive runs on macOS (6 tests, 10.2 seconds) with retries disabled, including fresh Electron startup between cases. The standalone local-ComfyUI and launcher SDK fixtures also passed. Native cases cover verified Firebase identity, revoking the previous surface before granting the next, one active grant, consent revocation, restored workflow input, and out-of-order identities after view/auth/consent changes. Synchronization uses deferred promises, DOM mutations, transition and focus events, without quiet-period sleeps.
Required pre-commit typechecks, lint, and formatting pass. At head
9fe0f8b2, full CI passed: 4,789 unit tests, 41 integration tests, and E2E on macOS (81), Linux (75), and Windows (80). All four messaging cases passed on their first attempt on every platform. Packaged/live campaign delivery remains release verification.Change breakdown
Changed lines = additions + deletions. No merge-only changes.
Documentation paths
docs/customerio-messaging.mdTest code paths
e2e/customerio-host.test.tse2e/support/customerIoHostDependencies.tse2e/support/customerIoHostMain.tssrc/main/lib/customerIoMessaging.test.tsProduct code paths
src/main/lib/customerIoMessaging.tsNo generated or vendored files changed.