sections.md: checkpoint markers go in bot_runner.py

Ticket 02 moved line handling from bridge.py's _on_line to bot_runner.events_for,
so the checkpoint snippet now adds cpstate events there and shows in the dry run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
VasanthandClaude Opus 5.5 committed 2026-10-16 15:07:59 +05:30
1 parent 3a11e55b58
commit 0f9ad96140
1 file changed
+8 -8
+8 -8
View File
@@ -26,17 +26,17 @@ Numbered boxes on the Run tab. Each one is pending, in progress, done or stuck.
- Event `cpstate {kind: "pending"|"active"|"done"|"stuck", cp}`. `cp` counts from 1.
`active` also marks the earlier boxes done and the later ones pending, so the bot can
send `active` for each checkpoint as it starts, and `stuck` when one fails.
- Desktop: add a marker table next to `STEP_MARKERS` in `bridge.py`, and send the event
from `_on_line`, using specific substrings the bot really prints:
- Desktop: add a marker table next to `STEP_MARKERS` in `bot_runner.py`, and add the event
in `events_for`, using specific substrings the bot really prints. The dry run then shows
the `cpstate` events too:
```python
CHECKPOINT_MARKERS = [("[cp 1]", "active", 1), ("[cp 1 failed]", "stuck", 1)] # (substring, kind, cp)
# (specific substring, kind, cp). First match wins.
CHECKPOINT_MARKERS = [("[cp 1]", "active", 1), ("[cp 1 failed]", "stuck", 1)]
# in _on_line, after the step markers:
for marker, kind, cp in CHECKPOINT_MARKERS:
if marker in low:
self.send_to_js("cpstate", {"kind": kind, "cp": cp})
break
# in events_for, right after the step marker:
if cp := _first(CHECKPOINT_MARKERS, line):
out.append(("cpstate", {"kind": cp[1], "cp": cp[2]}))
```
## Admin/roles screen (`admin`)