Repository navigation
Description
Overview
Phase 4b of the autonomous-orchestrators epic: the unattended glance close-out. Until it lands no shift may merge unattended — the 2026-11-04 ruling's stage-2 table exists but nothing writes it.
Plan
- Worker template: a
glanceworker under a brief ends at PR-open (no in-turn merge); the close-out session merges. - Watcher pre-guards (no new network): CI green via
gh pr checks; recorded tierglance; merges + in-flight close-outs <merge-cap:; not a shadow shift. One close-out session per PR, never two. - Close-out session (
closeout_template.md,claude --bg --model opus, a fresh session independent of the worker): runs theWitness:itself, adversarially reviews the diff, checks thedecision-takenlabel and Heart not RED, then the/prmclose-out; writes<task>.closeout(merged | refused, reason, gate cell, model). - Reap: merged →
glance_auto_merges+1, outcome merged, one stage-2 row via the one Mind writer; refused → reason in the digest, never retried. - Mind writer
table-appendop (row under a named heading);lifecycle.py shadow-row --stage2for the same row by hand. - Doctrine amendment (human 2026-11-04): the stage-2 adversary may be the same model (Opus 5.5) when it is a fresh independent session that runs the witness itself; re-opened if any stage-2 row is
revertedor amendedmerged-after-substantive-change. Dated edit in AUTONOMY.md + doctrine test. - Witness: fake PRs/sessions — green + guards → exactly one close-out, merged → one stage-2 row; each guard failing alone → nothing, reason digested; merge-cap N+1 refused; refused close-out not retried; pytest Brain + Mind green.
Tier: judge — merge mode: human /prm
Suggested branch: feature/autonomous-orchestrators-p4b
Original Prompt
Click to expand starting prompt
Autonomous orchestrators phase 4b: unattended glance close-out + stage-2 Shadow rows
Type: feature
Target: PyAutoBrain
Repos:
- PyAutoBrain
- PyAutoMind
Difficulty: medium
Autonomy: human-required
Priority: high
Status: formalised
Filed: 2026-11-04
Epic: autonomous-orchestrators
Phase: 4
Consequence: judge
Witness: with fake PRs and fake sessions, a declared-glancePR whose CI landed green and whose guards all hold gets exactly one close-out session dispatched and exactly one row inautonomy_log.md"Unattendedglancesub-window (stage 2)"; each guard failing on its own (witness not run by an independent session, Heart RED, merge-cap reached, tier notglance,decision-takenlabel, no different-model adversary leg during the first 10) dispatches nothing and the digest names the reason; theglance-auto-mergescounter moves only on a real merge;pytest PyAutoBrain/tests -qand PyAutoMind tests green
Review-minutes: 25
Unattended: never
Lane: local-dev
Parent: draft/feature/pyautobrain/autonomous_orchestrators_epic.md, phase 4; slice 4b of 4a–4c. Doctrine: PyAutoBrain/AUTONOMY.md "Unattended glance merges" (2026-11-03) and "The glance Shadow-window ruling — 2026-11-04" (record complete/2026/11/glance-tier-ruling.md).
Until this lands, no shift may merge unattended: the ruling's stage-2 sub-window table exists, but nothing writes to it.
- When CI lands on a PR a worker named in its
.done, using the one read the watcher is allowed (gh pr checks), the watcher checks every guard in "Unattendedglancemerges" plus the stage-2 rule. If all hold, it starts one close-out session running the/prmprocedure. That is a dispatch, under the brief's grant, not a merge by the watcher, so the watcher's network surface is unchanged. If any guard fails, nothing is dispatched and the digest names the reason. - Stage-2 rule: each of the first 10 unattended merges needs the different-model adversary leg actually run. Count the rows in the stage-2 table to know where the sub-window stands.
lifecycle.py shadow-rowgains an unattended mode that appends to the stage-2 table (columns: date, task, brief, gate with the adversary leg, human action) and never to the stage-1 table.- Counters:
glance_auto_merges(andpushesif a push is sent) increment incounters.json, so the digest's zeros from 3d start moving. - Revisit
merge-cap:counting: one merge past the cap retires the sub-rule (AUTONOMY revert condition).
Tier: judge — merge mode: human /prm.
Activity
Jammy2211 commentedon Nov 4, 2026
Library PRs created — PyAutoLabs/PyAutoMind#533 (merge first) + #573. Judge tier, human
/prm.Jammy2211 commentedon Nov 4, 2026
Shipped — PyAutoMind#533 + PyAutoBrain#573 merged 2026-11-04 ~11:46Z by the human in the GitHub UI after the API merge path returned GitHub errors (502 / "Something went wrong"). CI at head green on both.