Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 10 additions & 0 deletions .github/build-targets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{"os": "macos-15", "target": "aarch64-apple-darwin"},
{"os": "macos-15-intel", "target": "x86_64-apple-darwin", "post_merge_only": true},
{"os": "ubuntu-24.04", "target": "x86_64-unknown-linux-gnu"},
{"os": "ubuntu-24.04-arm", "target": "aarch64-unknown-linux-gnu"},
{"os": "ubuntu-24.04", "target": "x86_64-unknown-linux-musl"},
{"os": "ubuntu-24.04-arm", "target": "aarch64-unknown-linux-musl"},
{"os": "windows-2025", "target": "x86_64-pc-windows-msvc", "exe": ".exe"},
{"os": "windows-11-arm", "target": "aarch64-pc-windows-msvc", "exe": ".exe"}
]
31 changes: 10 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
code: ${{ steps.diff.outputs.code }}
platforms: ${{ steps.platforms.outputs.platforms }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -32,6 +33,14 @@ jobs:
else
echo "code=false" >> "$GITHUB_OUTPUT"
fi
# Every release target, from .github/build-targets.json. Pull requests skip the
# `post_merge_only` ones (macOS Intel: its runners queue for hours); pushes to main
# build them all (`installation-upgrade` → Release targets).
- id: platforms
env:
EVENT: ${{ github.event_name }}
run: |
echo "platforms=$(jq -c --arg event "$EVENT" '[.[] | select($event != "pull_request" or (.post_merge_only | not)) | del(.post_merge_only)]' .github/build-targets.json)" >> "$GITHUB_OUTPUT"

rust:
name: Rust (${{ matrix.os }})
Expand Down Expand Up @@ -233,27 +242,7 @@ jobs:
strategy:
fail-fast: false
matrix:
include:
- os: macos-15
target: aarch64-apple-darwin
- os: macos-15-intel
target: x86_64-apple-darwin
- os: ubuntu-24.04
target: x86_64-unknown-linux-gnu
- os: ubuntu-24.04-arm
target: aarch64-unknown-linux-gnu
- os: ubuntu-24.04
target: x86_64-unknown-linux-musl
- os: ubuntu-24.04-arm
target: aarch64-unknown-linux-musl
# Every release target builds on pull requests, so a tag never finds the
# first failure (`installation-upgrade` → Release targets).
- os: windows-2025
target: x86_64-pc-windows-msvc
exe: .exe
- os: windows-11-arm
target: aarch64-pc-windows-msvc
exe: .exe
include: ${{ fromJSON(needs.changes.outputs.platforms) }}
runs-on: ${{ matrix.os }}
defaults:
run:
Expand Down
89 changes: 89 additions & 0 deletions .github/workflows/non-git-snapshot-proof.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,91 @@ on:
- crates/cyber-core/src/worktrees/**
- Cargo.lock
- .github/workflows/non-git-snapshot-proof.yml
# Pull requests skip macOS Intel; it runs after merge.
push:
branches: [main]
paths:
- crates/cyber-snapshot/**
- crates/cyber-app/Cargo.toml
- crates/cyber-app/src/**
- crates/cyber-app/tests/support/scripted_model.rs
- crates/cyber-app/tests/support/snapshot*.rs
- crates/cyber-app/tests/support/managed_retirement_cut.rs
- crates/cyber-app/tests/support/managed_recovery_cut.rs
- crates/cyber-app/tests/support/location_retirement.rs
- crates/cyber-server/src/runtime/snapshot*.rs
- crates/cyber-server/src/runtime/snapshot_reclamation/**
- crates/cyber-server/src/runtime/rewind*.rs
- crates/cyber-server/src/runtime/drain.rs
- crates/cyber-server/src/runtime/structured*.rs
- crates/cyber-server/src/runtime/model.rs
- crates/cyber-server/src/runtime/mod.rs
- crates/cyber-server/src/runtime/events.rs
- crates/cyber-server/src/runtime/activity.rs
- crates/cyber-server/src/runtime/jobs.rs
- crates/cyber-server/src/runtime/input_jobs.rs
- crates/cyber-server/src/runtime/input_clients.rs
- crates/cyber-server/src/runtime/input_interrupt.rs
- crates/cyber-server/src/runtime/presence.rs
- crates/cyber-server/src/runtime/interactive.rs
- crates/cyber-server/src/runtime/goals/unattended.rs
- crates/cyber-server/tests/input_clients.rs
- crates/cyber-server/tests/input_interrupt.rs
- crates/cyber-server/tests/interactive_clients.rs
- crates/cyber-server/src/http/interactive.rs
- crates/cyber-server/src/runtime/process_jobs.rs
- crates/cyber-server/src/runtime/requests.rs
- crates/cyber-server/src/runtime/requests/**
- crates/cyber-server/tests/requests.rs
- crates/cyber-server/tests/jobs.rs
- crates/cyber-server/tests/structured_root.rs
- crates/cyber-server/tests/support/structured_terminal_fault.rs
- crates/cyber-server/src/http/sessions.rs
- crates/cyber-server/src/http/events.rs
- crates/cyber-server/src/http/jobs.rs
- crates/cyber-client/src/lib.rs
- crates/cyber-app/tests/snapshot_git_runtime.rs
- crates/cyber-app/tests/snapshot_reclamation.rs
- crates/cyber-app/tests/instructions.rs
- crates/cyber-core/src/config/**
- crates/cyber-core/src/rules.rs
- crates/cyber-core/src/import/snapshot.rs
- crates/cyber-core/src/memory/windows.rs
- crates/cyber-core/tests/import_snapshot.rs
- crates/cyber-core/src/import/mod.rs
- crates/cyber-core/src/lib.rs
- crates/cyber-core/tests/config.rs
- crates/cyber-tools/src/host.rs
- crates/cyber-tools/src/tools/fs.rs
- crates/cyber-tools/src/tools/patch.rs
- crates/cyber-tools/src/tools/agent.rs
- crates/cyber-tools/src/tools/background.rs
- crates/cyber-tools/tests/background_bash.rs
- crates/cyber-tools/tests/background_subagents.rs
- crates/cyber-server/src/runtime/auto_override.rs
- crates/cyber-tools/tests/instruction_config.rs
- crates/cyber-tools/tests/path_skills.rs
- crates/cyber-tools/tests/shell_patch.rs
- crates/cyber-server/src/runtime/context*.rs
- crates/cyber-server/src/runtime/instructions.rs
- crates/cyber-server/src/runtime/instructions/**
- crates/cyber-server/src/runtime/host.rs
- crates/cyber-server/tests/context_compaction.rs
- crates/cyber-server/tests/http.rs
- crates/cyber-tui/src/context_inspection.rs
- crates/cyber-server/tests/support/mod.rs
- crates/cyber-cli/Cargo.toml
- crates/cyber-cli/src/**
- crates/cyber-cli/tests/branches_cli.rs
- crates/cyber-cli/tests/exec_stream_input.rs
- crates/cyber-cli/tests/exec_output_schema.rs
- crates/cyber-cli/tests/support/**
- crates/cyber-server/src/workspace.rs
- crates/cyber-core/src/binary/native/**
- crates/cyber-core/src/binary/native.rs
- crates/cyber-core/src/worktrees/**
- Cargo.lock
- .github/workflows/non-git-snapshot-proof.yml
workflow_dispatch:
permissions:
contents: read
Expand All @@ -103,6 +188,10 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm, macos-15, macos-15-intel]
# macOS Intel runners queue for hours: pull requests skip them, main and
# workflow_dispatch still run them.
exclude:
- os: ${{ github.event_name == 'pull_request' && 'macos-15-intel' || 'none' }}
env:
CARGO_INCREMENTAL: '0'
CARGO_PROFILE_DEV_DEBUG: line-tables-only
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/plugin-admission-proof.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ jobs:
fail-fast: false
matrix:
os: [macos-15, macos-15-intel]
# macOS Intel runners queue for hours: pull requests skip them, main and
# workflow_dispatch still run them.
exclude:
- os: ${{ github.event_name == 'pull_request' && 'macos-15-intel' || 'none' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/plugin-bootstrap-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm, macos-15, macos-15-intel, windows-latest]
# macOS Intel runners queue for hours: pull requests skip them, main and
# workflow_dispatch still run them.
exclude:
- os: ${{ github.event_name == 'pull_request' && 'macos-15-intel' || 'none' }}
env:
CARGO_INCREMENTAL: 0
steps:
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/plugin-confinement-proof.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ jobs:
matrix:
os: [macos-15, macos-15-intel, ubuntu-24.04, ubuntu-24.04-arm]
runtime: [node, python, bun, deno, native]
# macOS Intel runners queue for hours: pull requests skip them, main and
# workflow_dispatch still run them.
exclude:
- os: ${{ github.event_name == 'pull_request' && 'macos-15-intel' || 'none' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand Down Expand Up @@ -133,6 +137,10 @@ jobs:
fail-fast: false
matrix:
os: [macos-15, macos-15-intel]
# macOS Intel runners queue for hours: pull requests skip them, main and
# workflow_dispatch still run them.
exclude:
- os: ${{ github.event_name == 'pull_request' && 'macos-15-intel' || 'none' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand Down Expand Up @@ -381,6 +389,10 @@ jobs:
matrix:
os: [macos-15, macos-15-intel]
runtime: [node, python, python-system, bun, deno]
# macOS Intel runners queue for hours: pull requests skip them, main and
# workflow_dispatch still run them.
exclude:
- os: ${{ github.event_name == 'pull_request' && 'macos-15-intel' || 'none' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/plugin-native-launcher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ jobs:
fail-fast: false
matrix:
os: [macos-15, macos-15-intel, ubuntu-24.04, ubuntu-24.04-arm, windows-latest]
# macOS Intel runners queue for hours: pull requests skip them, main and
# workflow_dispatch still run them.
exclude:
- os: ${{ github.event_name == 'pull_request' && 'macos-15-intel' || 'none' }}
env:
CARGO_INCREMENTAL: 0
steps:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/plugin-package-copy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm, macos-15, macos-15-intel, windows-latest]
# macOS Intel runners queue for hours: pull requests skip them, main and
# workflow_dispatch still run them.
exclude:
- os: ${{ github.event_name == 'pull_request' && 'macos-15-intel' || 'none' }}
env:
CARGO_INCREMENTAL: 0
steps:
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ A pull request must pass:
- The requirement inventory in `ROADMAP.md`: `python3 scripts/spec_inventory.py` after changing specs.
- `openspec validate --all --strict` and `python3 scripts/spec_lint.py`.
- The web dashboard and SDK builds and tests.
- A release build of every target in `.github/build-targets.json` except `x86_64-apple-darwin`. GitHub's macOS Intel runners queue for hours, so the Intel build and the Intel legs of the native proof workflows run after merge, on each push to `main`, and on manual (`workflow_dispatch`) runs.

## Pull requests

Expand Down
19 changes: 19 additions & 0 deletions openspec/changes/build-intel-mac-after-merge/proposal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Why

GitHub's macOS Intel runners (`macos-15-intel`) queue for one to two hours, so the `x86_64-apple-darwin` build and the Intel legs of the native proof workflows dominate the time every pull request waits for CI. The other targets finish in minutes. An Intel-only build failure is rare, and finding it right after merge, still before any tag is pushed, keeps the guarantee the requirement exists for.

## What Changes

- `ci.yml` reads the CI build matrix from one checked-in list, `.github/build-targets.json` (the same 8 targets as `scripts/release_assets.py` `ALL_TARGETS`). The `changes` job emits it as an output; on pull requests it drops the entries marked `post_merge_only` (only `x86_64-apple-darwin`). Pushes to `main` build all 8.
- The native proof workflows exclude `macos-15-intel` from their matrices on `pull_request` and keep it on `push` to `main` and `workflow_dispatch`:
- `plugin-bootstrap-environment.yml`, `plugin-native-launcher.yml`, `plugin-package-copy.yml`, `plugin-admission-proof.yml` (still runs `macos-15` on pull requests);
- `plugin-confinement-proof.yml` (`native`, `macos-signing-candidate`, `macos-signing-runtime`; `macos-native-gap` already runs only on `workflow_dispatch`);
- `non-git-snapshot-proof.yml`, which ran only on pull requests and `workflow_dispatch`, gains a `push` to `main` trigger with the same paths, so its Intel leg still runs after merge.
- `release.yml` is unchanged: a release builds every released target, Intel included.
- `scripts/tests/test_release_workflow.py` checks the list matches `ALL_TARGETS`, that only `x86_64-apple-darwin` is post-merge-only, and runs the workflow's own `jq` filter for both events.

## Impact

- Spec: `installation-upgrade` → Release targets (modified: Intel macOS builds on each push to `main` instead of each pull request).
- CI: `.github/build-targets.json`, `.github/workflows/ci.yml` and the six proof workflows above.
- Docs: `CONTRIBUTING.md` (What CI checks).
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## MODIFIED Requirements

### Requirement: Release targets
(P0) Each release SHALL publish static binaries for the following targets:
- `x86_64-unknown-linux-gnu`, `aarch64-unknown-linux-gnu`
- `x86_64-unknown-linux-musl`, `aarch64-unknown-linux-musl`
- `x86_64-apple-darwin`, `aarch64-apple-darwin`

The Windows targets `x86_64-pc-windows-msvc` and `aarch64-pc-windows-msvc` SHALL NOT be published until Windows sandbox enforcement passes its release gate; CI SHALL still build and test them on each pull request, and one switch in `scripts/release_assets.py` (`WINDOWS_RELEASED`) SHALL add their archives, npm packages and Scoop/WinGet manifests back, labeled preview. Each binary SHALL be packaged as `cyber-<version>-<target>.tar.gz` (`.zip` on Windows), with a SHA-256 checksum file and a Sigstore (cosign keyless) signature bundle. The release SHALL be produced by `.github/workflows/release.yml`, which SHALL run only when a `v<version>` tag is pushed and SHALL fail when the tag differs from the workspace version. It SHALL upload the assets to the GitHub Release `v<version>` (a prerelease unless the channel is `stable`) and replace `<channel>.json` on the rolling release `channel-<channel>` of the release source (→ Version and channel constants) only when the version is newer by semver than the one that manifest names; an older or equal tag SHALL be released without becoming the channel's (or GitHub's) latest. Releases SHALL run one at a time across tags. CI SHALL build every release target except `x86_64-apple-darwin`, Windows included, on each pull request, and every release target, `x86_64-apple-darwin` included, on each push to `main`, so a target that does not build is found before a tag is pushed. Signing SHALL not fail when a release has no `.zip` archive.

Reason for change: Windows confinement is still partial (sandboxed Git Bash and PowerShell cannot start in the AppContainer), so 0.1.0 ships macOS and Linux only. The release is built by the repository's GitHub workflow and published to GitHub Releases, because the project's own host does not exist yet; building every target before a tag keeps a failing (preview) target from blocking a tag that is already pushed. GitHub's macOS Intel runners queue for one to two hours, so `x86_64-apple-darwin` builds after merge instead of on each pull request.

#### Scenario: Release assets
- **WHEN** version 1.4.0 is released
- **THEN** the release contains 6 archives (macOS and Linux), `SHA256SUMS`, `SHA256SUMS.sigstore.json`, one `.sigstore.json` bundle per archive and `install.sh`, and `channel-stable` holds `stable.json` with version `1.4.0`

#### Scenario: Backport release
- **WHEN** `stable.json` names 1.4.0 and the tag `v1.3.5` is pushed
- **THEN** the release `v1.3.5` is published, not marked latest, and `stable.json` still names 1.4.0

#### Scenario: Not on pull requests
- **WHEN** a pull request is opened or `main` is pushed
- **THEN** the release workflow does not run

#### Scenario: Windows is built but not released
- **WHEN** a pull request changes Windows-only code and later version 0.1.0 is tagged
- **THEN** CI builds both Windows targets for the pull request, and the 0.1.0 release has no `.zip` archive, no `win32` npm package and no Scoop or WinGet manifest

#### Scenario: Intel macOS builds after merge
- **WHEN** a pull request is opened and later merged to `main`
- **THEN** CI builds every release target except `x86_64-apple-darwin` for the pull request, and every release target, `x86_64-apple-darwin` included, for the push to `main`
10 changes: 10 additions & 0 deletions openspec/changes/build-intel-mac-after-merge/tasks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## 1. CI

- [x] 1.1 `.github/build-targets.json` as the single CI build list; `ci.yml` `changes` job filters it on pull requests and `platforms` uses it via `fromJSON`
- [x] 1.2 Exclude `macos-15-intel` on pull requests in the proof workflows; add a `push` to `main` trigger to `non-git-snapshot-proof.yml`
- [x] 1.3 `scripts/tests/test_release_workflow.py`: list equals `ALL_TARGETS`, pull requests drop only `x86_64-apple-darwin`

## 2. Specs and docs

- [x] 2.1 Sync the spec delta into `openspec/specs/installation-upgrade`
- [x] 2.2 `CONTRIBUTING.md` What CI checks
Loading
Loading