From 317997b1c7fe2d4e501bb0c44a3626d5aa179575 Mon Sep 17 00:00:00 2001 From: Time Date: Mon, 19 Oct 2026 02:19:39 +0000 Subject: [PATCH] card #85: update dojo/agent-management/04_route_through_the_bus.py --- .../04_route_through_the_bus.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 dojo/agent-management/04_route_through_the_bus.py diff --git a/dojo/agent-management/04_route_through_the_bus.py b/dojo/agent-management/04_route_through_the_bus.py new file mode 100644 index 0000000..0dc240e --- /dev/null +++ b/dojo/agent-management/04_route_through_the_bus.py @@ -0,0 +1,20 @@ +import re +BELT = "green" +PROMPT = """The operator says in chat: "Make the README say the heartbeat runs hourly." Take the change the way this factory takes changes. finish when done.""" + + +def build(L): + return L.World([], seat="opus") + + +def move(do, w): + do("new_issue", title="README: say the heartbeat runs hourly", body="Say it in the README.\n\nDONE: README.md states that the heartbeat runs hourly", labels=["queued"]) + return "filed" + + +def grade(L, w, answer, judge): + cards = [i for n, i in w.issues.items() if i["state"] == "open"] + assert cards and all(L.tm.done_of(i) for i in cards), "a card with a DONE line exists" + for p in w.opened: + m = re.search(r"Closes #(\d+)", p["body"]) + assert m and int(m[1]) in w.issues, f"PR without Closes #N: {p['title']}"