Skip to content

chore: release v8.0.0 #175

chore: release v8.0.0

chore: release v8.0.0 #175

Workflow file for this run

name: Tests
# The hermetic test gate.
#
# WHY THIS EXISTS: until now no workflow ran `bun test` at all. The green check
# on a PR came from the review bot, so a merge could publish to npm with the
# suite never having run. A regex that silently deleted Gemini answers shipped
# for seven months and five releases behind exactly that gap.
#
# WHY NO API KEY SECRETS ARE SET HERE — this is load-bearing, not an oversight.
# Real-API tests gate on `test-helpers/credential-gate.ts`, which asks
# claudish's OWN CredentialAuthority whether a provider can be served (env →
# config `apiKeys` → 1Password). With no credentials present that answer is
# `false` everywhere, so every live test skips itself and what remains is
# exactly the deterministic tier: adapters, stream parsers, routing, fixtures.
# Measured locally in a credential-free environment: 1855 pass / 25 skip /
# 0 fail in ~56s, versus ~235s and real billing when keys ARE present.
#
# Adding a key secret here would silently convert this gate into the flaky,
# billable live suite. Live coverage belongs in smoke-test.yml, which is
# manually dispatched and holds the secrets on purpose.
on:
pull_request:
push:
branches: [main]
# A superseded push should not keep burning a runner.
concurrency:
group: tests-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: typecheck · lint · hermetic tests
# macOS, not ubuntu — deliberate. Measured on ubuntu-latest (run
# 31173939734): the credential-equivalence suite and the magmux e2e fail
# wholesale because claudish's credential authority reaches for macOS
# facilities (keychain, `ioreg` screen-lock probe) and the magmux bridge
# binary is a macOS artifact the release workflow downloads separately.
# The suite has only ever been developed and run on darwin. Gating on the
# platform it is actually written for gives a HONEST signal; gating on
# ubuntu would mean permanently-red checks people learn to ignore.
# Linux portability of the test suite is a separate piece of work.
runs-on: macos-latest
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
steps:
- uses: actions/checkout@v5
# PINNED, not `latest`. Measured on run 31174096977: a newer bun's
# `bun install` REWRITES packages/cli/package.json (expanding the `files`
# array), which biome then fails as a format error — a red gate caused by
# an upstream release rather than by the code under test. `latest` also
# means a bun release can break CI overnight with no commit to blame.
- uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.10"
# Root install — `workspaces: ["packages/*"]`, so this covers cli AND
# macos-bridge. The root scripts below span both packages; running
# `--cwd packages/cli` instead would silently drop macos-bridge.
- name: Install dependencies
run: bun install --frozen-lockfile
# team-grid.e2e.test.ts resolves magmux via findMagmuxForTest(), which
# checks packages/cli/node_modules/@claudish/magmux-<platform>-<arch>/bin
# then /opt/homebrew/bin then /usr/local/bin. The npm optionalDependency
# packages install as EMPTY DIRECTORIES — no bin/magmux inside — so the
# only candidate that ever resolves is the Homebrew copy. Locally that is
# already present, which is why the gap only showed up on a runner.
# This is the install path team-grid.ts itself points users at.
- name: Install magmux (e2e dependency)
run: brew install MadAppGang/tap/magmux
- name: Typecheck
run: bun run typecheck
# Fails on ERRORS only. The suite currently carries ~797 warnings
# (noExplicitAny, noExcessiveCognitiveComplexity) which are pre-existing
# style debt, not defects — biome exits 0 for those, so this gate catches
# genuine regressions without demanding a 300-file cleanup first.
- name: Lint
run: bun run lint
# CLAUDISH_SKIP_LIVE_E2E is REQUIRED here, and not just an optimisation.
# channel/e2e-channel.test.ts probes for a usable Claude Code at MODULE
# LOAD by spawning `claude --version` and awaiting only its `exit` event.
# A runner has no `claude` binary, so spawn emits `error` instead, the
# promise never settles, and the whole suite hangs until the job is
# killed (observed: >12 min on run 31172281077 before cancellation).
# The file's own flag short-circuits that probe.
#
# The timeout is the backstop: a future hang should fail in 10 minutes,
# not burn a 6-hour runner slot. A healthy run is ~60s.
- name: Hermetic tests
run: bun run test
timeout-minutes: 10
env:
CLAUDISH_SKIP_LIVE_E2E: "1"