Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
ci: make pytest behavior failures blocking
Ruben Lütke197e23d1d2df
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 8aa3c5bd36..f844b4a522 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -14,10 +14,8 @@# * import-cleanliness gate -> BLOCKING. Proves `import jarvis` is clean on# Linux/macOS (no module-scope pywin32/winreg/global_hotkeys) - the €5-VPS# contract. A regression here breaks Mac/Linux outright.-# * min-passed floor -> BLOCKING. Catches a mass-skip / broken--# collection regression that would otherwise sail through as green.-# * pytest failures -> reported (the floor script warns; pass-# --strict once the suite is fully green to make them blocking).+# * pytest + min-passed floor -> BLOCKING. Any behavioral failure,+# collection error, or mass-skip regression fails the relevant OS leg.## Cost policy (added 2026-06-23): macOS runners bill at ~10x the Linux rate, so# the macOS leg is OFF for ordinary push/PR runs and ON only for a manual@@ -145,11 +143,11 @@ jobs:python -m pytest tests/ -q -p no:cacheprovider \-m "not skip_ci and not slow and not openclaw_live and not voice_latency and not eval" \--continue-on-collection-errors \- --junitxml=report.xml || echo "pytest exited non-zero (pre-existing failures/collection-errors are reported by the floor gate)"+ --junitxml=report.xml- name: Minimum-passed floor (BLOCKING, Linux leg is authoritative)if: matrix.os == 'ubuntu-latest'- run: python scripts/ci/assert_min_passed.py report.xml+ run: python scripts/ci/assert_min_passed.py --strict report.xml# jarvisctl control-CLI unit suite across the three supported desktops.# jarvisctl is a thin cross-platform HTTP client (paths via platformdirs,diff --git a/scripts/ci/assert_min_passed.py b/scripts/ci/assert_min_passed.pyindex 29c814fcfc..9b8914ed87 100644--- a/scripts/ci/assert_min_passed.py+++ b/scripts/ci/assert_min_passed.py@@ -6,7 +6,7 @@ nothing actually ran. This gate parses the JUnit XML and asserts that the numberof PASSED tests is at least ``FLOOR``. A drop below the floor fails the buildeven when pytest's own exit code is green.-Usage: ``python scripts/ci/assert_min_passed.py report.xml``+Usage: ``python scripts/ci/assert_min_passed.py [--strict] report.xml``FLOOR is seeded conservatively from the current green count on the branch. Bumpit FORWARD as the suite grows — NEVER down (lowering it defeats the purpose).@@ -39,17 +39,17 @@ def _aggregate(path: Path) -> tuple[int, int, int, int]:def main(argv: list[str]) -> int:- if len(argv) != 2:- print("usage: assert_min_passed.py <junit-report.xml>")+ args = list(argv[1:])+ strict = "--strict" in args+ args = [arg for arg in args if arg != "--strict"]+ if len(args) != 1:+ print("usage: assert_min_passed.py [--strict] <junit-report.xml>")return 2- path = Path(argv[1])+ path = Path(args[0])if not path.exists():print(f"FAIL JUnit report not found: {path}")return 2- strict = "--strict" in argv- if strict:- argv = [a for a in argv if a != "--strict"]tests, failures, errors, skipped = _aggregate(path)passed = tests - failures - errors - skippedprint(diff --git a/tests/unit/ci/test_assert_min_passed.py b/tests/unit/ci/test_assert_min_passed.pynew file mode 100644index 0000000000..bf78b2b3ba--- /dev/null+++ b/tests/unit/ci/test_assert_min_passed.py@@ -0,0 +1,31 @@+"""Fail-closed tests for the JUnit minimum-passed gate."""++from __future__ import annotations++from pathlib import Path++from scripts.ci import assert_min_passed+++def _write_report(path: Path, *, tests: int, failures: int = 0, errors: int = 0) -> None:+ path.write_text(+ f'<testsuites><testsuite tests="{tests}" failures="{failures}" '+ f'errors="{errors}" skipped="0" /></testsuites>',+ encoding="utf-8",+ )+++def test_strict_flag_accepts_report_after_option(tmp_path: Path, monkeypatch) -> None:+ report = tmp_path / "report.xml"+ _write_report(report, tests=2)+ monkeypatch.setattr(assert_min_passed, "FLOOR", 1)++ assert assert_min_passed.main(["gate", "--strict", str(report)]) == 0+++def test_strict_flag_blocks_behavioral_failure(tmp_path: Path, monkeypatch) -> None:+ report = tmp_path / "report.xml"+ _write_report(report, tests=2, failures=1)+ monkeypatch.setattr(assert_min_passed, "FLOOR", 1)++ assert assert_min_passed.main(["gate", "--strict", str(report)]) == 1