Skip to content

intake: render the PR ledger and the pending-release chain - #344

Merged
Jammy2211 merged 2 commits into
mainfrom
feature/mind-post-cortex-p3-pr-ledger
Sep 3, 2026
Merged

Jammy2211 merged 2 commits into
mainfrom
feature/mind-post-cortex-p3-pr-ledger

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Closes part of PyAutoLabs/PyAutoMind#392 — phase 3 of the mind-post-cortex epic (assessment gaps 1 and 2). The renderer half. Companions: PyAutoLabs/PyAutoMind#393 (schema + drift check — the schema this PR renders) and PyAutoLabs/PyAutoHeart (the step that clears the chain).

What changed

1. The In-flight PR column

parse_registry gained a repeat-tolerant multi map. Its fields map is first-wins by design — that matches how a human scans a block — and would have read a three-PR row as a one-PR row, which is exactly what active.md holds today (phase 2 of this epic opened three library PRs on one task). Every library-pr: / workspace-pr: now renders as one repo-labelled link — PyAutoBrain#343 — suffixed to the task line rather than as a real table column, because the page is read on a phone and a five-column table wraps into unreadability. The older single line of <url>, <url> collapses through the same path.

The pending-release badge is read from the ledger's own pending-release: key, never from a live label query.

2. The Pending release section

A new ## Pending release section under In flight, grouped by library: merged-but-unreleased library PRs (from active.md rows and complete/ records whose key /prm carried over) and, under each, the in-flight tasks whose release-gate: names it. Empty section is omitted — a heading almost always followed by "(none)" trains the eye to skip it, and the whole value here is that its presence means something is waiting.

No gh call happens at render time, at any input, and the section's blurb says so in one line: this is the ledger view — what the Mind believes — and the Brain board's live pending-release search stays the fresh view. The dashboard renders in CI, offline and on a phone; a section that needs a token to draw is a section that silently disappears.

complete/ holds ~1300 records, so only the first 4KB of each is read (the record's own fields sit at the top) and everything past ## Original prompt is discarded — that tail is the starting prompt verbatim and may quote another task's keys.

3. The CI Cortex-badge defect phase 2 found

dashboard_refresh.yml explicitly checks out PyAutoCortex beside the Mind, then runs the renderer as --mind . from inside the Mind checkout. Path(".").parent is ., so _cortex_root looked for PyAutoMind/PyAutoCortex, never found it, and every CI render silently dropped the Cortex-gate badges — the render succeeded, it just said less than it knew. Fixed by resolving the Mind path before taking its parent (one line + a test), which also fixes any other --mind <relative> caller rather than only the workflow. No workflow change needed.

4. Skill wording follows the schema

  • ship_library/reference.md — one - library-pr: <url> line per PR; a row declaring open/shipped PRs and naming none is now drift; and write pending-release: <lib>@<pr-url> when the PR carries the label.
  • ship_workspace/ship_workspace.md + reference.md — write release-gate: <lib> on a task blocked behind an unreleased library; carry pending-release: into the record.
  • prm/prm.md step 5.3 — carry any uncleared pending-release: into the completion record, and never clear it.

Which step clears pending-release:

/review_release step 5, the "Live run" branch (PyAutoHeart — companion PR). I read PyAutoHands/skills/pre_build/pre_build.md and PyAutoHands/bin/pre_build.sh first: pre_build asserts the pending-release label exists and dispatches release.yml, and nothing in Hands or Brain removes the label or knows the publish outcome — pre_build returns as soon as the workflow is dispatched, and /build only coordinates. /review_release is the one step in the organism that establishes a release actually published, so it is the only honest place for the clear. A release that was dispatched is not a release that published.

Tests

python3 -m pytest -q → 867 passed, 1 failed. The failure is test_cortex_conductor.py::test_a_fixture_tree_finds_the_schema_its_checkout_ships, which fails identically on this branch stashed (i.e. on main) inside a task worktree: the worktree symlinks PyAutoCortex back to the canonical checkout and the test compares resolved paths. It passes in the canonical checkout. Not caused by this diff.

tests/test_intake_dashboard.py → 126 passed, 8 new: the PR column (repeated + comma forms), the ledger-read badge, the grouped section (including that a record's appended ## Original prompt is not read as its own fields), the omitted-when-empty case, the HTML render, and the --mind . Cortex-root resolution.

Merge-tree vs the open phase-2 branch

Scratch-merged origin/feature/mind-post-cortex-p2-science-residue (PyAutoBrain#343, unmerged) into this branch: CLEAN, no conflicts. Phase 2 touches agents/faculties/sizing/_sizing.py work-types and board/_theme.py; this touches agents/conductors/intake/_intake.py and the ship skills. (The Mind side of the same probe conflicts only on the generated dashboard.* pages, and does so against plain main too — phase 2's own rebase debt, not an interaction.)

Heart

pyauto-heart readiness is RED at PR-open. Verbatim reasons:

  • PyAutoLens: CI failure
  • release validation FAILED (stage integrate)
  • PyAutoArray: open PR 11d old

None touches this diff — no library source, no release surface. The RED is not acknowledged for this task, so merge needs the human's own call. Opened for review only.

🤖 Generated with Claude Code

https://claude.ai/code/session_013HsZA1ufn3msgPiDFxEXa6

In-flight rows gain a PR column — one repo-labelled link per `library-pr:` /
`workspace-pr:` — and the ledger's own `pending-release:` / `release-gate:`
badges. A new **Pending release** section under In flight groups
merged-but-unreleased library PRs (from `active.md` rows and `complete/`
records) and, under each, the in-flight tasks whose `release-gate:` names that
library. Empty section is omitted.

Rendered from the ledger only: no `gh` call happens at render time, and the
section's blurb says so — the Brain board's live `pending-release` search stays
the fresh view. `parse_registry` gained a repeat-tolerant `multi` map because
the PR keys are repeatable and its first-wins `fields` would have dropped all
but the first.

Also fixes a silent CI defect phase 2 found: `dashboard_refresh.yml` runs the
renderer as `--mind .` from inside the Mind checkout, and `Path(".").parent`
is `.` — so `_cortex_root` looked for `PyAutoMind/PyAutoCortex`, never found
the sibling checkout the workflow explicitly checks out, and every CI render
dropped the Cortex-gate badges without erroring. It resolves the Mind path
before taking the parent now.

Skill wording follows the schema: ship_library writes one `library-pr:` line
per PR plus `pending-release:`, ship_workspace writes `release-gate:`, and /prm
carries an uncleared `pending-release:` into the completion record.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013HsZA1ufn3msgPiDFxEXa6
@Jammy2211
Jammy2211 merged commit fcb4375 into main Sep 3, 2026
2 checks passed
@Jammy2211
Jammy2211 deleted the feature/mind-post-cortex-p3-pr-ledger branch September 3, 2026 22:00
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