Repository navigation
watch: the cursor moves when the round is known to have landed - #10
Merged
Merged
Conversation
The scanner wrote its new cursors before the model ran, so a round whose run failed was never looked at again and nothing said so; a second deployment running a copy of this scanner lost two rounds that way on 2026-10-12. A round that fires now stages its cursors (and Jira's state, on a staged copy) and the next tick settles them first, before the window check, against the node's own run record for the event the pipe numbered — the timer writes the pipe's answer to round.json after each POST. completed commits; failed, a POST that failed, an answer other than routed, or no finished record within WATCH_RUN_TIMEOUT puts the cursors back and the next scan re-offers from them with a line saying so; a run still going holds the tick rather than offering the same messages twice. After two replays and an hour since the first failure only the first lost round's content is skipped and the skipped span is named in the digest until a round lands. Jira is never skipped: its lookback re-reports the span, and a repeat is a nuisance where a miss is a failure. feeds in scan.json now always means committed; offered and previous keep their meaning for the signer and the poster. Twelve tests; the work compose names WATCH_ROUND_FILE and WATCH_NODE_RESULTS; decision note beside it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The watch scanner wrote its new cursors before the model ran. A round whose run failed — a model error, a dead gateway, a refused delivery, a timer restart between scan and POST — was never looked at again, and nothing said so: the next tick scanned from the new cursor as if the round had been judged. A second deployment running a copy of this scanner measured it on 2026-10-12 (two rounds lost to one configuration fault) and fixed it by staging the cursor and reconciling against the job's run record. This is that shape, built from the pieces this family already has.
How it works (
deploy/watch/watch_scan.py,hookprobe/examples/patrols/patrol-timer.sh, the work compose)stagedinscan.jsonand runs Jira against a staged copy of its state;feedskeeps the committed cursors.round.json(posted, event id, outcome, fired-at).probe:watch-due:<event id>under the timer's read-only/node-state/resultsmount.completedcommits the cursors and the Jira copy.failed, a POST that failed, an answer other thanrouted, or no finished record withinWATCH_RUN_TIMEOUT(30 min) puts the cursors back; the next scan re-offers from them and says so in the digest. A run still going holds the tick instead of offering the same messages twice.offeredandpreviouskeep their meaning for the signer and the poster; a quiet round (no model asked) commits directly as before.Tests — twelve in
deploy/watch/tests/test_scan.py: commit oncompleted, replay onfailed/ not posted / posted before the scan / not routed / no event id, hold while a run is young or stillrunning, lost past the timeout, give up after two replays and an hour (and not before), a stray Jira copy dropped, the skipped note cleared by a delivered round, the record found by its key, and Jira running against the staged copy with the committed state untouched.Docs — a paragraph in
docs/deployments.mdunder the work shape; decision note.agents/notes/implemented/2026-10-19-the-cursor-moves-when-the-round-is-known-to-have-landed.md.Nothing is running; the work stack picks this up at its next recreate (the timer's two new variables are in the compose). Gate: STACK GATE GREEN locally; CI read back below before merging.