Skip to content

ci: clean-install matrix (linux + macos + windows + windows-ps5) - #186

Merged
joelteply merged 3 commits into
canaryfrom
ci/clean-install-matrix
Apr 28, 2026
Merged

joelteply merged 3 commits into
canaryfrom
ci/clean-install-matrix

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Summary

Joel asked 2026-04-28: "guarantee clean mac and windows installs work, and as much of this as possible is fixed… CI after fixing what we deem important for release."

This is the diagnostic — five jobs that run on every PR + every canary/main push:

  • clean-install-linux — ubuntu install.sh + airc doctor + smoke test (host stays up, teardown clean)
  • clean-install-macos — macos install.sh + same smoke
  • clean-install-windows — windows install.ps1 under pwsh + airc doctor
  • clean-install-windows-ps5 — install.ps1 under Windows PowerShell 5.1 (the default that ships with Windows; catches regressions like bootstrap-airc.ps1 fails under PowerShell 5.1 (airc.ps1 requires 7+) #91)
  • integration-suite — push-only on canary/main, runs full test/integration.sh

Why now

Multiple Windows install issues from RebelTechPro (#91, #94, #95, #96, #97, #98, #99) plus the airc.ps1 drift (#152) have been sitting open. Without CI, every regression slipped past review and only surfaced when a real Windows user hit them. This PR doesn't fix them — it gives us the feedback loop to fix them with confidence.

Until Windows is green

airc doctor issues are treated as non-fatal in the windows jobs. We'll tighten to hard-fail once the open Windows install issues land. The install + bin-discovery itself still validates the basic path.

Test plan

  • Validates linux install path
  • Validates macos install path
  • Will surface what's actually broken on Windows today (the diagnostic this PR exists to provide)

🤖 Generated with Claude Code

Joel asked 2026-04-28: "guarantee clean mac and windows installs work,
and as much of this as possible is fixed... CI after fixing what we deem
important for release."

Three concurrent jobs on every PR + every push to canary/main:

- clean-install-linux:    ubuntu install.sh + airc doctor + smoke (host
                          stays up, teardown clean).
- clean-install-macos:    macos install.sh + same smoke.
- clean-install-windows:  windows install.ps1 (pwsh) + airc doctor.
- clean-install-windows-ps5: install.ps1 under Windows PowerShell 5.1 —
                          the default that ships with Windows. Catches
                          regressions like #91 (bootstrap fails under
                          5.1 because airc.ps1 has #Requires -Version
                          7.0).

Plus, on push to canary/main only (not PRs — rate limits + flaky network):

- integration-suite:      full test/integration.sh on ubuntu. The heavy
                          gate; serves as the canary→main green signal.

Concurrency group cancels superseded runs on the same ref. PR jobs run
on every push to the PR branch.

Until the open Windows install issues land (#91, #94, #95, #96, #97,
#98, #99, #152), the windows jobs treat `airc doctor` failures as
non-fatal — the install + bin-discovery itself still validates,
and we'll tighten to hard-fail once those are resolved.

Open issues this CI surface:
- #91 — bootstrap PS 5.1 (clean-install-windows-ps5)
- #94 — Tailscale winget package ID typo (install)
- #96 — install.ps1 doesn't install OpenSSH Server
- #98 — install.ps1 leaves DefaultShell unconfigured
- #152 — airc.ps1 ~20 commits behind canary

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings April 28, 2026 02:09
pgrep -f 'airc connect ...' didn't match the actual argv 'bash /path/to/airc
connect ...' on the runners. Switch to checking airc.pid which is
canonical (and what airc teardown itself reads).

For Windows: PS try/catch doesn't trap native exit codes — airc doctor
exited 1 because gh wasn't authed and tailscale wasn't installed (both
expected in CI), but the catch never fired. Run airc doctor directly,
log the LASTEXITCODE if non-zero, then explicitly exit 0 so the step
treats it as informational (the install + bin-discovery is what we're
gating on right now).

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a GitHub Actions CI workflow intended to validate “clean install” paths across Linux/macOS/Windows (including Windows PowerShell 5.1) and to run the full integration suite on canary/main pushes, providing earlier signal for installer regressions—especially on Windows.

Changes:

  • Introduces clean-install-* jobs for Linux, macOS, Windows (pwsh), and Windows PowerShell 5.1.
  • Adds a lightweight smoke check for linux/macos (airc connect --no-room --no-gist + airc teardown).
  • Adds an integration-suite job on canary/main pushes to run test/integration.sh.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/ci.yml
Comment on lines +109 to +113
cp -r . $HOME/.airc-src/
AIRC_SKIP_PREREQS=1 AIRC_DIR=$HOME/.airc-src bash install.sh

- name: airc doctor
run: |

Copilot AI Apr 28, 2026

Copy link

Choose a reason for hiding this comment

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

On macOS the smoke test backgrounds airc connect --no-room --no-gist, but the liveness check uses pgrep -f "airc connect --no-gist", which won't match if --no-room appears between connect and --no-gist. Match the full argv or check the background PID so the smoke test is stable.

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml
Comment on lines +117 to +120

- name: Smoke — same as linux (airc.pid based)
run: |
export PATH="$HOME/.local/bin:$PATH"

Copilot AI Apr 28, 2026

Copy link

Choose a reason for hiding this comment

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

The macOS post-teardown check again uses pgrep -f "airc connect --no-gist", which may miss the actual argv (--no-room --no-gist) and could produce a false pass/fail. Consider asserting teardown via the specific background PID (or a pattern that matches the full flag set).

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml
Comment on lines +54 to +58
run: |
export PATH="$HOME/.local/bin:$PATH"
which airc
airc doctor || echo "airc doctor reported issues (non-fatal in CI)"

Copilot AI Apr 28, 2026

Copy link

Choose a reason for hiding this comment

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

airc doctor is treated as non-fatal on linux/macos (airc doctor || echo ...). The PR description calls out using doctor as part of the clean-install gate; if linux/macos doctor failures should block regressions, this should fail the job (keeping the non-fatal behavior only on the Windows jobs while the port catches up).

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml
Comment on lines +129 to +139
if [ ! -f /tmp/ci-airc/state/airc.pid ]; then
echo "FAIL: airc.pid never appeared — connect didn't reach host loop"
cat /tmp/ci-airc/host.log || true
exit 1
fi
for p in $(cat /tmp/ci-airc/state/airc.pid); do
if ! kill -0 "$p" 2>/dev/null; then
echo "FAIL: PID $p in airc.pid is not alive"
cat /tmp/ci-airc/host.log || true
exit 1
fi

Copilot AI Apr 28, 2026

Copy link

Choose a reason for hiding this comment

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

This step sets $env:AIRC_SKIP_PREREQS = '1', but install.ps1 does not currently honor an AIRC_SKIP_PREREQS escape hatch (it always runs the winget/capability prereq installs). Either remove the env var to avoid implying it's effective, or add a corresponding check in install.ps1 and then rely on it here.

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml
Comment on lines +166 to +170
& "$env:AIRC_DIR\install.ps1"

- name: airc doctor (powershell wrapper)
shell: pwsh
run: |

Copilot AI Apr 28, 2026

Copy link

Choose a reason for hiding this comment

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

This job also sets $env:AIRC_SKIP_PREREQS = '1', but install.ps1 doesn't currently branch on that environment variable. If the intent is to skip winget/capability installs on CI runners, install.ps1 needs an explicit check; otherwise drop the variable here to avoid confusion.

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml
Comment on lines +3 to +7
# Three jobs on every PR + every push to canary/main:
#
# clean-install-linux ubuntu install.sh + airc doctor + smoke test
# clean-install-macos macos install.sh + airc doctor + smoke test
# clean-install-windows windows install.ps1 + airc doctor (PS-side)

Copilot AI Apr 28, 2026

Copy link

Choose a reason for hiding this comment

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

The header comment says there are "Three jobs on every PR" and lists linux/macos/windows, but this workflow also adds clean-install-windows-ps5. Update the comment block so it accurately reflects the jobs that run on PRs (and what each covers).

Suggested change
# Three jobs on every PR + every push to canary/main:
#
# clean-install-linux ubuntu install.sh + airc doctor + smoke test
# clean-install-macos macos install.sh + airc doctor + smoke test
# clean-install-windows windows install.ps1 + airc doctor (PS-side)
# Four jobs on every PR + every push to canary/main:
#
# clean-install-linux ubuntu install.sh + airc doctor + smoke test
# clean-install-macos macos install.sh + airc doctor + smoke test
# clean-install-windows windows install.ps1 + airc doctor (PowerShell)
# clean-install-windows-ps5 windows PowerShell 5 compatibility coverage

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml
Comment on lines +46 to +48
run: |
mkdir -p $HOME/.airc-src
cp -r . $HOME/.airc-src/

Copilot AI Apr 28, 2026

Copy link

Choose a reason for hiding this comment

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

The current staging approach copies the checked-out repo (including .git) into $HOME/.airc-src and then runs install.sh. On pull_request checkouts, git rev-parse --abbrev-ref HEAD is typically HEAD, so install.sh treats this as a non-channel branch and checks out/pulls main/canary, meaning CI won't actually validate the PR's install script and runtime. Consider adding an explicit CI mode to install.sh to skip the channel switch/pull, or adjust the workflow to exercise only the installer's wiring steps without invoking the git update logic.

Suggested change
run: |
mkdir -p $HOME/.airc-src
cp -r . $HOME/.airc-src/
# Copy the working tree without .git so PR checkouts in detached
# HEAD do not trigger install.sh branch/channel switch logic.
run: |
mkdir -p $HOME/.airc-src
tar --exclude=.git -cf - . | tar -C $HOME/.airc-src -xf -

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml
Comment on lines +69 to +73
# process line is `bash /path/to/airc connect ...` and pgrep
# patterns are brittle across distros.
for i in 1 2 3 4 5 6 7 8 9 10; do
[ -f /tmp/ci-airc/state/airc.pid ] && break
sleep 1

Copilot AI Apr 28, 2026

Copy link

Choose a reason for hiding this comment

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

On linux the smoke test backgrounds airc connect --no-room --no-gist, but the liveness check uses pgrep -f "airc connect --no-gist". That pattern will not match when --no-room appears between connect and --no-gist, so the check can fail even when the process is running. Use a pattern that matches the actual argv (or check the captured $HOST_PID directly).

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml
Comment on lines +77 to +80
cat /tmp/ci-airc/host.log || true
exit 1
fi
# Verify all PIDs in airc.pid are alive.

Copilot AI Apr 28, 2026

Copy link

Choose a reason for hiding this comment

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

The post-teardown check also uses pgrep -f "airc connect --no-gist", which may not match the actual process argv (--no-room --no-gist) and could let a still-running host slip through. Prefer checking $HOST_PID (or match the full flag set) for a reliable teardown assertion.

Copilot uses AI. Check for mistakes.
@joelteply
joelteply merged commit b1092fb into canary Apr 28, 2026
6 checks passed
@joelteply
joelteply deleted the ci/clean-install-matrix branch April 28, 2026 02:21
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.

2 participants