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
37 changes: 31 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
name: ci

on:
# Owner decision 2026-11-02: a merge of a PR that already passed is not re-tested on main. Main runs only when a
# workflow file changes (a PR that edits the pinned workflow is attested by main's run), or by hand. macOS and the
# other release platforms run the full suite on every release tag (release.yml).
push:
branches: [main]
paths-ignore: ["docs/**", "*.md", ".cleo/**"]
paths: [".github/workflows/**"]
workflow_dispatch:
pull_request:
paths-ignore: ["docs/**", "*.md", ".cleo/**"]

Expand All @@ -16,26 +20,47 @@ concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
test:
# T767: the suite is split into 4 shards that run in parallel (about 26 min serial per platform).
shard:
name: shard ${{ matrix.os }} ${{ matrix.shard }}/4
strategy:
fail-fast: false
matrix:
# T013: pull requests run Linux only; macOS runs on main pushes and on release tags (release.yml).
# T013: pull requests run Linux only; macOS runs on main runs (workflow changes, manual) and on release tags (release.yml).
os: ${{ fromJSON(github.event_name == 'pull_request' && '["ubuntu-24.04"]' || '["macos-14", "ubuntu-24.04"]') }}
shard: [1, 2, 3, 4]
runs-on: ${{ matrix.os }}
timeout-minutes: 60
timeout-minutes: 40
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
- run: npm ci
- run: npm test
- run: npx tsc --noEmit
- run: sh scripts/test-shard.sh
env:
SHARD: ${{ matrix.shard }}/4
- if: matrix.shard == 1
run: npx tsc --noEmit
- name: Committed dist/ matches src/
if: matrix.shard == 1
run: npm run check-dist
- name: Single executable builds and runs
if: matrix.shard == 1
run: |
node scripts/build-sea.mjs
node scripts/smoke-sea.mjs "build/agentmbx-$(node -p 'process.platform + "-" + process.arch')"

# The required check (.cleo/project-context.json pins "test (ubuntu-24.04)"): green only when every shard passed.
test:
name: test (${{ matrix.os }})
needs: shard
if: always()
strategy:
matrix:
os: ${{ fromJSON(github.event_name == 'pull_request' && '["ubuntu-24.04"]' || '["macos-14", "ubuntu-24.04"]') }}
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- run: test "${{ needs.shard.result }}" = success
27 changes: 26 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,33 @@ permissions:
contents: read

jobs:
# T767: the full suite on every release platform, split into 4 parallel shards per platform.
test:
name: test ${{ matrix.os }} ${{ matrix.shard }}/4
strategy:
fail-fast: true
matrix:
os: [macos-14, macos-15-intel, ubuntu-24.04, ubuntu-24.04-arm]
shard: [1, 2, 3, 4]
runs-on: ${{ matrix.os }}
timeout-minutes: 40
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
- name: Tag matches package.json version
run: |
want="v$(node -p 'require("./package.json").version')"
[ "$want" = "$GITHUB_REF_NAME" ] || { echo "tag $GITHUB_REF_NAME does not match package.json ($want)"; exit 1; }
- run: npm ci
- run: sh scripts/test-shard.sh
env:
SHARD: ${{ matrix.shard }}/4

build:
needs: test
name: build ${{ matrix.platform }}
strategy:
fail-fast: true
Expand All @@ -33,7 +59,6 @@ jobs:
want="v$(node -p 'require("./package.json").version')"
[ "$want" = "$GITHUB_REF_NAME" ] || { echo "tag $GITHUB_REF_NAME does not match package.json ($want)"; exit 1; }
- run: npm ci
- run: npm test
- run: npx tsc --noEmit
- name: Build single executable
run: node scripts/build-sea.mjs
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

- **Faster CI and releases (T766, T767, owner decisions 2026-11-02).** The suite (about 26 minutes per platform, run one test at a time) now runs as 4 parallel shards per platform, in pull requests and on release tags. Pushes to main run CI only when a workflow file changes or when started by hand, so a merge of a PR that already passed is not tested again. The required check `test (ubuntu-24.04)` keeps its name and turns green only when every shard passed.

## 0.5.56 (2026-11-02)

- **Mail you read and set aside no longer goes quiet (T765, owner decision 2026-11-02).** Agents, mostly in OpenCode, opened requests within seconds and then never replied or acked: axiom-lab-dev had 15 requests and tasks from Oct 28 to 29 still waiting. The "read, not acked" reminder only ran on a prompt hook, and OpenCode has none. Meanwhile 70% of all read-but-unacked mail (961 of 1,371) was status or reply mail that asked for nothing. Now:
Expand Down
7 changes: 7 additions & 0 deletions scripts/test-shard.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
# T767: run one shard of the suite (SHARD=i/N). Same flags as `npm test`; kimi-web runs on its own in the last shard.
set -e
: "${SHARD:?set SHARD=i/N}"
export AGENTMBX_DEV=1
node --test --test-concurrency=1 --test-timeout=240000 --test-force-exit --test-shard="$SHARD" $(ls test/*.test.ts | grep -v 'test/kimi-web\.test\.ts')
if [ "${SHARD%/*}" = "${SHARD#*/}" ]; then node --test --test-concurrency=1 --test-timeout=240000 test/kimi-web.test.ts; fi
Loading