test(agent_ready_gate): clear GITHUB_ACTIONS in the real-checker test
Some checks failed
dependency freshness / dependencies on newest stable (push) Waiting to run
earned_time pre-commit / pre-commit (push) Waiting to run
earned_time tests / test (push) Waiting to run
file length / file-length (push) Waiting to run
md-naming / markdown naming convention (push) Waiting to run
palette drift / palette (push) Waiting to run
repo-contract / repo contract (push) Waiting to run
shared gate tests / gate unit tests (push) Waiting to run
crdt-sync pre-commit / pre-commit (push) Has been cancelled
crdt-sync tests / test (push) Has been cancelled
freedays pre-commit / pre-commit (push) Has been cancelled
freedays tests / test (push) Has been cancelled
gatelock pre-commit / pre-commit (push) Has been cancelled
gatelock tests / test (push) Has been cancelled
music_theory tests / test (push) Has been cancelled
sickdays pre-commit / pre-commit (push) Has been cancelled
sickdays tests / test (push) Has been cancelled
ts_config tests / test (push) Has been cancelled
ts_core tests / test (push) Has been cancelled
web_ui tests / test (push) Has been cancelled

In CI the gate defers to the workflow and returns 0, so the real-checker
test saw 0 instead of 1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NBScELfMUiieK9ManFbS3Y
This commit is contained in:
Krzysztof Rudnicki 2026-10-22 21:51:50 +02:00
parent ea3f78b711
commit e74aa7b0ea

View File

@ -168,7 +168,11 @@ def test_pre_commit_in_ci_defers_to_the_workflow(
@pytest.mark.skipif(not gate.CHECKER.exists(), reason="agent_ready not checked out")
def test_real_checker_fails_a_bare_build(tmp_path: Path) -> None:
def test_real_checker_fails_a_bare_build(
tmp_path: Path, monkeypatch: pytest.MonkeyPatch
) -> None:
# In CI the gate defers to the workflow (returns 0); force the local path.
monkeypatch.delenv("GITHUB_ACTIONS", raising=False)
root = site(tmp_path, '[agent_ready]\ndist = "dist"\n')
write(root, "dist/index.html", "<!doctype html><title>x</title><p>hi</p>")
assert gate.main(["--repo", str(root)]) == 1