Runs that go in circles end (M7.8)
CI / checks (push) Skipped
CI / checks (pull_request) Failing after 1m50s
CI / e2e (pull_request) Skipped

Driver.run checks each turn with nisse_core.loop.circles and ends the run
as "circling" when the same calls get much the same back, one harness
correction is given again and again, or the model apologises, for
circle_repeats turns in a row (default 3). Near-identical calls (git add
a.py, b.py) and scattered apologies stay flags on the status page. A
fact in the transcript says why the run ended.

nisse-dev calls in a helper as for a stuck run, then asks the operator;
nisse-review counts a failed run and posts none of its drafts. Tuning:
tuning.driver / tuning.review circle_repeats (0 off) and circle_similar.

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-26 16:30:07 +00:00
1 parent 516a328618
commit 74bc68db1c
20 files changed
+506 -20

No files matched your search

+17
View File
@@ -182,6 +182,23 @@ def test_tuning_is_read() -> None:
assert (tuning.build_vm.retry_s, tuning.build_vm.settle_s) == (60.0, 180.0)
def test_circles_are_tuned_and_checked() -> None:
# L2, M7.8: when a driver run going in circles ends.
assert (
build().tuning.driver.circle_repeats,
build().tuning.driver.circle_similar,
) == (3, 0.9)
tuned = build(tuning={"driver": {"circle_repeats": 0, "circle_similar": 0.8}})
assert (tuned.tuning.driver.circle_repeats, tuned.tuning.driver.circle_similar) == (
0,
0.8,
)
with pytest.raises(ConfigError, match=r"circle_repeats: must be 0 \(off\) or 2"):
build(tuning={"driver": {"circle_repeats": 1}})
with pytest.raises(ConfigError, match="circle_similar: must be at most 1"):
build(tuning={"driver": {"circle_similar": 2}})
def test_a_partly_given_tuning_section_keeps_the_other_defaults() -> None:
tuning = build(tuning={"driver": {"max_turns": 40}}).tuning
assert tuning.driver.failure_limit == 2