Repository navigation
tri loop plan: the overnight tick anomaly, idempotence and requests-out decisions as .t27 - #11076
Merged
Merged
Conversation
…-out decisions as .t27 (Closes #11059) A tick of the overnight loop was prose in a skill, so a new cron cycle could repeat or undo the last one. specs/tri/loop/tick.t27 now holds those rules as pure functions over a line-oriented snapshot (now, last, row, want, pr, merged, agent, cron, req), with 25 tests: - a lane the ledger lists (any state) is never started again; a `want` with no row is START, once; - a row that says running for 45 whole minutes or more is RECHECK (the number is lanes.t27's STALE_MINUTES, imported; a test holds the two equal); - a red pull request is FIX, a conflicting (DIRTY) or behind one is UPDATE_BRANCH; no action is a force-push; - a subagent done with no pr or merged record for its branch is FIND_PR; - a later cron with the same prompt is DELETE_DUPLICATE; - a request is NONE before due, CHASE once when open and due, TAKE_DEFAULT when chased and due, never CHASE when chased; - an unreadable record, a time that does not parse, a second now, last or request id is UNREADABLE, never silence; - the tick ends with HASH n over the records and their plan (not now, not last); a snapshot whose `last` equals it is NOOP, and a lane crossing 45 minutes changes the plan, so time passing is a change. `tri loop plan [FILE]` reads the snapshot from FILE or stdin and prints one `ACTION key reason` line per action. It runs no command and contacts no network or machine. The glue sits in cli/tri/src/loopclaim.rs (23 added hand lines, through t27c gen-rust in gen/rust/tri/loop/tick.rs); the tool card of `tri loop` lists the new action. The 23 lines are paid for by deleting 40: the unused `delete_railway_service` in bootstrap/src/railway.rs (git grep -w finds no other mention). Searched first: tri night, tri lanes (its time readers and STALE_MINUTES are reused), tri worktrees --reap-plan, specs/claw/refresh.t27, specs/queen/review_valve.t27, specs/queen/waits.t27, specs/tri/reseal; none decides a tick's actions from a ledger. Closes #11059 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
gHashTag
enabled auto-merge (squash)
October 19, 2026 14:34
Contributor
This was referenced Oct 19, 2026
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.
Closes #11059
tri loop plan: the overnight tick anomaly, idempotence and requests-out decisions as .t27
Gates run on the merged tree (t27c from master): 2 spec(s) with tests clean and vacuous passes 0, seal --verify MATCH, tri types ratchet CLEAN, dupe_scan failure set a subset of master's (inherited red).
TEST specs/tri/loop/tick.t27 tests=[25] fail=[0] vacuous=[0]
TEST specs/tools/tri/loop.t27 tests=[4] fail=[0] vacuous=[0]
SEAL specs/tri/loop/tick.t27 :: all hashes MATCH
SEAL specs/tools/tri/loop.t27 :: all hashes MATCH
TYPES RATCHET: CLEAN
DUPE failing=15 extra-vs-master=[]
🤖 Generated with Claude Code