Skip to content

ci: add opt-in macOS test suite workflow - #6039

Merged
jpshackelford merged 3 commits into
mainfrom
ci/macos-test-suite
Oct 17, 2026
Merged

jpshackelford merged 3 commits into
mainfrom
ci/macos-test-suite

Conversation

@jpshackelford

@jpshackelford jpshackelford commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

HUMAN:

Periodically run tests on a MacOS runner so contributors working on MacOS have a good dev experience and don't face a test suite with spurious failures on MacOS.


AGENT:

Why

No existing workflow runs the test suite on macOS. server.yml has a macOS leg, but it only builds and smoke-tests the agent-server binary. tests.yml runs on Linux, plus a reduced tools-only Windows job. macOS-specific failures (for example #6036, #6038 and #5619) are therefore only found after the fact.

Summary

  • Add .github/workflows/tests-macos.yml, which runs the same suites and pytest commands as tests.yml (sdk, tools, agent_server, workspace, cross) on macos-latest, one matrix job per suite with fail-fast: false.
  • Trigger it by adding the macos-test-run label to a PR (it re-runs on each push while the label is present) or manually with "Run workflow" in the Actions tab, which defaults to main once this is merged. There is no changed-files gating, so every suite always runs, as on merge to main.
  • Coverage upload and the PR coverage comment are left out, since the Linux jobs already provide them. The workflow has read-only permissions, uses no secrets, and is not a required check.

Issue Number

Refs #6043

How to Test

Add the macos-test-run label to this PR and check that the five macOS <suite> tests jobs start. The label does not exist in the repo yet, so it must be created first. So far the workflow file has only been checked by parsing it as YAML and comparing its suites and flags with tests.yml. It has not run on a macOS runner, and some suites may fail on macOS for existing reasons.

Video/Screenshots

N/A. CI workflow change only.

Design Doc

N/A.

Type

  • Bug fix
  • Feature
  • Refactor
  • Breaking change
  • Docs / chore

Notes

The HUMAN: note is intentionally left for the author. The description validator also requires a linked issue carrying ready-for-dev, which this PR does not have yet.

This PR was drafted by an AI agent (OpenHands) on behalf of the user.


🐳 Agent Server images for this PR — GHCR package, pull/run commands, and all pushed tags (click to expand)

• GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server

Variants & Base Images

Variant Architectures Base Image Docs / Tags
java amd64, arm64 eclipse-temurin:17-jdk Link
python-slim amd64, arm64 python-node-runtime Link
python-minimal amd64, arm64 python-node-runtime Link
python amd64, arm64 python-node-runtime Link
golang amd64, arm64 golang:1.21-bookworm Link

Pull (multi-arch manifest)

# Each variant is a multi-arch manifest supporting both amd64 and arm64
docker pull ghcr.io/openhands/agent-server:9a213ba-python

Run

docker run -it --rm \
  -p 8000:8000 \
  --name agent-server-9a213ba-python \
  ghcr.io/openhands/agent-server:9a213ba-python

All tags pushed for this build

ghcr.io/openhands/agent-server:9a213ba-golang-amd64
ghcr.io/openhands/agent-server:9a213baa2bc1fcaf629c96272a1abdef7d6b433f-golang-amd64
ghcr.io/openhands/agent-server:ci-macos-test-suite-golang-amd64
ghcr.io/openhands/agent-server:9a213ba-golang_tag_1.21-bookworm-amd64
ghcr.io/openhands/agent-server:9a213ba-golang-arm64
ghcr.io/openhands/agent-server:9a213baa2bc1fcaf629c96272a1abdef7d6b433f-golang-arm64
ghcr.io/openhands/agent-server:ci-macos-test-suite-golang-arm64
ghcr.io/openhands/agent-server:9a213ba-golang_tag_1.21-bookworm-arm64
ghcr.io/openhands/agent-server:9a213ba-java-amd64
ghcr.io/openhands/agent-server:9a213baa2bc1fcaf629c96272a1abdef7d6b433f-java-amd64
ghcr.io/openhands/agent-server:ci-macos-test-suite-java-amd64
ghcr.io/openhands/agent-server:9a213ba-eclipse-temurin_tag_17-jdk-amd64
ghcr.io/openhands/agent-server:9a213ba-java-arm64
ghcr.io/openhands/agent-server:9a213baa2bc1fcaf629c96272a1abdef7d6b433f-java-arm64
ghcr.io/openhands/agent-server:ci-macos-test-suite-java-arm64
ghcr.io/openhands/agent-server:9a213ba-eclipse-temurin_tag_17-jdk-arm64
ghcr.io/openhands/agent-server:9a213ba-python-amd64
ghcr.io/openhands/agent-server:9a213baa2bc1fcaf629c96272a1abdef7d6b433f-python-amd64
ghcr.io/openhands/agent-server:ci-macos-test-suite-python-amd64
ghcr.io/openhands/agent-server:9a213ba-python-node-runtime-amd64
ghcr.io/openhands/agent-server:9a213ba-python-arm64
ghcr.io/openhands/agent-server:9a213baa2bc1fcaf629c96272a1abdef7d6b433f-python-arm64
ghcr.io/openhands/agent-server:ci-macos-test-suite-python-arm64
ghcr.io/openhands/agent-server:9a213ba-python-node-runtime-arm64
ghcr.io/openhands/agent-server:9a213ba-python-minimal-amd64
ghcr.io/openhands/agent-server:9a213baa2bc1fcaf629c96272a1abdef7d6b433f-python-minimal-amd64
ghcr.io/openhands/agent-server:ci-macos-test-suite-python-minimal-amd64
ghcr.io/openhands/agent-server:9a213ba-python-node-runtime-minimal-amd64
ghcr.io/openhands/agent-server:9a213ba-python-minimal-arm64
ghcr.io/openhands/agent-server:9a213baa2bc1fcaf629c96272a1abdef7d6b433f-python-minimal-arm64
ghcr.io/openhands/agent-server:ci-macos-test-suite-python-minimal-arm64
ghcr.io/openhands/agent-server:9a213ba-python-node-runtime-minimal-arm64
ghcr.io/openhands/agent-server:9a213ba-python-slim-amd64
ghcr.io/openhands/agent-server:9a213baa2bc1fcaf629c96272a1abdef7d6b433f-python-slim-amd64
ghcr.io/openhands/agent-server:ci-macos-test-suite-python-slim-amd64
ghcr.io/openhands/agent-server:9a213ba-python-node-runtime-slim-amd64
ghcr.io/openhands/agent-server:9a213ba-python-slim-arm64
ghcr.io/openhands/agent-server:9a213baa2bc1fcaf629c96272a1abdef7d6b433f-python-slim-arm64
ghcr.io/openhands/agent-server:ci-macos-test-suite-python-slim-arm64
ghcr.io/openhands/agent-server:9a213ba-python-node-runtime-slim-arm64
ghcr.io/openhands/agent-server:9a213ba-golang
ghcr.io/openhands/agent-server:9a213baa2bc1fcaf629c96272a1abdef7d6b433f-golang
ghcr.io/openhands/agent-server:ci-macos-test-suite-golang
ghcr.io/openhands/agent-server:9a213ba-golang_tag_1.21-bookworm
ghcr.io/openhands/agent-server:9a213ba-java
ghcr.io/openhands/agent-server:9a213baa2bc1fcaf629c96272a1abdef7d6b433f-java
ghcr.io/openhands/agent-server:ci-macos-test-suite-java
ghcr.io/openhands/agent-server:9a213ba-eclipse-temurin_tag_17-jdk
ghcr.io/openhands/agent-server:9a213ba-python-minimal
ghcr.io/openhands/agent-server:9a213baa2bc1fcaf629c96272a1abdef7d6b433f-python-minimal
ghcr.io/openhands/agent-server:ci-macos-test-suite-python-minimal
ghcr.io/openhands/agent-server:9a213ba-python-node-runtime-minimal
ghcr.io/openhands/agent-server:9a213ba-python-slim
ghcr.io/openhands/agent-server:9a213baa2bc1fcaf629c96272a1abdef7d6b433f-python-slim
ghcr.io/openhands/agent-server:ci-macos-test-suite-python-slim
ghcr.io/openhands/agent-server:9a213ba-python-node-runtime-slim
ghcr.io/openhands/agent-server:9a213ba-python
ghcr.io/openhands/agent-server:9a213baa2bc1fcaf629c96272a1abdef7d6b433f-python
ghcr.io/openhands/agent-server:ci-macos-test-suite-python
ghcr.io/openhands/agent-server:9a213ba-python-node-runtime

About Multi-Architecture Support

  • Each variant tag (e.g., 9a213ba-python) is a multi-arch manifest supporting both amd64 and arm64
  • Docker automatically pulls the correct architecture for your platform
  • Individual architecture tags (e.g., 9a213ba-python-amd64) are also available if needed

Co-authored-by: openhands <openhands@all-hands.dev>
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

REST API breakage checks (OpenAPI) — ✅ PASSED

Result: ✅ PASSED

Action log

@jpshackelford
jpshackelford marked this pull request as ready for review October 16, 2026 22:33

@all-hands-bot all-hands-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This review was posted by an AI agent (OpenHands).

Reviewed .github/workflows/tests-macos.yml at head 2fcb8af.

Scope: in-repo CI configuration, which this repository owns. The workflow mirrors the tests.yml suite list and pytest invocations (sdk with -n auto, tools with --forked, agent_server/workspace with -n auto, and cross with the same --basetemp / tmp_path options), and keeps the same trust model as tests.yml (pull_request, contents: read, no secrets). fail-fast: false is set, the matrix parses as 5 well-formed entries, and the if / concurrency expressions handle the workflow_dispatch case correctly (|| short-circuits, and github.ref is the fallback group key). No correctness, security, or compatibility defect found in the workflow itself.

Blocker — the current head fails a repository check. The head is red on Validate PR description (.github/workflows/pr-description-check.yml -> .github/scripts/check_pr_description.py, 7 failure annotations): the first visible line must be HUMAN:, a >=20-char human note must sit between HUMAN: and AGENT:, and the ## Why / ## Summary / ## How to Test template sections must be present. The current body starts with ## Why, carries ## Validation instead of ## How to Test, and links no issue. Every recently merged PR I sampled on its head (#6036, #6009, #5998, #5991, #5987) shows this check green, so this is an unresolved condition on this head rather than normal noise. It is not a required merge status check, but it is a repository gate and should be fixed before merge.

Context, not defects:

  • The test-macos label does not exist in the repository (confirmed via the labels API), so the label trigger cannot fire and only workflow_dispatch is usable until the label is created. The PR description already calls this out.
  • This head has not been exercised on a macos-latest runner, so real pass/fail of the matrix is unverified. That is the stated purpose of the PR and is acknowledged in the description; some suites may fail for pre-existing macOS reasons.

The workflow change itself is sound; the outstanding item is the failing PR-description gate.

🔄 CHANGES REQUESTED

@all-hands-bot all-hands-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This review was posted by an AI agent (OpenHands).

Reviewed .github/workflows/tests-macos.yml at head 9a213ba (this supersedes my earlier comment on 2fcb8af, which the two follow-up commits have replaced).

Scope: in-repo CI configuration, owned by this repository. The change adds an opt-in macOS mirror of the tests.yml suites and nothing else.

What I verified on this head:

  • The workflow parses as valid YAML; the matrix holds the five expected suites with the same pytest invocations as tests.yml (sdk -n auto, tools --forked, agent_server/workspace -n auto, cross with the same --basetemp/tmp_path options), fail-fast: false is set, and contents: read with no secrets matches the tests.yml trust model.
  • The refined job if: is correct. github.event_name == 'workflow_dispatch' short-circuits first, so the github.event.pull_request.labels.*.name dereference is never reached for manual runs; for synchronize/reopened the action != 'labeled' branch runs when the label is present; for labeled it requires the newly added label to be macos-test-run, which prevents unrelated label events from triggering the suite. The concurrency group falls back to github.ref on dispatch for the same reason.
  • The trigger label macos-test-run now exists in the repository (confirmed via the labels API), so the label path is usable.
  • The fetch-depth: 0 that every tests.yml job sets is absent here. I checked the covered suites for a real-repo history dependency and found none: git-touching tests build throwaway repos under tmp_path or monkeypatch run_git, and the one real-repo call (cas.git("rev-parse", "HEAD") in tests/cross/test_verify_agent_server_skill.py) succeeds in a depth-1 clone. Not a defect.
  • Current-head checks: the required set (build-binary-and-test (ubuntu-latest), pre-commit, Check OpenAPI Schema, sdk-tests, tools-tests, agent-server-tests, cross-tests) all pass, and the earlier Validate PR description failure is resolved — the validator now passes on the current body (HUMAN: note present, ## How to Test and ## Issue Number filled in). The macOS ${{ matrix.suite }} tests job reports skipped, which is the intended opt-in behavior since the label is not applied to this PR.
  • Linked issue #6043 carries ready-for-dev (plus enhancement, ci, priority:medium, testing) and is still open.
  • I ran the focused tests that exercise this area locally (tests/cross/test_check_pr_description.py, tests/tools/terminal/test_session_factory.py, tests/tools/terminal/test_terminal_tool_auto_detection.py): all pass.

No correctness, security, or compatibility defect found. The suites have not been exercised on a macOS runner for this head, which the PR states explicitly and which the opt-in label is designed to test.

✅ APPROVED

@neubig neubig left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@jpshackelford
jpshackelford merged commit e642683 into main Oct 17, 2026
52 checks passed
@jpshackelford
jpshackelford deleted the ci/macos-test-suite branch October 17, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants