From 6c4bab7044609ab8c325224e98cc83cc261fe1ed Mon Sep 17 00:00:00 2001 From: Keaton Hoskins Date: Mon, 2 Nov 2026 11:13:48 -0800 Subject: [PATCH 1/2] ci(T766): run main CI only for workflow changes or by hand; merges of passed PRs are not re-tested Owner decision 2026-11-02. Release tags still run the full suite on all four platforms (release.yml). Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4bf83b2f..f3f7f97a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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/**"] @@ -20,7 +24,7 @@ jobs: 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"]') }} runs-on: ${{ matrix.os }} timeout-minutes: 60 From e83cf91e1cf8c29adf29743e20113012614787d9 Mon Sep 17 00:00:00 2001 From: Keaton Hoskins Date: Mon, 2 Nov 2026 11:51:38 -0800 Subject: [PATCH 2/2] ci(T767): run the suite as 4 parallel shards per platform in CI and on release tags The suite is ~26 min serial per platform. The required check test (ubuntu-24.04) is kept as a gate over the shards; release builds start after every platform shard passed. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 29 +++++++++++++++++++++++++---- .github/workflows/release.yml | 27 ++++++++++++++++++++++++++- CHANGELOG.md | 2 ++ scripts/test-shard.sh | 7 +++++++ 4 files changed, 60 insertions(+), 5 deletions(-) create mode 100755 scripts/test-shard.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f3f7f97a..1be74001 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,14 +20,17 @@ 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 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 @@ -35,11 +38,29 @@ jobs: 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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 152c0558..47ffbaa5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 51fab31c..0feb31b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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: diff --git a/scripts/test-shard.sh b/scripts/test-shard.sh new file mode 100755 index 00000000..783260b4 --- /dev/null +++ b/scripts/test-shard.sh @@ -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