Skip to content

fix: make adblock release discovery resilient and update dependencies - #5611

Merged
ashwinsingh2007 merged 2 commits into
mainfrom
fix/adblock-release-discovery
Oct 6, 2026
Merged

ashwinsingh2007 merged 2 commits into
mainfrom
fix/adblock-release-discovery

Conversation

@artiom

@artiom artiom commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

What changed

Carry forward the five dependency updates from #5610 and fix the adblock installer failure that prevents its Leak Check from running.

  • Discover the latest uBlock Origin Lite release on every fresh install; no version is pinned.
  • Select the Chromium asset by its exact release-derived filename and official download URL, and verify its SHA-256 digest and manifest before replacing an installed extension.
  • Bound network retries, timeouts, and response sizes. Report HTTP and rate-limit diagnostics without response bodies or credentials.
  • Use previously validated runtime release metadata only when discovery is temporarily unavailable. Fresh successful metadata always takes precedence.
  • Authenticate release discovery in Leak Check with the workflow's read-only token, without forwarding it to asset downloads or npm scripts.
  • Preserve offline rebuilds and the FORCE_ADBLOCK=true refresh option.

Dependency updates: systeminformation 5.33.14 → 5.33.15, @types/node 26.6.3 → 26.6.4, @types/ws resolved 8.18.1 → 8.18.2, chai 6.2.2 → 6.3.0, and mocha 12.0.2 → 12.0.3.

Validation

  • 15 installer tests pass, covering asset ordering, latest-over-cache behavior, rate limits, API and malformed responses, download failures, bounded retries, checksum failures, preservation of an existing installation, separate filesystems, and optional cache-write failures.
  • ESLint, formatting checks, and the full build pass on Node 24.
  • A real latest-release discovery, archive download, checksum verification, and installation succeed without a token.
  • Full browser matrix and runtime Leak Check remain subject to this PR's CI.

This is a proposed replacement for #5610. Keep that PR open until this replacement's applicable checks and reviews pass.

Summary by CodeRabbit

  • Bug Fixes
    • Adblock updates now verify the release, downloaded extension, and Manifest V3 status before replacing an existing installation. If validation or replacement fails, the previous installation is preserved.
    • Temporary network failures are retried, and validated release information can be reused during transient metadata-fetch failures.
    • Downloads are limited in size and time, and installation errors avoid logging response-body secrets.
    • Unsafe asset URLs are rejected, and failure to save cached release information does not prevent a successful installation.

@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Team
  • Run ID: 86596813-4d76-45f0-86bb-dcf28a4a5b6c
📥 Commits

Reviewing files that changed from the base of the PR and between 5fff554 and 1d4942e.

📒 Files selected for processing (2)
  • scripts/install-adblock.js
  • scripts/install-adblock.test.js

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.


Walkthrough

The adblock installer now validates release metadata and downloaded archives, then stages and verifies the extension before replacing an existing installation. Tests and the leak-check workflow cover the installer. The package manifest also updates five dependency ranges.

Changes

Adblock Installer

Layer / File(s) Summary
Release retrieval and validation
scripts/install-adblock.js
The installer bounds and retries requests, validates the Chromium release asset and its metadata, and can use cached metadata after transient API failures.
Staged extension installation
scripts/install-adblock.js
The installer verifies the archive digest and extracted manifest before replacing the existing extension. It restores the backup if the replacement rename fails and writes validated release metadata to the cache after installation.
Installer tests and workflow
scripts/install-adblock.test.js, .github/workflows/leak-check.yml
Tests cover release selection, caching, retries, validation failures, preservation of an existing installation, and cache-write failures. The leak-check workflow runs the tests and installer, providing a GitHub token only to the installer step.

Package Dependency Updates

Layer / File(s) Summary
Dependency range updates
package.json
Updates the declared ranges for systeminformation, @types/node, @types/ws, chai, and mocha.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant Installer as install-adblock.js
  participant GitHubAPI
  participant GitHubAsset
  participant ExtensionsDirectory
  Installer->>GitHubAPI: Request latest release metadata
  GitHubAPI-->>Installer: Return release metadata
  Installer->>GitHubAsset: Download validated Chromium archive
  GitHubAsset-->>Installer: Return archive bytes
  Installer->>ExtensionsDirectory: Replace target with verified extension
Loading

Merge Risk: ⚪ Minimal · up to 1d494

No actionable merge-blocking issue is identified in the reviewed changes; normal checks remain appropriate.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: resilient adblock release discovery and dependency updates.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the version string,
Then guards the ZIP with hashing.
It stages each file before the swap,
Keeps the old one if things go wrong.
Tests hop through retries and cache,
While fresh releases join the chase.

Comment @coderabbitai help to get the list of available commands.

@artiom
artiom marked this pull request as ready for review October 5, 2026 17:01

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

Devin Review

Comment thread scripts/install-adblock.js Resolved

artiom commented Oct 5, 2026

Copy link
Copy Markdown
Contributor Author

Validation complete at 1d4942e: all 13 current checks pass, including all six browser jobs, Leak Check, lint, formatting, validation, CodeQL, and CodeRabbit. The Dependabot-only auto-merge job is skipped as expected. The installer suite passes 15/15 tests; the runtime leak check reports no leak signals. The multi-browser suite finished with 774 passing tests after its built-in retry: the first attempt timed out with HTTP 408 in the Lighthouse test against the public docs site. No manual rerun was issued.

Addressed the cache-filesystem finding with same-filesystem cache staging and nonfatal optional-cache writes. Both new regression tests failed before the fix and pass afterward. CodeRabbit reviewed the final head with no actionable findings. Its docstring suggestion is not a runtime correctness issue; its isolated ESLint setup warning is covered by passing repository CI lint and local ESLint. No unresolved review threads or merge conflicts remain. Human approval is still required; this PR has not been merged.

@ashwinsingh2007
ashwinsingh2007 merged commit cddddc5 into main Oct 6, 2026
16 checks passed
@ashwinsingh2007
ashwinsingh2007 deleted the fix/adblock-release-discovery branch October 6, 2026 07:31
artiom pushed a commit that referenced this pull request Oct 16, 2026
🤖 I have created a release *beep* *boop*
---


##
[2.57.1](v2.57.0...v2.57.1)
(2026-10-16)


### Bug Fixes

* make adblock release discovery resilient and update dependencies
([#5611](#5611))
([cddddc5](cddddc5))
* upgrade browser libraries with Playwright 1.64 compatibility
([#5620](#5620))
([1e142fa](1e142fa))
* **websocket:** send RFC 6455 close frame on mid-session timeout
([#5594](#5594))
([f7edf0f](f7edf0f))


### Build System & Runtime

* bump Node to 24.22.0 and npm to 11.21.1
([#5624](#5624))
([692f2d7](692f2d7))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: browserless-actions-bot[bot] <186328842+browserless-actions-bot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

3 participants