The new loop's core: intake, restatement, go-ahead, threads (M2.1, PR B)
CI / checks (push) Skipped
CI / checks (pull_request) Successful in 1m44s
CI / checks (push) Skipped
CI / checks (pull_request) Successful in 1m44s
nisse_dev.loop runs alongside control.py, chosen with `loop: new`. Issues assigned to the agent (by an operator, or filed by one) become work items, each with a Matrix thread. A driver run is one model with tools until it calls a waiting tool: restate puts rev-N up for a go-ahead, bound to the revision on screen when the reply arrived; ask_human waits for an answer; close_item closes the item and its issue. Before the go-ahead the driver can look but not change or close anything. One item is active at a time; replies in an item's thread go to it. On boot, an item cut off mid-run waits on the operator, and waiting points are put up again. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PPQ14L3LikyefCMFBqEbKE
This commit is contained in:
1 parent
6dff36f458
commit
f84bb70839
14 files changed
+1205
-1
No files matched your search
@@ -374,3 +374,31 @@ def test_tuning_reaches_every_component(
|
||||
# tool_choice is asked of exactly the models LiteLLM declares enforce it.
|
||||
assert executor._client._enforces_tool_choice("claude-opus-5") is False
|
||||
agent.stop()
|
||||
|
||||
|
||||
def test_the_new_loop_assembles(tmp_path: Path, origin: Path, monkeypatch) -> None:
|
||||
"""`loop: new` builds the LoopAgent over the same services."""
|
||||
from nisse_dev.loop.build import build_loop_agent
|
||||
|
||||
config = config_for(tmp_path, loop="new")
|
||||
monkeypatch.setattr(
|
||||
"nisse_dev.loop.build.GiteaClient.whoami", lambda self: "nisse-dev-testing"
|
||||
)
|
||||
monkeypatch.setattr(
|
||||
"nisse_dev.loop.build.GiteaClient.clone_url", lambda self, repo: str(origin)
|
||||
)
|
||||
monkeypatch.setattr(
|
||||
"nisse_dev.agent.ModelCatalog.discover",
|
||||
classmethod(lambda cls, *a, **kw: TEST_CATALOG),
|
||||
)
|
||||
monkeypatch.setattr(
|
||||
"nisse_dev.loop.build.MatrixTransport", lambda cfg: FakeTransport()
|
||||
)
|
||||
running = build_loop_agent(config)
|
||||
try:
|
||||
assert running.account == "nisse-dev-testing"
|
||||
assert running.loop._repo == config.gitea_repo
|
||||
assert (config.workspace / "README.md").exists() # cloned on the build host
|
||||
finally:
|
||||
running.worker.call(running.store.close)
|
||||
running.worker.stop(timeout=5)
|
||||
Reference in new issue
Block a user