Skip to content

feat(batch): batch status box on both dashboards + rolling science review (#341) - #342

Merged
Jammy2211 merged 2 commits into
mainfrom
feature/batch-status-box
Sep 3, 2026
Merged

Jammy2211 merged 2 commits into
mainfrom
feature/batch-status-box

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Summary

Closes #341 (batch phase 6, epic two-slot-batching).

Both dashboards now open with a batch status box: the open slot, every member on one line as in progress / awaiting review / ruled, and a Review this batch → button to the Pages packet once there is something to review. One stdlib-only module, agents/conductors/batch/_status.py, computes and renders it for both organs, so the Cortex's bare Pages job (no pip install) and the Mind's dashboard stay byte-consistent, and nothing in the box is time-derived (the --check runs stay deterministic).

  • Mind (dev) — behaviour unchanged. Dispatched at once, reviewed at once; the button appears when collected: is stamped; the slot closes on review.
  • Cortex (science) — rolling. The button appears as soon as one member is awaiting-ruling; submitted/running members show as in progress with the record's own wall/budget/last-refresh note and hold no review control. A slot stays open across partial reviews: later sittings land as batches/reviews/<slot>-r<N>.md, batch collect --kind cortex merges them (ruled sticky), keeps refreshing the packet while anything is on the board, never re-splices a ruled member, and closes the slot only when nothing is left in a board state (members named on a - carried: line excluded). The dev refusal on an existing review file stays.

What changed

  • agents/conductors/batch/_status.py (new): vocabulary, lossless read_record, dev_status/cortex_status, pick_slot by latest dispatched: (never lexical — -night sorts before -pm), render_html/render_md, fixture "No batch in flight."
  • agents/conductors/batch/_batch.py: imports the vocabulary back (one definition); _review_paths/_next_review_path/_merge_reviews; organ_for offers the next free review path (packet.js unchanged — it reads REVIEW_PATH); record_update_cortex closes on the board and repeats - review: per sitting; _apply_packet refuses only for dev.
  • agents/conductors/cortex/_cortex.py: census batch reading joins each record's members to the phase files' live State:; box rendered above "awaiting" in both twins; local read_record replaced by the shared one.
  • agents/conductors/intake/_intake.py: _batch_status(mind); box rendered above "Start here" in both twins.
  • board/_theme.py: a.go button rule.
  • agents/conductors/batch/AGENTS.md: the partial-review rule, -r<N> naming, board-based close; dev rule restated as unchanged.

Companion PRs — merge order

  1. cortex: accept numbered partial review files for a rolling slot (#341) PyAutoCortex#7 — cortex.py check accepts -r<N> (must land before this).
  2. This PR.
  3. PyAutoMind — dashboard_refresh.yml triggers on batches/** + one doctrine sentence (opened alongside; link in the issue).

Both organs' committed dashboard.md predate the box; their dashboard_refresh.yml self-heal will regenerate them after merge.

Test plan

  • python -m pytest tests -q in PyAutoBrain — 861 passed (new test_batch_status.py; rolling-slot cases in test_batch_kinds.py; box tests in test_cortex_conductor.py, test_intake_dashboard.py)
  • Real Cortex and Mind dashboard renders on the worktree show the fixture (nothing open) and are byte-idempotent across two runs
  • After merge: both dashboards regenerate with the box; next Cortex slot with a mixed running/awaiting board shows the button with running members holding no control

🤖 Generated with Claude Code

https://claude.ai/code/session_01SgtS7NhqeziqgxKfSiMzRL

…view (#341)

Both dashboards open with one box: the open slot, every member on one line
as in progress / awaiting review / ruled, and the button to the Pages packet
once there is something to review. The reading lives in one stdlib-only
module (`agents/conductors/batch/_status.py`) so the Cortex's bare Pages
job and the Mind's dashboard render it byte-consistently; nothing in the
box is time-derived, so `--check` stays deterministic.

Mind (dev) rule unchanged: dispatched at once, reviewed at once, the button
appears when `collected:` is stamped.

Cortex (science) rule is rolling: the button appears as soon as one member
is awaiting-ruling; submitted/running members show as in progress with the
record's own wall/budget/refresh note and hold no review control. A slot
stays open across partial reviews — later sittings land as
`batches/reviews/<slot>-r<N>.md`, `collect --kind cortex` merges them
(ruled sticky), keeps refreshing the packet while anything is on the board,
never re-splices a ruled member, and closes the slot only when nothing is
left in a board state (carried members excluded). The dev refusal on an
existing review file stays.

- `_status.py`: the vocabulary (`RULING_WORDS`, `PENDING_RE`,
  `CORTEX_BOARD_STATES`, `RECORD_KEY`), the lossless `read_record`,
  `dev_status` / `cortex_status`, `pick_slot` (latest `dispatched:`, never
  lexical), `render_html` / `render_md`, fixture "No batch in flight."
- `_batch.py`: imports the vocabulary back; partial-review merge, next-free
  review path in `organ_for`, `record_update_cortex` closes on the board
  and repeats `- review:` per sitting; `_apply_packet` refuses only for dev.
- `_cortex.py` / `_intake.py`: the census `batch` reading and the box above
  "awaiting" / "Start here" in both twins; `_theme.py` gains `a.go`.
- Doctrine in `agents/conductors/batch/AGENTS.md`.
- Tests: new `test_batch_status.py`; rolling-slot cases in
  `test_batch_kinds.py`; box tests in `test_cortex_conductor.py` and
  `test_intake_dashboard.py`. 861 pass.

Pairs with PyAutoLabs/PyAutoCortex#7 (merge first) and the PyAutoMind
`batches/**` trigger PR (merge last). Cites PyAutoBrain#341.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SgtS7NhqeziqgxKfSiMzRL
@Jammy2211

Copy link
Copy Markdown
Contributor Author

CI red is the merge-order dependency, not a regression. The one failing test, test_batch_kinds.py::test_a_second_partial_review_refreshes_the_packet_untouched_elsewhere, runs cortex.py check from the workflow's PyAutoCortex checkout, which is main and still rejects reviews/<slot>-r2.md, so the record never gains its second - review: line. Reproduced locally: the same test fails with PYAUTO_CORTEX pointed at Cortex main and passes against the PyAutoLabs/PyAutoCortex#7 branch (full suite 861 passed there).

Merge PyAutoLabs/PyAutoCortex#7 first, then re-run this PR's checks.

The three box tests carried the live org's Pages host and a PyAutoFit PR
number as fixture text; the firewall gate reads those as instance facts in
an unlisted file. Neither is load-bearing — `exampleorg.github.io` and
`Widgets#1554`, the convention `test_intake_dashboard.py` already uses.
`repos_sync.py --check --only "tenant firewall (organ code)" --root <wt>`
now reports OK; the 181 box tests pass.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SgtS7NhqeziqgxKfSiMzRL
@Jammy2211
Jammy2211 merged commit 0761e03 into main Sep 3, 2026
2 checks passed
@Jammy2211
Jammy2211 deleted the feature/batch-status-box branch September 3, 2026 18:25
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.

feat(batch): batch status box on both dashboards + rolling science review

1 participant