Repository navigation
Description
Overview
M3.7b of the autonomous-orchestrators epic (phase 10, "M3.7 Shift speed"). Rulings S2, S5 and S6 (human, 2026-11-19): the shift close-out starts at PR-open, runs the witness and the diff read while CI runs, waits in-turn for CI and merges on a green ci-verdict; no pre-merge full affected smoke; the branch update and CI rerun happen only when changed files overlap an earlier merged PR of the shift on that library, or GitHub reports a conflict. Merge order is unchanged.
Prompt: PyAutoMind/active/shift_speed_closeout_at_pr_open.md
Plan
- The watcher starts a close-out at PR-open (CI RUNNING or HEALTHY) for an eligible
glance/notifyPR; FAILED/UNKNOWN refuse with no session; NO-CHECKS waits up to 10 min, then refuses. - A PR waiting behind an earlier open shift PR on its library still gets no session (merge order unchanged).
- Branch update only when the PR's files overlap an earlier shift PR merged ahead of it, the file list cannot be read, or GitHub says CONFLICTING (S6).
- The close-out template loses the full affected smoke (S2) and runs witness → diff → labels/Heart → merge order → in-turn CI wait (
ci-verdict --until, 30 min orreview-at:) →.dropped→ merge-slot take →/prm. - Human decision A: the close-out takes the merge slot just before merging; the watcher only checks the cap is not reached before spawning.
- Human decision B: one network-surface sentence for the earlier merged shift PRs' file lists and
mergeable, once per PR per shift. - AUTONOMY.md records S2, S5, S6 with revert conditions; batch AGENTS.md "The watcher" and the worker template follow.
- Tier + merge mode: effective level: supervised; merge mode: human /prm
Detailed implementation plan
Affected repo: PyAutoBrain (branch feature/shift-speed-closeout-at-pr-open).
agents/conductors/batch/_orchestrator.py_start_closeouts: RUNNING/HEALTHY start a close-out; FAILED/UNKNOWN refuse; NO-CHECKS waitsUPDATE_CHECKS_GRACE_Sfrom the PR's first record, then refuses. All other guards in their current order.- No watcher
_merge_slots.takefor a merge close-out (decision A); refuse without spawning when the published cap is already used up. Update sessions keep the watcher's take. The reaper releases a refused close-out's slot whoever took it for that task. - S6:
needkeeps only earlier merged-ahead PRs with overlapping files (or unreadable files), or all of them whenmergeableis CONFLICTING. File lists viagh pr view --json files, cached per PR per shift incounters["pr_files"];mergeableadded togh_pr_state. - Drop
smoke_command/CLOSEOUT_SMOKE_JOBS; pass a CI deadline (min(start + 30 min, review-at)) into the template;after_stepnames disjoint merged-ahead PRs that were not updated (S6).
bin/ci_verdict.py:--until <iso>polls every 30 s while PENDING, returns after at most 9 min per call.agents/conductors/batch/closeout_template.md: remove the smoke step; reorder; in-turn wait; head-moved refusal; the session's ownmerge-slot takejust before the merge.AUTONOMY.md: S2, S5, S6 in "Shift speed — 2026-11-19" with revert conditions; leg 2 bullet, the "Unattendedglancemerges" opening and M3.6j ruling (a) point to them; network-surface amendment sentence (decision B).agents/conductors/batch/AGENTS.md"The watcher" andworker_template.md: new timing and the overlap rule.
Tests first (fail on main): close-out starts with CI pending (glance and notify); prompt has no smoke and orders witness/diff before the CI wait; disjoint files → no update session; shared file or CONFLICTING → update and green CI on the new head; merge order unchanged with an earlier PR's close-out running; AUTONOMY.md records S2/S5/S6; ci_verdict --until.
Before push: full Brain suite, bin/check_skill_line_counts.sh 200 PyAutoBrain, tenant firewall check; independent review.
Risks: two disjoint green PRs can break main together (main CI and the shift-end sweep find it); a close-out started at PR-open that then sees red CI has spent its tokens (counted in the digest).
Original prompt
See PyAutoMind/active/shift_speed_closeout_at_pr_open.md (rulings S2, S5, S6; Witness items 1–7).
Activity
Jammy2211 commentedon Nov 19, 2026
Shipped
PR #689 merged to
main(1a120cb, 2026-11-19, human /prm). Rulings S2, S5, S6 and the human's decisions A and B: the shift close-out starts at PR-open, waits in-turn for CI (ci-verdict --until, 30 min or review-at minus 5 min) and merges only on GREEN, pinned to the witnessed head; no pre-merge full smoke; the branch update only on file overlap, an unreadable list or a conflict; the close-out takes its own merge slot just before merging.Takes effect for shifts once the canonical Brain checkout is pulled (the deploy), when no shift is live.