Add post-deploy installer smoke canary

Merged
JE
3mo ago
+78-3

What

A post-deploy canary for the published installer, plus two installer-scoped comment fixes from the #568 incident review.

The install endpoint serves main, so merging a change to scripts/install.sh deploys it immediately. #558 shipped a sourcing guard that broke the documented curl … | bash path under set -u; #568 fixed it and added a bats regression test that gates pre-merge. Nothing verified the published installer post-merge — this closes that gap.

The canary (.github/workflows/installer-smoke.yml)

  • Triggers: nightly schedule, workflow_dispatch, and push to main touching scripts/install.sh.
  • Endpoint: the canonical Quick Start command from the README, cache-busted with the commit SHA (?sha=${GITHUB_SHA}) — raw.githubusercontent.com serves max-age=300, so a push-triggered run could otherwise fetch the pre-push installer and falsely pass. The canonical endpoint preserves the query on redirect, making each commit's request cache-distinct.
  • Legs: ubuntu-latest (modern bash) and macos-latest via stock /bin/bash, which asserts exactly Bash 3.2 through the same interpreter that runs the install — the coverage can't silently degrade if a future runner image changes /bin/bash.
  • Isolation: scratch HOME + explicit BASECAMP_BIN_DIR contain the installer's writes (it edits shell config and installs the baseline skill even with BASECAMP_SKIP_SETUP=1 / BASECAMP_SETUP_AGENT=none). Asserts the deterministic installed path, not ambient PATH.
  • Hygiene: permissions: {}, timeout-minutes: 10, concurrency group; no actions used, so nothing to pin. actionlint and zizmor clean.

Comment fixes

  • e2e/installer.bats: the piped-execution test's PATH comment said "Keep PATH empty"; it actually points at a binary-free tmpdir.
  • scripts/install.sh: document why the guard's :-$0 fallback is required (bash from stdin or -c leaves BASH_SOURCE unset, aborting under set -u) so a future cleanup doesn't re-break piping.

Verification

  • bats e2e/installer.bats — 12/12 pass.
  • bin/ci green.
  • Will workflow_dispatch the canary after merge to confirm both legs.

Refs #558, #568


Summary by cubic

Adds a post-deploy smoke canary that installs the published CLI via the Quick Start on Linux and macOS. Also updates installer comments and sets explicit workflow concurrency behavior.

  • New Features

    • Adds .github/workflows/installer-smoke.yml: runs nightly, on demand, and when scripts/install.sh changes; permissions: {}, timeout-minutes: 10, concurrency group with cancel-in-progress: false.
    • Installs from https://basecamp.com/install-cli?sha=${GITHUB_SHA} to bust CDN cache; verifies the binary at the deterministic install path.
    • Runs on ubuntu-latest and macos-latest; macOS uses /bin/bash and asserts Bash 3.2; uses scratch HOME and BASECAMP_BIN_DIR to isolate writes.
  • Bug Fixes

    • Corrects PATH comment in e2e/installer.bats to note a binary-free tmpdir.
    • Documents why ${BASH_SOURCE[0]:-$0} is required in scripts/install.sh to keep curl | bash working with set -u.