Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
beb7845
feat: Linux browser tier L5 port (#119)
chaodu-agent Nov 18, 2026
f6b8055
fix: release record and smoke gates require a pass (findings 1, 4, 5)
chaodu-agent Nov 18, 2026
0d093e1
fix: cutover guide runs as written (findings 2, 6, 7)
chaodu-agent Nov 18, 2026
6853caf
fix: judge Unix listeners by their resolved directory (finding 3)
chaodu-agent Nov 18, 2026
30f1fe6
fix: sweep failure refuses a CLI launch; legacy listener errors are u…
chaodu-agent Nov 18, 2026
2c706ad
docs: release smoke dispatch is post-merge; V2 and D7 wording; root a…
chaodu-agent Nov 18, 2026
717bd6c
fix: reject bare-id release rows; browser status exits 1 on a V2 fail…
chaodu-agent Nov 18, 2026
054016d
fix: quote a CI step name that stopped the CI workflow from starting
chaodu-agent Nov 18, 2026
342709b
fix: a tree with no listener fails V2 when its TMPDIR is not private
chaodu-agent Nov 18, 2026
4206857
fix: a stale TMPDIR fails V2 when no tree runs (review round 3, LOW)
chaodu-agent Nov 18, 2026
80b3b14
docs: match trailing whitespace in MCP_UPSTREAM sed, note first Linux…
chaodu-agent Nov 18, 2026
6381f43
fix: close the fail-open gaps in the record gate, fd scan, legacy hin…
chaodu-agent Nov 19, 2026
e8f4e0a
fix: keep one drop-in removal block in the cutover guide (review B1)
chaodu-agent Nov 19, 2026
0412f1d
docs: point every drop-in removal at the content-based step 5.2
chaodu-agent Nov 19, 2026
da642fc
docs: state exactly which drop-in lines the step 5.2 awk accepts
chaodu-agent Nov 19, 2026
153414a
docs: record the drop-in removal owner decision in the ADR
chaodu-agent Nov 19, 2026
ce52de0
test: a pid that exits before its fd scan is unknown (F2)
chaodu-agent Nov 19, 2026
2a23938
fix: cargo fmt and shellcheck for the L5 cutover CI
chaodu-agent Nov 19, 2026
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
12 changes: 11 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,24 @@ jobs:
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: ShellCheck
run: shellcheck scripts/install-linux.sh scripts/test-install-linux.sh scripts/test-name-consistency.sh scripts/test-legacy-agent.sh
run: shellcheck scripts/install-linux.sh scripts/test-install-linux.sh scripts/test-name-consistency.sh scripts/test-legacy-agent.sh scripts/release-smoke-linux.sh scripts/test-release-smoke-linux.sh scripts/check-release-record.sh scripts/test-cutover-guide.sh poc/reverse-attach-linux/pw-mcp.sh scripts/test-pw-mcp-deprecated.sh
- name: Generated units (fake HOME, stubbed systemctl/tailscale/loginctl)
# Diffs each written unit against its expected text and runs systemd-analyze verify (#90).
run: bash scripts/test-install-linux.sh
- name: Names agree between installer, units and release assets; old agent only warned about
run: |
bash scripts/test-name-consistency.sh
bash scripts/test-legacy-agent.sh
- name: Release smoke gates and the release-record check (fixtures, no network, no systemd)
# The pure parts of scripts/release-smoke-linux.sh and scripts/check-release-record.sh. The
# smoke itself runs in .github/workflows/linux-release-smoke.yml (dispatch and release only).
run: bash scripts/test-release-smoke-linux.sh
- name: "Cutover guide: its shell blocks parse, its drop-in removal block and grep match the fixtures"
# Runs the guide's own text against fixtures under a temporary HOME. Touches no unit or port.
run: bash scripts/test-cutover-guide.sh
- name: pw-mcp.sh is marked deprecated and still launches unchanged (D14)
# A stub stands in for playwright-mcp; nothing real starts and no port opens.
run: bash scripts/test-pw-mcp-deprecated.sh

linux-hands-node:
name: Linux hands node (${{ matrix.arch }})
Expand Down
235 changes: 235 additions & 0 deletions .github/workflows/linux-release-smoke.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,235 @@
name: Linux release smoke

# The release-time Linux smoke (docs/requirements/linux-browser-tier.md, section 3.3, and
# docs/releasing.md "Linux release gates"). It runs on `workflow_dispatch` and as the first stage of
# release.yml, never per PR: it downloads hundreds of MB per cell. It builds and tests only. It
# publishes nothing, creates no tag and no release, and holds no secret or environment.
#
# Jobs:
# pins the Playwright pins match upstream for all four platforms (V1, R7.2)
# smoke Ubuntu 22.04 and 24.04, amd64 and arm64: a real `browser install`, the headless health
# check, the listener self-check on the live tree (V2), `kill -9` of the harness and a
# survivor check. The cell FAILS without a systemd user manager.
# debian12 Debian 12 container, amd64 and arm64: install, preflight and the health check, up to
# the containment check (no user manager in a container)
# record the per-release manual record (docs/release-records/linux-VERSION.md); a missing or
# unfinished record fails the release, V2 and D7 included
#
# V2 is decided: no TCP or UDP listener, and any Unix listener inside the child's private per-run 0700
# TMPDIR owned by the daemon's uid (scripts/release-smoke-linux.sh gate_v2). D7 (the AppArmor profile)
# is decided: the single glob stays. Do not weaken either here.

on:
workflow_call:
inputs:
ref:
description: "Git ref to build and smoke (the release tag)"
required: false
type: string
default: ""
strict:
description: "Fail when the release record is missing or unfinished (release.yml sets true)"
required: false
type: boolean
default: false
workflow_dispatch:
# Dispatch it on the branch or commit to check: `gh workflow run linux-release-smoke.yml --ref BRANCH`.

permissions:
contents: read

jobs:
pins:
name: Pins cover and match upstream (all four platforms)
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
ref: ${{ inputs.ref || github.sha }}
- name: Offline check, then every pinned artifact re-downloaded
# The same two commands as the macOS release job, not a weaker form (R7.2).
run: |
set -euo pipefail
python3 scripts/playwright-pins.py verify --offline
python3 scripts/playwright-pins.py verify --online
- name: Each platform has a pinned Node.js and a pinned Chromium source (V1)
run: |
set -euo pipefail
python3 - <<'PY'
import json
pins = json.load(open("release/playwright-pins/pins.json"))
want = ["darwin-arm64", "darwin-x64", "linux-arm64", "linux-x64"]
for label in ("node", "chromium"):
got = sorted(pins[label]["artifacts"])
assert got == want, "%s artifacts cover %s, need %s" % (label, got, want)
for plat in want:
print("%-12s node ok, chromium source %s" % (plat, pins["chromium"]["artifacts"][plat]["source"]))
PY

smoke:
name: Smoke ${{ matrix.os }} ${{ matrix.arch }}
strategy:
fail-fast: false
matrix:
include:
- { os: ubuntu-22.04, arch: amd64, runner: ubuntu-22.04 }
- { os: ubuntu-22.04, arch: arm64, runner: ubuntu-22.04-arm }
- { os: ubuntu-24.04, arch: amd64, runner: ubuntu-24.04 }
- { os: ubuntu-24.04, arch: arm64, runner: ubuntu-24.04-arm }
runs-on: ${{ matrix.runner }}
timeout-minutes: 40
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
ref: ${{ inputs.ref || github.sha }}
- uses: dtolnay/rust-toolchain@39008827e6b4319a349e9a42dfc90579dd25f1ca # stable
with:
toolchain: stable
- name: Relax the unprivileged user-namespace restriction (this ephemeral runner only)
# Ubuntu 24.04 restricts unprivileged user namespaces through AppArmor, which stops
# Chromium's sandbox on a runner. This is a property of the throwaway runner, not advice for
# hosts: a host keeps the restriction and uses the path-scoped profile that
# `browser preflight` prints (ADR D7).
run: |
f=/proc/sys/kernel/apparmor_restrict_unprivileged_userns
if [ -e "$f" ] && [ "$(cat "$f")" != 0 ]; then
echo "::notice::kernel.apparmor_restrict_unprivileged_userns was $(cat "$f"); setting it to 0 on this ephemeral runner only"
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
else
echo "kernel.apparmor_restrict_unprivileged_userns: not present or already 0; nothing relaxed"
fi
- id: um
name: Provide a user manager (linger, the per-user service of the runner uid, XDG_RUNTIME_DIR)
run: |
set -u
uid=$(id -u)
rt="/run/user/$uid"
available=false
if [ -d /run/systemd/system ]; then
sudo loginctl enable-linger "$USER" || true
sudo systemctl start "user@${uid}.service" || true
for _ in $(seq 1 30); do
state=$(XDG_RUNTIME_DIR="$rt" systemctl --user is-system-running 2>/dev/null || true)
if [ -S "$rt/bus" ] && { [ "$state" = running ] || [ "$state" = degraded ]; }; then
available=true
break
fi
sleep 2
done
fi
if [ "$available" = true ]; then
{
echo "XDG_RUNTIME_DIR=$rt"
echo "DBUS_SESSION_BUS_ADDRESS=unix:path=$rt/bus"
} >> "$GITHUB_ENV"
fi
echo "available=$available" >> "$GITHUB_OUTPUT"
- name: A user manager is required (unlike the optional per-PR job, this one fails without it)
if: steps.um.outputs.available != 'true'
run: |
echo "::error::no systemd user manager on this runner; the release smoke cannot run, so the release is blocked (requirements 3.3)"
exit 1
- name: Build the binary and the end-to-end harness
working-directory: poc/reverse-attach-linux
run: |
set -euo pipefail
cargo build --release
cargo test --release --no-run --message-format=json \
| jq -r 'select(.reason == "compiler-artifact" and .profile.test == true and .executable != null and .target.name == "oab-computer") | .executable' \
| tail -n 1 > "$RUNNER_TEMP/harness-path"
test -x "$(cat "$RUNNER_TEMP/harness-path")"
- name: Smoke (install, health check, listeners, kill -9, survivors)
env:
# `--retry` runs the containment self-test in the CLI process (V11). It uses the production
# unit names, which is fine on a throwaway runner.
OAB_SMOKE_STATUS_RETRY: "1"
run: |
set -o pipefail
bash scripts/release-smoke-linux.sh \
--bin "$PWD/poc/reverse-attach-linux/target/release/oab-computer" \
--harness "$(cat "$RUNNER_TEMP/harness-path")" 2>&1 | tee "$RUNNER_TEMP/smoke.log"
- name: Gate summary
if: always()
run: grep -h '^GATE ' "$RUNNER_TEMP/smoke.log" || echo "no GATE lines were printed"
- name: Nothing left behind
if: always()
run: |
left=$(systemctl --user list-units 'oab-l[45]-test-*' --all --no-legend 2>/dev/null | wc -l)
echo "transient test units left: $left"
[ "$left" -eq 0 ]

debian12:
name: Debian 12 container ${{ matrix.arch }}
strategy:
fail-fast: false
matrix:
include:
- { arch: amd64, runner: ubuntu-24.04 }
- { arch: arm64, runner: ubuntu-24.04-arm }
runs-on: ${{ matrix.runner }}
timeout-minutes: 40
env:
# debian:12-slim, the multi-architecture index digest, resolved 2026-11-17. Pinned by digest, not
# by tag. Refresh it deliberately (docs/releasing.md).
DEBIAN12_IMAGE: debian@sha256:734a72b3d6142a71993b4bc580ca01d8ca687f77a2c422d96a961d3376b179bc
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
ref: ${{ inputs.ref || github.sha }}
- uses: dtolnay/rust-toolchain@39008827e6b4319a349e9a42dfc90579dd25f1ca # stable
with:
toolchain: stable
- name: Relax the unprivileged user-namespace restriction (this ephemeral runner only)
run: |
f=/proc/sys/kernel/apparmor_restrict_unprivileged_userns
if [ -e "$f" ] && [ "$(cat "$f")" != 0 ]; then
echo "::notice::kernel.apparmor_restrict_unprivileged_userns was $(cat "$f"); setting it to 0 on this ephemeral runner only"
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
fi
- name: Build the binary (the runner is newer than Debian 12, so this also proves it runs on glibc 2.36)
working-directory: poc/reverse-attach-linux
run: cargo build --release
- name: Install, preflight and the health check inside the container
# Chromium's sandbox needs unprivileged user namespaces, which Docker's default seccomp and
# AppArmor profiles stop. Both are lifted for this one throwaway container, and the log says so.
run: |
set -o pipefail
echo "::notice::container runs with seccomp=unconfined and apparmor=unconfined so Chromium's sandbox can create a user namespace (throwaway container, runner only)"
docker run --rm \
--security-opt seccomp=unconfined --security-opt apparmor=unconfined \
-v "$PWD/poc/reverse-attach-linux/target/release/oab-computer:/work/oab-computer:ro" \
-v "$PWD/scripts/release-smoke-linux.sh:/work/release-smoke-linux.sh:ro" \
"$DEBIAN12_IMAGE" \
bash /work/release-smoke-linux.sh --bin /work/oab-computer --in-container 2>&1 | tee "$RUNNER_TEMP/debian12.log"
- name: Gate summary
if: always()
run: grep -h '^GATE ' "$RUNNER_TEMP/debian12.log" || echo "no GATE lines were printed"

record:
name: Per-release manual record
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
ref: ${{ inputs.ref || github.sha }}
- name: docs/release-records/linux-VERSION.md exists, has no PENDING, and V2 and D7 are decided
# Release (strict): a missing or unfinished record fails. Dispatch: it reports and passes, because
# a dispatch is not a release. A V2 or D7 row that says "open, owner decision pending" blocks the
# release; this step never fills or skips them.
env:
STRICT: ${{ inputs.strict && 'true' || 'false' }}
REF: ${{ inputs.ref }}
run: |
set -euo pipefail
case "$REF" in
v[0-9]*) VERSION=$(scripts/release-version.sh "$REF") ;;
*) VERSION=$(scripts/release-version.sh) ;;
esac
echo "version: $VERSION (strict: $STRICT)"
if [ "$STRICT" = true ]; then
scripts/check-release-record.sh "$VERSION"
else
scripts/check-release-record.sh "$VERSION" --report-only
fi
38 changes: 35 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,33 @@ on:

# Release is the only workflow allowed to write repository contents. It never
# runs PR-controlled code with secrets: push tags and manual dispatch only.
# The default is read-only; each job below asks for exactly what it needs.
permissions:
contents: write
contents: read

concurrency:
group: oab-computer-release-${{ github.ref }}
cancel-in-progress: false

jobs:
smoke:
# The Linux release gates (docs/releasing.md "Linux release gates"): the pins for all four
# platforms, the four-cell smoke, the Debian 12 container job and the per-release record. A red
# gate stops both jobs below before anything is signed or published. No environment and no
# secret here, so it starts on the tag push and does not wait for the reviewer approval.
name: Linux release gates
uses: ./.github/workflows/linux-release-smoke.yml
permissions:
contents: read
with:
ref: ${{ inputs.tag || github.ref_name }}
strict: true

release:
name: Universal app + signed/notarized pkg
needs: smoke
permissions:
contents: write
runs-on: macos-15
environment: release
env:
Expand Down Expand Up @@ -187,12 +204,17 @@ jobs:

linux:
name: Linux hands node tarball (${{ matrix.arch }})
needs: smoke
permissions:
contents: write # upload to the release
id-token: write # the OIDC token the attestation is signed with
attestations: write # store the attestation
strategy:
fail-fast: false
matrix:
include:
- arch: amd64
runner: ubuntu-latest
runner: ubuntu-24.04
- arch: arm64
runner: ubuntu-24.04-arm
runs-on: ${{ matrix.runner }}
Expand All @@ -206,7 +228,10 @@ jobs:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
ref: ${{ env.RELEASE_TAG }}
- uses: dtolnay/rust-toolchain@stable
- uses: dtolnay/rust-toolchain@39008827e6b4319a349e9a42dfc90579dd25f1ca # stable
# Pinned by commit: this job now holds id-token: write and contents: write.
with:
toolchain: stable
- name: Validate tag against the version source
# Same gate as the macOS job: the tag must equal `let version` in main.swift. The tag
# is then compiled into the Linux binary, so it cannot report another version (#74).
Expand Down Expand Up @@ -236,6 +261,13 @@ jobs:
tar czf "$NAME.tar.gz" "$NAME"
sha256sum "$NAME.tar.gz" > "$NAME.tar.gz.sha256"
echo "ASSET=$NAME.tar.gz" >> "$GITHUB_ENV"
- name: Attest build provenance of the tarball
# Only the tarball is a subject, not its .sha256. Consumers verify with `gh attestation
# verify` (docs/releasing.md "Verifying a Linux tarball"). The attestation says this
# repository's workflow built the file from a stated commit; it does not make a download safe.
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
with:
subject-path: ${{ env.ASSET }}
- name: Upload to the release
# The macOS job creates the release; wait for it rather than racing on
# `gh release create` from two jobs.
Expand Down
Loading
Loading