Skip to content

chore(extension): ignore the bundled stealth.js build output - #1232

Merged
vringar merged 1 commit into
masterfrom
chore/ignore-stealth-bundle
Sep 6, 2026
Merged

vringar merged 1 commit into
masterfrom
chore/ignore-stealth-bundle

Conversation

@vringar

@vringar vringar commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Extension/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 (#1154) does.

That asymmetry is a trap, and it just cost a CI run.

How it fails

  1. A local extension build on the stealth branch writes Extension/bundled/stealth.js. npm run clean is rm -rf build test, so it does not remove anything under bundled/.
  2. The file is gitignored on the stealth branch, so nothing complains there.
  3. Any commit subsequently made from a master-based branch snapshots it, because master has no such ignore rule.
  4. CI then fails somewhere that points nowhere near the cause.

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 downstream No files were found with the provided path: coverage.xml.

Inside setup, scripts/build-extension.sh runs npm ci, which triggers npm's prepare lifecycle → npm run build && npm run test → test:lint → eslint .. Extension/eslint.config.mjs ignores generated bundles by explicit allowlist:

ignores: [
  "bundled/feature.js",
  "bundled/content.js",
  "bundled/privileged/sockets/bufferpack.js",
  ...
]

bundled/stealth.js is absent from that list on master (the stealth branch adds it), so the 211 KB webpacked bundle is linted as ordinary source:

✖ 1633 problems (1622 errors, 11 warnings)

Every shard of tests, plus demo and pre-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.

Copilot AI lite review requested due to automatic review settings September 6, 2026 16:19
@vringar
vringar enabled auto-merge September 6, 2026 16:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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.js to Extension/.gitignore alongside 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.

@vringar
vringar added this pull request to the merge queue Sep 6, 2026
@codecov

codecov Bot commented Sep 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.34%. Comparing base (975b09c) to head (dfea429).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Sep 6, 2026
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.
@vringar
vringar force-pushed the chore/ignore-stealth-bundle branch from 8840fdb to dfea429 Compare September 6, 2026 20:23
@vringar
vringar enabled auto-merge September 6, 2026 20:34
@vringar
vringar added this pull request to the merge queue Sep 6, 2026
Merged via the queue into master with commit 01da4e6 Sep 6, 2026
15 checks passed
@vringar
vringar deleted the chore/ignore-stealth-bundle branch September 6, 2026 21:53
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.

2 participants