Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,23 @@ jobs:
run: pnpm install --frozen-lockfile
- name: Run Host regressions
run: pnpm --filter @cindy/host test
# Most acceptance scripts in apps/host/scripts need native engines or a browser and
# are not run here. Load each one's imports without running it, so a shared desktop
# module that starts importing Electron fails here rather than on the next manual run.
- name: Load Host acceptance scripts (imports only)
working-directory: apps/host
run: node scripts/check-e2e-imports.mjs
# These three need no engine, browser, account or network.
- name: Host acceptance - provider configuration
working-directory: apps/host
run: node --import tsx --import ./src/loaders/register-raw.mjs scripts/provider-config.e2e.mjs
- name: Host acceptance - IPC route
run: pnpm --filter @cindy/host test:ipc-route
# Not on Windows: stopping the background Host is refused there (ECONNREFUSED in the
# final stop), a recorded baseline gap (docs/host/personal-migration-release-table.md).
- name: Host acceptance - lifecycle
if: matrix.os != 'windows-latest'
run: pnpm --filter @cindy/host test:lifecycle
# Types are platform independent: once is enough. A shared desktop body that
# gains a port wired only in the desktop assembly passes the desktop checks
# and fails here instead of at runtime in the Host.
Expand Down
122 changes: 122 additions & 0 deletions .github/workflows/macos-system-proxy-compare.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
# System proxy comparison, macOS and Windows (docs/host/personal-migration-release-table.md, row 28, 28b and 28c).
#
# Compares the Host's outbound proxy answers with Electron's session.resolveProxy, under groups of settings the
# jobs set themselves: on macOS the static settings (apps/host/src/macos-system-proxy.ts) and, for PAC and
# auto-discovery, the Host's Chromium proxy helper (apps/host/src/chromium-proxy.ts); on Windows the helper for
# everything. Both jobs first run the helper's acceptance (apps/host/scripts/chromium-proxy-worker.e2e.mjs), which
# needs the Electron binary these jobs install; the macOS job then asserts that the helper, started the production
# way, added no keychain item ending in "Safe Storage".
#
# The jobs CHANGE THE RUNNER'S SYSTEM PROXY SETTINGS (networksetup with sudo; the current user's Internet
# Settings on Windows). They therefore run only on GitHub-hosted runners, which are discarded afterwards, and
# only when needed: started by hand, or for a pull request that changes this implementation (the paths below).
# Ordinary pull requests do not run them. An Electron upgrade reaches it through a guard test: CHROMIUM_RULES_ELECTRON_VERSION in
# macos-system-proxy.ts must equal the Electron version in apps/desktop/package.json, so the upgrade changes
# that file and this comparison runs on the upgrade's pull request.
# Never change system proxy settings on a development machine or your own computer to reproduce it; the
# scripts refuse to start anywhere but a GitHub-hosted runner.
name: System proxy comparison

on:
workflow_dispatch:
pull_request:
paths:
- 'apps/host/src/macos-system-proxy.ts'
- 'apps/host/src/outbound-proxy.ts'
- 'apps/host/src/chromium-proxy.ts'
- 'apps/host/src/chromium-proxy-worker.cjs'
- 'apps/host/scripts/macos-system-proxy-*'
- 'apps/host/scripts/windows-system-proxy-compare.mjs'
- 'apps/host/scripts/chromium-proxy-worker.e2e.mjs'
- '.github/workflows/macos-system-proxy-compare.yml'

permissions:
contents: read

concurrency:
group: macos-system-proxy-compare-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
compare:
name: Host vs Electron system proxy results
runs-on: macos-15
timeout-minutes: 30
env:
XDT_SKIP_AGENT_BIN_INSTALL: '1'
steps:
- name: Checkout client
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup pnpm
uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6
with:
run_install: false
- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 22
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
# With the Electron binary: the comparison runs the repository's Electron.
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Chromium proxy helper acceptance (loopback PAC; changes no settings)
working-directory: apps/host
run: node --import tsx --import ./src/loaders/register-raw.mjs scripts/chromium-proxy-worker.e2e.mjs
- name: Compare (changes this runner's system proxy settings, then restores them)
working-directory: apps/host
env:
CINDY_SYSTEM_PROXY_COMPARE: '1'
run: node --import tsx --import ./src/loaders/register-raw.mjs scripts/macos-system-proxy-compare.mjs "$RUNNER_TEMP/system-proxy-compare"
- name: Upload scutil samples and the report
if: ${{ !cancelled() }}
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: macos-system-proxy-compare
path: ${{ runner.temp }}/system-proxy-compare
if-no-files-found: warn

compare-windows:
name: Host vs Electron system proxy results (Windows)
runs-on: windows-latest
timeout-minutes: 30
env:
XDT_SKIP_AGENT_BIN_INSTALL: '1'
steps:
- name: Checkout client
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup pnpm
uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6
with:
run_install: false
- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 22
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
# With the Electron binary: the helper and the comparison run the repository's Electron.
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Chromium proxy helper acceptance (loopback PAC; changes no settings)
working-directory: apps/host
run: node --import tsx --import ./src/loaders/register-raw.mjs scripts/chromium-proxy-worker.e2e.mjs
- name: Compare (changes this runner's proxy settings, then restores them)
working-directory: apps/host
env:
CINDY_SYSTEM_PROXY_COMPARE: '1'
run: node --import tsx --import ./src/loaders/register-raw.mjs scripts/windows-system-proxy-compare.mjs "$env:RUNNER_TEMP/system-proxy-compare"
- name: Upload the report
if: ${{ !cancelled() }}
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: windows-system-proxy-compare
path: ${{ runner.temp }}/system-proxy-compare
if-no-files-found: warn
- name: Upload Chromium proxy helper diagnostics
if: ${{ always() }}
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: windows-chromium-proxy-helper-diagnostics
path: ${{ runner.temp }}/cindy-proxy-helper-logs-*/
if-no-files-found: warn
Loading
Loading