You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 18fb892
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: .github/actions/install-node-deps/action.yml
+17-10Lines changed: 17 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -9,9 +9,13 @@ inputs:
9
9
ignore-scripts:
10
10
description: >
11
11
Install with `--ignore-scripts`. Jobs that only need the JavaScript on
12
-
disk (jest, lint, an addon download) skip the lifecycle scripts, which
13
-
also means they never download Electron — so the Electron cache below is
14
-
skipped for them too.
12
+
disk (jest, lint, an addon download) skip the lifecycle scripts. Those
13
+
jobs also never launch Electron, so the Electron cache below is skipped
14
+
for them — not because `--ignore-scripts` suppresses a download (it does
15
+
not: the `electron` package ships no postinstall script, and fetches the
16
+
binary lazily on the first `require('electron')`), but because there is
17
+
nothing for them to cache. A job that passes `'true'` here and then does
18
+
require Electron would download it uncached.
15
19
required: false
16
20
default: 'false'
17
21
@@ -36,11 +40,14 @@ runs:
36
40
echo "[install-node-deps] npm fetch bounds:"
37
41
npm config get fetch-retries fetch-retry-mintimeout fetch-retry-maxtimeout fetch-timeout
38
42
39
-
# The single biggest thing `npm ci` pulls is Electron's own postinstall
40
-
# download: a ~100 MB zip from GitHub releases through `@electron/get`,
41
-
# with no timeout of its own. Keyed on the exact `electron` version in the
42
-
# lockfile plus the runner's OS/arch, because that tuple is what decides
43
-
# which zip gets fetched.
43
+
# The biggest download any job makes is Electron's own binary: a ~100 MB
44
+
# zip from GitHub releases through `@electron/get`, with no timeout of its
45
+
# own. The `electron` package has no postinstall script — `npm ci` does not
46
+
# pull it; `node_modules/electron/index.js` fetches it on the first
47
+
# `require('electron')` (a Playwright launch, a build), so the download
48
+
# lands in a *later* step of the job and this cache is what spares it.
49
+
# Keyed on the exact `electron` version in the lockfile plus the runner's
50
+
# OS/arch, because that tuple is what decides which zip gets fetched.
44
51
- name: Resolve the Electron download cache
45
52
id: electron-cache-meta
46
53
if: inputs.ignore-scripts != 'true'
@@ -73,9 +80,9 @@ runs:
73
80
run: |
74
81
set -euo pipefail
75
82
if [ "$CACHE_HIT" = 'true' ]; then
76
-
echo "[install-node-deps] Electron download cache HIT for ${CACHE_VERSION} (${CACHE_DIR}) — postinstall will not download Electron"
83
+
echo "[install-node-deps] Electron download cache HIT for ${CACHE_VERSION} (${CACHE_DIR}) — the binary will not be downloaded again"
77
84
else
78
-
echo "[install-node-deps] Electron download cache MISS for ${CACHE_VERSION} (${CACHE_DIR}) — postinstall will download it and this job will populate the cache"
85
+
echo "[install-node-deps] Electron download cache MISS for ${CACHE_VERSION} (${CACHE_DIR}) — it will be downloaded on first use and this job will populate the cache"
79
86
fi
80
87
81
88
# `scripts/better-sqlite3-prebuilds.js`, the other half of `postinstall`,
Copy file name to clipboardExpand all lines: CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,11 @@ All notable changes to Freedom will be documented in this file.
23
23
24
24
### Fixed
25
25
26
+
- Opening a Chrome Web Store page no longer crashes Freedom
27
+
- Visiting an extension's page on `chromewebstore.google.com` — by clicking a card on the store, or by going straight to the address — closed the whole browser about a second later, taking every open tab and window with it
28
+
- The store was being handed an internal Chrome extension-installation API that Freedom does not implement, and the store's first call into it brought the browser down. The page is now served the same way any other site is, with no such API in it
29
+
- Freedom still cannot install Chrome extensions; the store's pages simply read like any other website now
30
+
26
31
- Visiting a site no longer downloads its page twice
27
32
- Finding a site's icon used to mean fetching the page a second time behind your back — without your cookies or session — purely to read its `<link rel="icon">` tag. Every site you visited saw two requests for the same address, one signed in and one not
28
33
- On sites that gate content — a paywall, a paid session, a rate limit, a login — that second anonymous request could be refused, logged as a failed visit, or counted against your quota
Copy file name to clipboardExpand all lines: docs/agent-playbooks/release-process.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -554,6 +554,6 @@ Each packaged app carries only the prebuild for its own target: the `mac`/`linux
554
554
-**Known first-run fixes** worth remembering when a leg breaks: every fetch script downloads through `scripts/lib/fetch-with-retry.js`, which uses a retrying `https` client rather than the global `fetch` because the EasyList server drops connections mid-body and undici turns that into an *uncaught* assertion (see §2, "Bundled binaries"); the Ant and IPFS fetch scripts extract archives with Windows' own bsdtar and relative paths because the Windows job runs in Git Bash, where GNU tar misreads `D:\...` as a remote host.
555
555
-**Network steps are bounded and retried, never raw.** Three classes of network step in CI can trickle forever instead of failing, and the only thing that ends either is the job's `timeout-minutes` — which reports as a _cancelled_ job, burns the whole budget, and says nothing about what stalled. Each has a wrapper, and any new step that installs or downloads something goes through the matching one rather than calling the tool directly (the third, `scripts/lib/fetch-with-retry.js` for every `scripts/fetch-*.js` binary download, is described in §2 under "Bundled binaries"):
556
556
-**apt / `playwright install-deps`** (Linux legs): `scripts/ci/apt-hardening.sh`, used through the `.github/actions/install-playwright-deps` and `.github/actions/install-linux-native-deps` composite actions. Per-attempt `timeout`, retries, a dpkg/apt lock wait, and an azure → `archive.ubuntu.com` mirror fallback on the final attempt, because a degraded Azure mirror backend trickles a fetch at ~35 kB/s rather than failing and apt's own `Acquire::*::Timeout` is an inactivity timeout that never fires while bytes keep arriving ([#203](https://github.com/solardev-xyz/freedom-browser/pull/203)).
557
-
- **`npm ci`** (every leg, every OS): the `.github/actions/install-node-deps` composite action, which is what every `Install dependencies` step in `ci.yml` and `release.yml` now `uses:` — pass `ignore-scripts: 'true'` for the jobs that only need the JavaScript on disk. It sets npm's own fetch bounds for the job (`fetch-retries 5`, `fetch-timeout 120000`), restores the Electron download cache, and then runs `npm ci` through `scripts/ci/npm-ci-hardening.js`: **3 attempts, 540s per attempt and 660s for the whole step on Windows, 300s/600s everywhere else**, killing the process _tree_ on a timeout (the stall is usually inside the Electron postinstall's ~100 MB download, a grandchild that survives signalling `npm` alone) and clearing `node_modules` between attempts. Both numbers are sized from measured step durations, and Windows has its own pair because its distribution genuinely differs — a healthy install has been clocked at up to 337s there against 77s everywhere else, including on a run where the Electron download was a cache hit. The step budget is the load-bearing half: three full attempts always exceed it, and most `ci.yml` jobs cap themselves at `timeout-minutes: 15`, so without a total bound a stall would still end as a cancellation. Raising it means re-checking `budget + slowest preflight < 15 min` (the slowest checkout + setup-node observed is 102s); `scripts/ci/npm-ci-hardening.test.js` pins that arithmetic. Override per job with `FREEDOM_CI_NPM_ATTEMPTS` / `FREEDOM_CI_NPM_ATTEMPT_TIMEOUT` / `FREEDOM_CI_NPM_TOTAL_TIMEOUT` (seconds). The Electron cache is keyed on the exact `electron` version in `package-lock.json` plus the runner's OS and arch, and each job logs `Electron download cache HIT`/`MISS` before installing; it is skipped for `ignore-scripts: 'true'` jobs, which never run the postinstall that downloads Electron. `postinstall`'s other half, `scripts/better-sqlite3-prebuilds.js`, downloads nothing — the prebuilt addons ship inside the npm tarball `actions/setup-node`'s `cache: npm` already covers — so there is no second directory to cache ([#379](https://github.com/solardev-xyz/freedom-browser/issues/379)).
557
+
- **`npm ci`** (every leg, every OS): the `.github/actions/install-node-deps` composite action, which is what every `Install dependencies` step in `ci.yml` and `release.yml` now `uses:` — pass `ignore-scripts: 'true'` for the jobs that only need the JavaScript on disk. It sets npm's own fetch bounds for the job (`fetch-retries 5`, `fetch-timeout 120000`), restores the Electron download cache, and then runs `npm ci` through `scripts/ci/npm-ci-hardening.js`: **3 attempts, 540s per attempt and 660s for the whole step on Windows, 300s/600s everywhere else**, killing the process _tree_ on a timeout (the stall can sit inside a grandchild — a registry fetch, or a `postinstall` lifecycle script — which survives signalling `npm` alone) and clearing `node_modules` between attempts. Both numbers are sized from measured step durations, and Windows has its own pair because its distribution genuinely differs — a healthy install has been clocked at up to 337s there against 77s everywhere else, on a run where three sibling Windows jobs finished the same install in 106-122s. The step budget is the load-bearing half: three full attempts always exceed it, and most `ci.yml` jobs cap themselves at `timeout-minutes: 15`, so without a total bound a stall would still end as a cancellation. Raising it means re-checking `budget + slowest preflight < 15 min` (the slowest checkout + setup-node observed is 102s); `scripts/ci/npm-ci-hardening.test.js` pins that arithmetic. Override per job with `FREEDOM_CI_NPM_ATTEMPTS` / `FREEDOM_CI_NPM_ATTEMPT_TIMEOUT` / `FREEDOM_CI_NPM_TOTAL_TIMEOUT` (seconds). The Electron cache is keyed on the exact `electron` version in `package-lock.json` plus the runner's OS and arch, and each job logs `Electron download cache HIT`/`MISS` before installing; it is skipped for `ignore-scripts: 'true'` jobs, which never launch Electron and so have nothing to cache. `npm ci` itself never downloads Electron: the `electron` package ships no postinstall script, and `node_modules/electron/index.js` fetches the ~100 MB zip on the first `require('electron')` — a Playwright launch or a build, i.e. a later step of the job — which is also why a job that sets `ignore-scripts: 'true'` and then does require Electron would download it uncached. `postinstall`'s other half, `scripts/better-sqlite3-prebuilds.js`, downloads nothing — the prebuilt addons ship inside the npm tarball `actions/setup-node`'s `cache: npm` already covers — so there is no second directory to cache ([#379](https://github.com/solardev-xyz/freedom-browser/issues/379)).
558
558
-**Smoke gate**: `smoke-linux` (a matrix over x64/arm64), `smoke-mac-arm64` and `smoke-windows-x64` each run after their build job and before `release` (§6). They need no secrets and rebuild nothing — a scripts-free install (`install-node-deps` with `ignore-scripts: 'true'`), then Playwright against the run's own artifacts. A failure in any of them blocks the release job; each uploads its Playwright traces as `smoke-<platform>-report` (deliberately not matching the `freedom-*` pattern the `release` job downloads, so traces can never become release assets). The mac job reads the signing state off the artifact name it downloaded (`freedom-mac-arm64-signed` / `-unsigned`) and only assesses Gatekeeper when there is a signature to assess, so an unsigned dispatch run still passes.
559
559
-**Cost**: the repo is public, so runner minutes are free. A full run is four parallel build jobs of 10–25 minutes, plus a smoke job per platform of a few minutes each (also in parallel, each waiting only on its platform's build job (the two Linux smoke legs wait on the whole Linux build matrix, since `needs` cannot target one matrix leg)).
0 commit comments