Skip to content

feat(batch): M3.3 slice 1 — readiness pass files gates as inbox rulings - #674

Merged
Jammy2211 merged 3 commits into
mainfrom
feature/shift-readiness-pass
Nov 18, 2026
Merged

Jammy2211 merged 3 commits into
mainfrom
feature/shift-readiness-pass

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

M3.3 slice 1 of PyAutoBrain#671. Merge PyAutoLabs/PyAutoMind#585 first, which adds the ruling inbox kind.

/prm note: the commit message says Closes #671, so merging closes the issue. Slice 2 (the decisions sheet) still lives in active/shift_readiness_pass_and_decisions_sheet.md, so keep that prompt active and do not complete it. Slice 2 can reopen #671 or take its own issue.

Summary

pyauto-brain batch ready walks queue.md, resolves each entry to its next startable unit and files each gate it finds as a ruling in the questions inbox. It runs at the end of every shift, so the next launch is brief --new, read, go.

  • Resolution:
    • An epic ledger (Status: campaign map, Epic:, no Phase:) resolves to every open member at its lowest phase, across draft/ and active/. It is checked against Mind origin/main locally, with no fetch; if the working tree is behind, the entry gets a note and no ruling.
    • A plain prompt resolves to itself.
    • Units in flight or moved are reported, not gated.
    • A queued member that is not its epic's next phase gets a note.
  • Gates (Q5: one ruling per gate):
    • looks-shipped and obsolete (the premise check, offline) come first and stop the rest.
    • Then claimed (Mind's local origin claims), unattended, human-required, blocked-by and no-lane.
    • An epic with no open phase prompt gets no-next-phase (D3).
    • A judge unit gets a note, not a ruling (D4).
    • A ruling already Open or Deferred on origin for the same task and gate is not filed again.
  • Writes (D1): a dry run by default.
    • --queue <slot> needs an existing slot, takes the watcher's tick lock and refuses once the digest is posted.
    • --apply writes through Mind's own questions_edit into a checkout that is not on main, and never commits.
    • --fetch is opt-in (D2).
  • Shift end: finish_shift runs the pass offline before the digest and queues the ops in the shift's own ledger. The digest ends "The next shift needs N rulings from you.", where N is new rulings plus Open and Deferred ones, de-duplicated. A failure in the pass is named in the digest and never breaks it.
  • Version guard: rulings are filed only once Mind origin/main lists the ruling kind. Otherwise the digest says they were not filed, so critical ops are never retried against an old Mind.
  • Inbox separation: hold_for, answered_since, inbox_line and the dashboard keep rulings apart from parked questions. A ruling never holds or releases a parked task.
  • Docs: one line each in skills/questions, skills/batch and AUTONOMY.md, plus a paragraph in the batch AGENTS.md.

Witness

python -m pytest tests/test_batch_ready.py -q: 26 tests. The Witness case is a fixture queue.md with one epic whose next phase has no prompt and one task on a claimed repo. It queues exactly two question-add ops (no-next-phase and claimed), and the replayed batch digest --record ends "The next shift needs 2 rulings from you."

  • Before implementation, all 17 tests then written were red on main (invalid choice: 'ready' / No module named '_ready').
  • The test that runs Mind's real questions_edit.py skips in CI until PyAutoMind#585 merges, because CI reads Mind main.

Evidence

  • Full suite: 2361 passed, 1 skipped (the opt-in live spawn test).
  • Skill line counts: OK. Tenant firewall (organ code): OK. --check-agents-surface: OK.
  • Read-only dry run on the real queue: 7 rulings found across the three queued epics, held back by the version guard:
    • likelihood-lifecycle phase 4: unattended ×2 and claimed;
    • hpc-campaign: no-next-phase;
    • results-library phase 5: claimed, unattended and human-required.
  • Independent Fable 5.2 review: round 1 FINDINGS (M1–M4, L2–L4, L6), all fixed; round 2 CLEAN.
  • Follow-ups left as not filed:
    • a campaign map with no Epic: in its header is graded as a prompt;
    • a draft that exists only in the working tree gets "rerun after a pull" advice.

🤖 Generated with Claude Code

Jammy2211 and others added 3 commits November 18, 2026 08:55
…ulings

pyauto-brain batch ready walks queue.md: an epic ledger (Status: campaign
map, Epic:, no Phase:) resolves to its lowest open Phase: members across
draft/ and active/, checked against Mind origin/main locally; a plain prompt
resolves to itself; in-flight units are reported. Gates (looks-shipped and
obsolete first, then claimed, unattended, human-required, blocked-by,
no-lane, and no-next-phase for an epic) become one kind: ruling question-add
op each, deduped by task and gate against origin. A judge unit gets a note.
Dry run by default; --queue <slot> (existing slot, tick lock, refused after
the digest); --apply writes via Mind's questions_edit into a non-main
checkout; --fetch opt-in. finish_shift runs it offline before the digest,
which ends 'The next shift needs N rulings from you.' Rulings are filed
only when Mind origin/main knows the kind. hold_for, answered_since,
inbox_line and the dashboard keep rulings apart from parked questions.

Fable 5.2 review: round 1 FINDINGS (M1 stale tree, M2 ledger detection,
M3 member not next, M4 --queue lock, L3, L4, L6), fixed; round 2 CLEAN.

Closes #671 (slice 1; slice 2 follows the M3.2 shift)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… L1 ruling)

The readiness pass skips a task and gate already ruled on Mind origin/main
in any state, not only Open or Deferred; /questions reopen asks again. The
digest's N still counts Open and Deferred rulings only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit 3c5e1a1 into main Nov 18, 2026
2 checks passed
@Jammy2211
Jammy2211 deleted the feature/shift-readiness-pass branch November 18, 2026 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant