mirror of
https://github.com/morluto/rea.git
synced 2026-12-05 22:41:36 +00:00
125 lines
5.7 KiB
YAML
125 lines
5.7 KiB
YAML
name: Browser connect diagnosis (temporary, never merge)
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
mode:
|
|
description: Select one bounded diagnostic lane.
|
|
required: true
|
|
type: choice
|
|
default: browser
|
|
options: [browser, windows-control]
|
|
source_sha:
|
|
description: Exact production commit to verify (diagnostic workflow is never merged).
|
|
required: true
|
|
type: string
|
|
permissions:
|
|
contents: read
|
|
jobs:
|
|
diagnose:
|
|
if: inputs.mode == 'browser'
|
|
runs-on: macos-15
|
|
timeout-minutes: 15
|
|
env:
|
|
NODE_OPTIONS: --max-old-space-size=1536
|
|
UV_THREADPOOL_SIZE: 2
|
|
GOMAXPROCS: 2
|
|
defaults:
|
|
run:
|
|
working-directory: subject
|
|
steps:
|
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
|
with:
|
|
ref: ${{ inputs.source_sha }}
|
|
path: subject
|
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
|
|
with:
|
|
node-version-file: subject/.nvmrc
|
|
- run: npm ci --no-audit --no-fund
|
|
- name: Provision isolated official verification tools
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
testroot="$RUNNER_TEMP/browser-connect-diagnosis"
|
|
mkdir -p "$testroot"
|
|
case "$(uname -m)" in
|
|
arm64) chrome_platform=mac-arm64 ;;
|
|
x86_64) chrome_platform=mac-x64 ;;
|
|
*) exit 1 ;;
|
|
esac
|
|
chrome_url="https://storage.googleapis.com/chrome-for-testing-public/156.0.8078.4/$chrome_platform/chrome-$chrome_platform.zip"
|
|
curl --fail --location --retry 2 "$chrome_url" -o "$testroot/chrome.zip"
|
|
shasum -a 256 "$testroot/chrome.zip" > "$testroot/chrome.observed-sha256"
|
|
unzip -q "$testroot/chrome.zip" -d "$testroot"
|
|
printf '%s\n' "$chrome_url" > "$testroot/chrome.url"
|
|
printf '%s\n' "CHROME_PATH=$testroot/chrome-$chrome_platform/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing" >> "$GITHUB_ENV"
|
|
printf '%s\n' "TESTROOT=$testroot" >> "$GITHUB_ENV"
|
|
npm install --prefix "$testroot/baseline" --ignore-scripts --no-audit --no-fund playwright-core@1.58.2
|
|
uname -a > "$testroot/platform.txt"
|
|
node --version >> "$testroot/platform.txt"
|
|
- run: npm run build:cached
|
|
- name: Real Chrome default-context and public CLI probes
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
"$CHROME_PATH" --version > "$TESTROOT/chrome.version"
|
|
for display in headless headful; do
|
|
/usr/bin/time -l node ../scripts/verification/browserConnectMatrix.mjs "$CHROME_PATH" "$TESTROOT/baseline/node_modules/playwright-core" "$PWD/node_modules/playwright-core" "$TESTROOT/direct-$display.json" "$display" "$PWD" > "$TESTROOT/direct-$display.log" 2> "$TESTROOT/direct-$display.time"
|
|
/usr/bin/time -l node ../scripts/verification/browserConnectCliProbe.mjs "$PWD" "$TESTROOT/cli-$display" "$CHROME_PATH" "$display" > "$TESTROOT/cli-$display.log" 2> "$TESTROOT/cli-$display.time"
|
|
done
|
|
REA_BROWSER_NO_SANDBOX=true /usr/bin/time -l node ../scripts/verification/browserConnectEnvironment.mjs "$PWD" "$CHROME_PATH" > "$TESTROOT/environment.log" 2> "$TESTROOT/environment.time"
|
|
- name: Preserve bounded diagnostic evidence
|
|
if: always()
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
|
with:
|
|
name: browser-connect-diagnosis
|
|
path: |
|
|
${{ runner.temp }}/browser-connect-diagnosis/*.json
|
|
${{ runner.temp }}/browser-connect-diagnosis/*.log
|
|
${{ runner.temp }}/browser-connect-diagnosis/*.time
|
|
${{ runner.temp }}/browser-connect-diagnosis/*.stderr
|
|
${{ runner.temp }}/browser-connect-diagnosis/*.txt
|
|
${{ runner.temp }}/browser-connect-diagnosis/chrome.version
|
|
${{ runner.temp }}/browser-connect-diagnosis/chrome.url
|
|
${{ runner.temp }}/browser-connect-diagnosis/chrome.observed-sha256
|
|
retention-days: 7
|
|
|
|
windows-control:
|
|
if: inputs.mode == 'windows-control'
|
|
runs-on: windows-latest
|
|
timeout-minutes: 10
|
|
env:
|
|
NODE_OPTIONS: --max-old-space-size=1536
|
|
UV_THREADPOOL_SIZE: 2
|
|
GOMAXPROCS: 2
|
|
steps:
|
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
|
with:
|
|
ref: ${{ inputs.source_sha }}
|
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
|
|
with:
|
|
node-version-file: .nvmrc
|
|
- run: npm ci --no-audit --no-fund
|
|
- run: npm run build:cached
|
|
- name: Record exact baseline
|
|
shell: cmd
|
|
run: |
|
|
mkdir "%RUNNER_TEMP%\rea-windows-control"
|
|
git rev-parse HEAD > "%RUNNER_TEMP%\rea-windows-control\source.txt"
|
|
git rev-parse HEAD:tests/boundary/filesystem/ghidraJavaProbe.test.ts > "%RUNNER_TEMP%\rea-windows-control\test-blob.txt"
|
|
- name: Execute existing Java probe boundary on exact main
|
|
shell: cmd
|
|
run: |
|
|
node scripts/run-exact-tests.mjs run tests/boundary/filesystem/ghidraJavaProbe.test.ts --maxWorkers=1 --no-file-parallelism > "%RUNNER_TEMP%\rea-windows-control\tests.log" 2>&1
|
|
set test_status=%ERRORLEVEL%
|
|
echo %test_status% > "%RUNNER_TEMP%\rea-windows-control\exit.txt"
|
|
type "%RUNNER_TEMP%\rea-windows-control\tests.log"
|
|
exit /b %test_status%
|
|
- name: Preserve baseline outcome including failures
|
|
if: always()
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
|
with:
|
|
name: windows-java-baseline
|
|
path: ${{ runner.temp }}/rea-windows-control/
|
|
retention-days: 7
|