Skip to content

feat: admit, stage and validate the state.json cockpit feed (PyAutoBrain#418) - #45

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/mind-cortex-state-feed
Sep 26, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/mind-cortex-state-feed

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Summary

Organ cockpit (PyAutoBrain#418, PR B of 3 — merge after PyAutoMind, before PyAutoBrain): the Cortex admits, copies and validates the state.json cockpit feed that the Brain cortex conductor will write beside dashboard.{md,html} on dashboard --apply and checkin once PR C merges. All steps are guarded on the file existing.

API Changes

  • scripts/ledger_merge.py LEDGER_FILES += state.json (so cortex checkin --push via classify_paths and the ledger auto-merge accept it); ledger_merge.yml conflict filter takes main's copy for it.
  • Workflows: dashboard_refresh.yml + cortex_check.yml + pages_dashboard.yml trigger on it; dashboard_refresh.yml stages it (guarded); pages_dashboard.yml checks out PyAutoBrain, copies it and runs "Validate the cockpit feed against the Brain contract" (guarded).
    See full details below.

Test Plan

  • pytest tests -q — 64 passed (new classify case; the scheduled-job test now requires the guarded add)
  • All workflow YAMLs parse; tenant firewall OK
  • After PR C merges: dashboard_refresh.yml commits state.json; pages_dashboard.yml green with state: ok; curl https://pyautolabs.github.io/PyAutoCortex/state.json validates

Note: the Cortex feed carries check-in staleness (a 3 h rule), so dashboard --check reports drift once a check-in ages past that; the nightly self-heal commits the refreshed feed. Local resume payloads (laptop paths) already appear on the published dashboard, nothing new is exposed.

Full API Changes (for automation & release notes)

Added

  • state.json as a ledger file in scripts/ledger_merge.py; workflow steps as above

Removed

  • none

Migration

  • none

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

PR B of PyAutoBrain#418. The Brain cortex renderer will write state.json
(the organ-cockpit v1 feed) beside dashboard.html; this lets it through:

- ledger_merge.py: state.json joins LEDGER_FILES, so `cortex checkin
  --push` and the ledger auto-merge accept it; test cases added.
- ledger_merge.yml: a state.json conflict takes main's render, like the
  two dashboard pages.
- dashboard_refresh.yml: stage state.json with the healed pages (guarded
  on the file existing); trigger paths include it. cortex_check.yml paths
  too, for symmetry.
- pages_dashboard.yml: check out PyAutoBrain, copy state.json to
  _site/state.json and validate it with board/_state.py — guarded, so a
  no-op until the Brain emits it.

Refs PyAutoBrain#418

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit 62b4e99 into main Sep 26, 2026
1 check passed
@Jammy2211
Jammy2211 deleted the feature/mind-cortex-state-feed branch September 26, 2026 12:34
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