Fix MV3 CI failures and harden CI workflows - #280
Merged
Conversation
…ing assertion
The DevToolsActivePort poller (2ms cadence) hit Chromium's non-atomic
write window: the file exists at 0 bytes while open(O_TRUNC)->write() is
in flight, so parseDevToolsActivePort('') threw "exactly two canonical
lines" - an error outside the retry set (ENOENT, DEVTOOLS_ENDPOINT_CHANGED),
making the failure fatal. Add EndpointEmptyDuringCaptureError
(DEVTOOLS_ENDPOINT_EMPTY), guard on stat.size === 0, and admit it to the
retry set. A deterministic regression test reproduces the empty mid-write
window and confirms the poller waits for content to land.
The cold-boot onboarding test asserted 'Premier lancement', copy that only
exists in the orphaned OnboardingWizard.svelte (zero imports since the
machine-driven redesign). Point the assertion at the real welcome hero
heading rendered by OnboardingWelcome, and update the harness/scenario
models to match.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The packaged MV3 gate drives a real Chromium + MV3 service-worker lifecycle, which has inherent transient failure modes (the DevToolsActivePort empty-write race fixed separately is one example). Set retries to 1 under CI (0 locally) so a single flake no longer fails the gate while a consistent bug still fails on both attempts - mirroring the browser-e2e config. Pin every action in release.yml to its verified commit SHA (dereferenced through annotated tags where needed). release.yml was the only workflow still using floating major-version tags (@vn), leaving it exposed to tag-repointing and inconsistent with ci.yml/connector-health.yml. Zero floating version tags remain across all workflows. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR addresses two CI breakages in the MV3 Playwright harness (a flake in DevToolsActivePort polling and a stale onboarding assertion) and hardens CI/release workflows by reducing flake sensitivity and pinning GitHub Actions to commit SHAs.
Changes:
- Treat a zero-byte
DevToolsActivePortfile as a transient state (DEVTOOLS_ENDPOINT_EMPTY) and retry polling until content lands, with a regression unit test. - Update the packaged onboarding E2E assertion to target the real
OnboardingWelcomehero heading and align the packaged harness/scenario models. - Improve CI robustness/hardening: enable 1 retry for MV3 Playwright runs in CI and pin all actions in
release.ymlto verified commit SHAs.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| apps/extension/tests/unit/mv3/devtools-endpoint.test.ts | Adds regression coverage for the empty mid-write DevToolsActivePort admission window. |
| apps/extension/tests/mv3/harness/devtools-endpoint.ts | Introduces DEVTOOLS_ENDPOINT_EMPTY and retries empty-file reads during endpoint polling. |
| apps/extension/tests/e2e-extension/navigation.test.ts | Replaces a stale onboarding copy assertion with a stable hero-heading assertion. |
| apps/extension/src/models/packaged-tab-scenarios.model.md | Updates the packaged scenario spec to reflect the new onboarding assertion semantics. |
| apps/extension/src/models/mv3-packaged-harness.model.md | Documents that zero-byte DevToolsActivePort files are retried like ENOENT during polling. |
| apps/extension/playwright.mv3.config.ts | Enables a single retry in CI to absorb transient MV3/Chromium lifecycle flakes. |
| .github/workflows/release.yml | Pins previously floating GitHub Actions versions to specific commit SHAs. |
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
CI was failing on
developfrom two distinct causes. This PR fixes both and tightens the supply-chain posture of the workflows.waitForDevToolsEndpointpolls every 2ms. Real Chromium (and NodewriteFile) doopen(O_TRUNC)thenwrite()non-atomically, so during the mid-write window the file exists at 0 bytes.parseDevToolsActivePort('')threw "exactly two canonical lines", an error outside the retry set (ENOENT,DEVTOOLS_ENDPOINT_CHANGED), which made the failure fatal. AddedEndpointEmptyDuringCaptureError(DEVTOOLS_ENDPOINT_EMPTY), astat.size === 0guard, and admitted it to the retry set. A deterministic regression test reproduces the empty mid-write file and confirms the poller waits for content to land (15/15 stable repeats).navigation.test.tsassertedgetByText('Premier lancement'), copy that only exists in the now-orphanedOnboardingWizard.svelte(zero imports since the machine-driven onboarding redesign). Repointed the assertion at the real welcome hero heading rendered byOnboardingWelcome, and updated themv3-packaged-harnessandpackaged-tab-scenariosmodels to match (Model -> Review -> Implement -> Verify).playwright.mv3.config.tswent fromretries: 0toretries: CI ? 1 : 0, so a single Chromium/MV3-lifecycle flake no longer fails the gate while a consistent bug still fails on both attempts (mirrors the browser-e2e config).release.ymlwas the only workflow still using floating major-version tags (@vN); all 7 actions are now pinned to verified commit SHAs (annotated tags dereferenced to their commits), consistent withci.ymlandconnector-health.yml. Zero floating version tags remain across all workflows.Verification
pnpm format:checkpnpm lintpnpm typecheckpnpm testpnpm buildTargeted:
tests/unit/mv3/devtools-endpoint.test.tspasses 24/24, stable across 15 deterministic repeats.Note on
pnpm test: the full extension unit suite reports 26 failures, all in four release-artifact files (canonical-artifact,mv3-artifact,package-sealed-dist,verify-release-artifact), all withTREE_ROOT_INVALID: Descriptor scanner interpreter is not an attested native binary. This is a pre-existing macOS-host quirk in the release-integrity attestation subsystem, untouched by this PR (none of these files are in the change set). These same tests pass in CI; the latestdeveloprun hadQuality PASSED.Checklist
.model.mdfiles updated to match the corrected assertion and the empty-file retry semantics)