Skip to content
Merged
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
12 changes: 9 additions & 3 deletions tests/test_recalibration_gate_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,21 @@ def test_recalibration_gate_example_runs_and_fails_closed():
)
assert r.returncode == 0, f"make lab-result-intake-example failed: {r.stderr[:200]}"

repo = Path(__file__).parents[1]
r = subprocess.run(
["make", "recalibration-gate-example"],
[sys.executable, "-m", "openamp_foundry.cli", "recalibration-gate",
"--intake-report", "outputs/calibration_intake_example.json",
"--intake-report-date", "2026-07-04",
"--out-json", "outputs/recalibration_gate_example.json",
"--out-md", "outputs/recalibration_gate_example.md"],
capture_output=True, text=True,
cwd=Path(__file__).parents[1],
cwd=repo,
env={**__import__("os").environ, "PYTHONPATH": "src"},
)
# Gate correctly fails-closed (exit 3) because cohort size 4 < minimum 5
assert r.returncode == 3, (
f"Expected exit 3 (fail-closed), got {r.returncode}. "
f"Gate should reject cohort < 5 candidates."
f"Gate should reject cohort < 5 candidates.\nstdout: {r.stdout[:300]}\nstderr: {r.stderr[:300]}"
)


Expand Down
Loading