Tuning: the CI waits may be zero
CI / checks (push) Skipped
CI / e2e (pull_request) Canceled after 0s
CI / checks (pull_request) Canceled after 1m18s

The live review test sets ci_grace_s: 0, which the shared tuning parser
refused (every number had to be positive). A field now opts in to zero
with metadata {"zero": True}; ci_wait_s and ci_grace_s do.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J5Utyfzw7gF7UhjRDEtjTk
This commit is contained in:
dongarandClaude Opus 5.5 committed 2026-10-17 04:33:52 +00:00
1 parent 096eeea56b
commit 59fba3bb76
5 files changed
+42 -9

No files matched your search

+15
View File
@@ -431,6 +431,21 @@ def test_a_repository_pattern_must_be_owner_slash_name(tmp_path: Path) -> None:
ReviewConfig.from_tree({**tree, "repositories": [bad]}, {})
def test_the_ci_waits_may_be_zero(tmp_path: Path) -> None:
# The live test's repository has no CI: it reviews with no grace at all.
from nisse_review.config import ReviewConfig
tree = {
"state_db": str(tmp_path / "s.db"),
"llm": {"base_url": "http://llm", "token": "k"},
"roles": {"reviewer": "local", "expert": "frontier"},
"gitea": {"url": "https://g", "token": "t", "operators": ["don"]},
"tuning": {"review": {"ci_wait_s": 0, "ci_grace_s": 0}},
}
review = ReviewConfig.from_tree(tree, {}).tuning.review
assert (review.ci_wait_s, review.ci_grace_s) == (0, 0)
def test_diff_lines_are_the_heads_lines_a_diff_shows() -> None:
diff = (
"--- a/x.py\n+++ b/x.py\n@@ -1,3 +1,4 @@\n a\n-b\n+c\n+d\n e\n"