Repository navigation
chore(extension): ignore the bundled stealth.js build output - #1232
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The change is a minimal, correct gitignore update that aligns bundled-output handling and introduces no functional or behavioral risk.
Pull request overview
This PR prevents accidental commits of a generated WebExtension bundle (bundled/stealth.js) that is emitted on the stealth instrumentation branch but not on master, which can otherwise cause ESLint to lint large build output during CI setup and fail before tests run.
Changes:
- Add
Extension/bundled/stealth.jstoExtension/.gitignorealongside other webpack bundle outputs.
File summaries
| File | Description |
|---|---|
Extension/.gitignore |
Ignores the bundled/stealth.js build artifact to avoid CI linting failures caused by stray generated output. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1232 +/- ##
==========================================
+ Coverage 62.31% 62.34% +0.02%
==========================================
Files 40 40
Lines 3930 3930
==========================================
+ Hits 2449 2450 +1
+ Misses 1481 1480 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
bundled/content.js and bundled/feature.js are already ignored as webpack output; bundled/stealth.js is not, because master's webpack config does not emit it — only the stealth instrument branch does. That asymmetry is a trap. A local extension build on that branch leaves the file behind, npm run clean removes only build/ and test/, and the next commit made from a master-based branch picks it up. It then fails CI in a way that points nowhere near the cause: the extension lint runs inside the setup action, master's eslint config does not have bundled/stealth.js in its ignores allowlist, and the 211 KB bundle is linted as ordinary source for about 1600 prettier errors before the test suite ever starts. Ignoring the file on master closes the trap from either branch.
8840fdb to
dfea429
Compare
Extension/bundled/content.jsandbundled/feature.jsare already ignored as webpack output.bundled/stealth.jsis not, because master's webpack config does not emit it — only the stealth instrument branch (#1154) does.That asymmetry is a trap, and it just cost a CI run.
How it fails
Extension/bundled/stealth.js.npm run cleanisrm -rf build test, so it does not remove anything underbundled/.Why the failure is so misleading
The failing step is
Run ./.github/actions/setup, not./scripts/ci.sh— the test suite never starts, so there is no pytest output at all, just a downstreamNo files were found with the provided path: coverage.xml.Inside setup,
scripts/build-extension.shrunsnpm ci, which triggers npm'spreparelifecycle →npm run build && npm run test→test:lint→eslint ..Extension/eslint.config.mjsignores generated bundles by explicit allowlist:bundled/stealth.jsis absent from that list on master (the stealth branch adds it), so the 211 KB webpacked bundle is linted as ordinary source:Every shard of
tests, plusdemoandpre-commit, fails identically, because they all run the same composite setup. Nothing in the failure output mentions the stray file's origin.Fix
Ignore the file on master too, so it cannot be committed from either branch. One line.
This overlaps the entry #1154 already adds to the same file; whichever lands second drops the duplicate.