Skip to content

ci(macos): add macos_bug marker and skip known-crashing worker tests#1786

Merged
ruthwikdasyam merged 8 commits intodevfrom
ruthwik/macos-tests
Apr 14, 2026
Merged

ci(macos): add macos_bug marker and skip known-crashing worker tests#1786
ruthwikdasyam merged 8 commits intodevfrom
ruthwik/macos-tests

Conversation

@ruthwikdasyam
Copy link
Copy Markdown
Contributor

@ruthwikdasyam ruthwikdasyam commented Apr 13, 2026

Problem

macOS CI fails on nearly every PR because dimos/core/coordination/test_worker.py hits a native segfault (exit 139) partway through execution - the crash surfaces during test_load_balancing_distributes_modules but is cumulative state from prior tests in the same file.
Since the process dies, pytest reports no FAILED tests, just a red job, which trains the team to ignore macOS CI entirely

Closes #1752

Solution

  • Introduces a macos_bug pytest marker convention for tests known to fail or crash on the macOS runner
  • Updates the macOS workflow's pytest filter to exclude macos_bug alongside the existing tool and mujoco exclusions.

Linux CI is unaffected.

None

How to Test

  • macOS check should now get past test_worker.py instead of segfaulting
  • Linux CI (ci.yml) should continue to run the full suite including test_worker.py, since the marker is only excluded in macos.yml
  • To verify locally on macOS
    python -m pytest --durations=10 -m 'not (tool or mujoco or macos_bug)' --timeout=120 dimos/
    

Contributor License Agreement

  • I have read and approved the CLA.

@ruthwikdasyam ruthwikdasyam marked this pull request as ready for review April 13, 2026 20:27
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 13, 2026

Greptile Summary

This PR introduces a macos_bug pytest marker to skip all tests in dimos/core/coordination/test_worker.py on the macOS CI runner, which was previously crashing with a native segfault (exit 139) and causing the entire macOS job to silently fail. The macOS workflow filter is updated to not (tool or mujoco or macos_bug) while Linux CI remains unaffected and continues running the full worker test suite.

Confidence Score: 5/5

Safe to merge — the fix correctly isolates the macOS segfault with no impact on Linux CI or local runs.

The only finding is a P2 style inconsistency (unregistered marker), which is suppressed in practice by -p no:warnings. The CI logic, marker placement, and workflow scoping are all correct.

dimos/conftest.py should have the macos_bug marker registered in pytest_configure for consistency with the other markers.

Important Files Changed

Filename Overview
.github/workflows/macos.yml Adds macos_bug to the pytest marker exclusion filter on macOS CI; the change is correct and scoped to the macOS workflow only.
dimos/core/coordination/test_worker.py All 8 worker tests tagged with @pytest.mark.macos_bug to exclude them from the macOS runner; the marker itself is not yet registered in dimos/conftest.py.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[pytest run] --> B{Which CI?}
    B -->|macOS CI macos.yml| C["-m 'not (tool or mujoco or macos_bug)'"]
    B -->|Linux CI ci.yml| D["-m 'not (tool or mujoco)'"]
    B -->|Local dev pyproject.toml addopts| E["-m 'not (tool or slow or mujoco)'"]
    C --> F[test_worker.py skipped via macos_bug marker]
    D --> G[test_worker.py runs - segfault no longer hits macOS]
    E --> H[test_worker.py skipped via slow marker]
Loading

Comments Outside Diff (1)

  1. dimos/conftest.py, line 38-44 (link)

    P2 macos_bug marker not registered

    The macos_bug marker is used across all 8 tests in test_worker.py but never added to pytest_configure. Every other project-defined marker (tool, slow, mujoco, etc.) is registered here; omitting macos_bug is inconsistent and will produce PytestUnknownMarkWarning whenever -p no:warnings isn't active (e.g. running pytest directly, editor integrations, or stricter CI configurations).

Reviews (1): Last reviewed commit: "add macos_bug marker name" | Re-trigger Greptile

@ruthwikdasyam ruthwikdasyam enabled auto-merge (squash) April 14, 2026 00:03
@ruthwikdasyam ruthwikdasyam merged commit 0611ab4 into dev Apr 14, 2026
4 checks passed
@ruthwikdasyam ruthwikdasyam deleted the ruthwik/macos-tests branch April 14, 2026 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants