Skip to content

feat: autonomous orchestrators p4b — unattended glance close-out + stage-2 rows #572

Closed

Description

@Jammy2211

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 glance worker 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 tier glance; 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 the Witness: itself, adversarially reviews the diff, checks the decision-taken label and Heart not RED, then the /prm close-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-append op (row under a named heading); lifecycle.py shadow-row --stage2 for 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 reverted or amended merged-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-glance PR whose CI landed green and whose guards all hold gets exactly one close-out session dispatched and exactly one row in autonomy_log.md "Unattended glance sub-window (stage 2)"; each guard failing on its own (witness not run by an independent session, Heart RED, merge-cap reached, tier not glance, decision-taken label, no different-model adversary leg during the first 10) dispatches nothing and the digest names the reason; the glance-auto-merges counter moves only on a real merge; pytest PyAutoBrain/tests -q and 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 "Unattended glance merges" plus the stage-2 rule. If all hold, it starts one close-out session running the /prm procedure. 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-row gains 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 (and pushes if a push is sent) increment in counters.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

  1. Jammy2211 commented on Nov 4, 2026

    @Jammy2211
    ContributorAuthor

    Library PRs created — PyAutoLabs/PyAutoMind#533 (merge first) + #573. Judge tier, human /prm.

  2. Jammy2211 commented on Nov 4, 2026

    @Jammy2211
    ContributorAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions