feat(conductors): Mind + Cortex dashboards emit the state.json cockpit feed (#418) - #420
Merged
Merged
Conversation
PR C of PyAutoBrain#418. The intake and cortex conductors render a third
page from their one census: state.json, the organ-cockpit v1 feed, built
through board/_state.build_state so it cannot break the contract.
- intake: render_state — red when an in-flight task is awaiting-input or
blocked (or prompts have lifecycle drift), yellow on awaiting-merge /
library-shipped rows, human review, pending release or picks, green
otherwise, grey for an empty Mind. Headline is the Start-here count
line. Items reuse the page's payloads (/start_dev <path>,
_review_payload, REFRESH_PAYLOAD), capped at 20. `--apply dashboard`
writes it; `--check` compares it with `updated` normalised out.
- intake: _mind_home now finds `github:` anywhere in the PyAutoMind
repos.yaml entry — since the grouped-checkouts layout put `path:` first
it returned '' and the pages silently lost their Pages link.
- cortex: render_state — red on check problems (linked to the ledger's
issue), yellow while a run is running or the check-in is stale (the page
script's freshness rule, ported to checkin_stale), green otherwise, grey
with no ledgers. render_pages adds it, so `dashboard --apply/--check`
and `checkin` all carry it; state_body normalises `updated`.
- tests + tests/fixtures/state/{mind,cortex}.json; docs lines in both
conductors' AGENTS.md and board/AGENTS.md.
Refs PyAutoBrain#418
Co-Authored-By: Claude Fable 5.1 <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
Organ cockpit (PyAutoBrain#418, PR C of 3 — merge last, after PyAutoMind and PyAutoCortex): the intake and cortex conductors render the
state.jsonv1 cockpit feed beside the Mind and Cortex dashboards they already write, usingboard/_state.build_state.dashboard --applywrites it,dashboard --checkcovers it (withupdatednormalised out, like the generation stamp),cortex checkincarries it. Never re-derives: items reuse the rows' own copy payloads.Also fixes a real regression found on the way:
_mind_homeexpectedgithub:on the line afterPyAutoMind:inrepos.yaml, but since the grouped-checkouts layout (Mind 69174a65, 2026-09-19)path:comes first, so the Mind home resolved to "" and the live dashboard silently lost its Pages pointer and absolute links. The regex now scans the whole indented entry. Expect the Mind self-heal after this merge to commit a largedashboard.htmllink diff along withstate.json.API Changes
agents/conductors/intake/_intake.py:render_state(c)(+_state_status,_state_items,_start_here_picks,_now_isoclock seam,_state_body/_page_body);pagesgainsstate.json;--jsonincludesstate. Status: red on registry drift or any in-flight row awaiting-input/blocked; yellow on awaiting-merge/library-shipped rows, human-review rows, pending-release rows or picks; grey on an empty Mind; else green. HeadlineN picks · M in flight.agents/conductors/cortex/_cortex.py:render_state(c)(+checkin_stale— Python port of the page's 180-min JS rule,_problem_ledger,_state_items,_now,state_body/page_body);render_pagesaddsstate.json. Status: red on problems; yellow on running runs or a stale check-in; grey with no ledgers; else green. HeadlineA active · R running._mind_homeregex fix (above).See full details below.
Test Plan
pytest tests/test_intake_dashboard.py tests/test_cortex_conductor.py tests/test_state_feed.py -q— 196 passed (5 + 6 new, 2 new fixtures)test_hygiene_map_and_heart_board_find_grouped_checkouts) with activate.sh'sPYAUTO_MINDexported, passes unset — pre-existing--apply dashboard→ "Wrote: dashboard.md + dashboard.html + state.json (237 prompts)";--check→ current; validatorstate: ok(yellow — 24 picks · 7 in flight, 20 items)--apply→ 12 ledgers, 7 running;--check→ current; validatorstate: ok(yellow — 7 active · 7 running, 8 items)dashboard_refresh.ymlcommitstate.jsonand dispatch Pages; bothpages_dashboard.ymlgreen withstate: ok; both published feeds validateFull API Changes (for automation & release notes)
Added
render_state,_state_status,_state_items,_start_here_picks,_now_iso,_state_body,_page_body;state.jsoninpages(check/apply/json)render_state,checkin_stale,_problem_ledger,_state_items,_now,state_body,page_body;state.jsoninrender_pagestests/fixtures/state/{mind,cortex}.json; docs lines in both conductors' AGENTS.md and board/AGENTS.mdChanged
_mind_home: scans the wholePyAutoMind:entry forgithub:Removed
Migration
Heart RED override (development only)
Heart readiness is RED (snapshot 2026-09-26T11:27:07+00:00). Verbatim reason string:
release validation FAILED (stage integrate)Pre-existing release-integrate failure, unrelated to this diff. Branch gates passed as listed above.
Human authorization (live, this session, 2026-09-26, for PyAutoBrain#418): "override and continue" — development shipping + merge on green checks (Mind → Cortex → Brain); no release
Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code