Repository navigation
fix: in-shift merges take a merge-cap slot; R3 in AUTONOMY (M3.6e) - #665
Merged
Merged
Conversation
Shift 2026-11-16-pm read "2 merged of merge-cap 1": workers merged notify PRs in-turn without consulting the cap, and the watcher refused notify as "only glance merges unattended". Ruling R3 (2026-11-17): - _merge_slots.py: one file-locked merge-slot count per shift; the watcher publishes cap and pause each tick, fails closed. - pyauto-brain merge-slot take|release|status (bin/merge_slot.py): a worker's separate bare call before a bare gh pr merge. - watcher: notify PRs are closed out on glance terms; judge/undeclared go to /prm; close-outs take a slot just before spawn and release it on refusal; notify close-outs add no stage-2 row; /cap merges counts slots. - digest: an in-turn merge reads "merged in-turn by the worker (merge slot)". - sizing.merge_mode + pyauto-brain merge-mode: the one-line effective level and merge mode start_dev step 3 prints. - skills, worker and close-out templates, AUTONOMY.md R3 H3 + pointers. Refs #661. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs PyAutoBrain#661 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t evidence Review findings on #661: - merge-slot take accepts only a https://github.com/<owner>/<repo>/pull/<n> URL (normalised; anything else exits 2) and requires --task in a shift; a held slot answers yes only to the same task (the worker, or the close-out of the task the watcher took it for). PR #12 of two repos no longer shares a slot. - digest labels an in-turn merge from the slot file: merge slot, or "merged in-turn with NO merge slot" (needs you, R3 revert evidence); /cap merges counts slots plus unslotted in-turn merges. - close-out refuses a notify task that declares no Witness:. - worker template and /prm pass <pr-url> --task; AUTONOMY R3 code span reads <pr-url>. Refs #661. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every worker and close-out session holds as one class, so release now takes the task and frees a slot only when the holder's task matches; the CLI refuses another task's slot (exit 1, naming the holder) and a release with no task cannot tell (exit 2), as for take. Refs #661 (re-review). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
start_dev (SKILL.md + start_dev.md) was 205 lines, over the 200-line skill budget CI checks. Step 3 keeps the instruction to run pyauto-brain merge-mode; the tier table and R3 note move to reference.md "Tier + merge mode line". Now 194 lines. Refs #661. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
M3.6e of the autonomous-orchestrators epic (PyAutoBrain#661). In shift 2026-11-16-pm (
merge-cap: 1) two workers mergednotifyPRs in-turn while a third, on the samebug · safe · notifyheader, left its PR for /prm, and the snapshot read "2 merged of merge-cap 1". Human ruling R3 (2026-11-17) settles it; this builds it.pyauto-brain merge-slot take|release|status <pr-url> --task <task>(file-locked, atomic, fails closed; canonical PR URL only; a slot answers only to its own task). A worker takes a slot as its own bare call before a baregh pr merge, frees it if the merge fails, and leaves the PR for /prm when refused or paused. Watcher close-outs take from the same count.notifygoes: it closes out anotifyPR a worker left open onglanceterms (free slot, witness run by the close-out session, refused with noWitness:).judge, undeclared anddecision-takenstill go to /prm.notifyclose-outs add no glance Shadow-window/stage-2 row./cap).pyauto-brain merge-mode <prompt> [--auto] [--in-shift]printseffective level: <level>; merge mode: <mode>;start_devstep 3 uses it.<pr>→<pr-url>), with pointers from "Levels × checkpoints" and Decide-and-flag.API Changes
New CLIs
pyauto-brain merge-slotandpyauto-brain merge-mode; new moduleagents/conductors/batch/_merge_slots.py;_sizing.merge_mode(). Watcher close-outs now admitnotify.See full details below.
Test Plan
tests/test_closeout_merge_slots.py(merge-cap 1 refuses a second in-turn notify merge — fake gh logs one merge; atomic across processes; worker and watcher share slots; cross-repo PR numbers never share; take/release must match the task) andtests/test_orchestrator_merge_slots.py(auto·safe·notify bug with witness merges and counts "1 merged of merge-cap 1"; merge-mode line; slotless merge flagged; notify close-out refuses without Witness)grep -n "2026-11-17" AUTONOMY.md→ R3 H3 + two pointerstest_grouped_organ_consumersis environmental (fails on origin/main under activate.sh)_orchestrator.py(keep bothimport _loginandimport _merge_slots)Full API Changes (for automation & release notes)
Added
pyauto-brain merge-slot take|release|status <pr-url> [--task T] [--why W]— exit 0 taken/not in a shift, 1 refused, 2 cannot tell / bad inputpyauto-brain merge-mode <prompt> [--auto] [--in-shift]_merge_slots.publish/take/release/used/why_unmerged;_sizing.merge_mode(p, level, *, auto, in_shift)Changed Behaviour
_start_closeouts:notifyadmitted on R3 terms; cap enforced bytakebefore spawn_cmd_capmerges: slots taken plus slotless in-shift mergesMind half: the PyAutoMind PR on the same branch (
lifecycle.py closerow matching). Refs PyAutoBrain#661. Merge after M3.6a (rebase for the import line).Heart RED override (development only)
pyauto-heart readiness --dev --repos PyAutoBrain,PyAutoMind):PyAutoMind: Tenant Firewall Gate failure on main— pre-existing generated-hook drift from PyAutoMind#575 (run 43881901227, 2026-11-16); this branch does not touch those hooks and does not claim to fix Heart./prmwith every required check green. No release.🤖 Generated with Claude Code