Skip to content

perf: cut per-pass main-thread work on long sessions (#834) #3215

perf: cut per-pass main-thread work on long sessions (#834)

perf: cut per-pass main-thread work on long sessions (#834) #3215

name: Smoke (opencode bring-up on Linux)
# Standalone diagnostic workflow. Verifies that `opencode serve` actually
# responds to HTTP after printing "server listening" on a fresh GitHub-hosted
# Linux runner. Runs in 1-3 minutes — fast enough to catch the regression
# pattern that historically broke our host e2e suite for ~20-40 minutes per
# CI run before timing out.
#
# Probes both bun's fetch AND curl independently, with each binding choice
# (127.0.0.1 vs 0.0.0.0) so we can attribute failures correctly:
#
# matrix entry | curl | fetch | meaning
# -----------------------------|------|-------|--------------------------------
# hostname=127.0.0.1, both ok | ✓ | ✓ | healthy, current host suite would pass
# hostname=127.0.0.1, curl OK | | |
# but fetch fails | ✓ | ✗ | bun fetch on linux has a localhost edge case
# hostname=0.0.0.0, both ok | ✓ | ✓ | binding all interfaces fixes the issue
# hostname=0.0.0.0, both fail | ✗ | ✗ | opencode-on-linux fundamental break
# any: opencode never prints | | |
# "server listening" | n/a | n/a | opencode failed to start (separate class)
#
# The workflow is intentionally NOT gated to anything in ci.yml or release.yml —
# we want clear, isolated signal independent of the broader pipeline.
on:
push:
branches: [master, main, "train/**"]
pull_request:
workflow_dispatch:
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
smoke:
name: opencode HTTP probe (${{ matrix.hostname }})
runs-on: ubuntu-latest
timeout-minutes: 8
strategy:
# Run both hostname choices even if one fails — we want full diagnostic
# coverage, not bail-on-first-failure.
fail-fast: false
matrix:
hostname: ["127.0.0.1", "0.0.0.0"]
steps:
- uses: actions/checkout@v5
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install opencode (latest — matches host e2e)
# Float to latest: this smoke job exists to catch a Linux serve-startup
# regression, so it must run the version users get. See ci.yml host job
# for the re-pin escape hatch if an upstream build is known-bad.
run: bash scripts/ci/smoke-install-opencode-latest-matches-host-e2e.sh
- name: Verify opencode binary
run: bash scripts/ci/smoke-verify-opencode-binary.sh
- name: Probe opencode HTTP bring-up
env:
HOSTNAME: ${{ matrix.hostname }}
run: bash scripts/ci/smoke-probe-opencode-http-bring-up.sh