Skip to content

board: accept pre-fetched GitHub data so the overnight legs render without gh - #305

Merged
Jammy2211 merged 1 commit into
mainfrom
claude/mobile-workflow-review-tyv13y
Aug 27, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
claude/mobile-workflow-review-tyv13y

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Closes #303 (phase 1 of PyAutoMind/active/board_without_gh_phase1_seam.md).

The board is the morning door, and on the surface it is actually read from — a session on a phone — eleven of its legs are dark, because they read GitHub through gh api and there is no gh. mcp__github__* is an agent capability and _board.py is a subprocess, so this is a seam rather than a substitution: the /board skill fetches, the renderer renders.

The seam

pyauto-brain board --github-data <file>

The file is {endpoint: response}, keyed by the endpoint string exactly as gh_json() receives it — the same string that would follow gh api. Injected and live data are then interchangeable by construction rather than by convention, and a key that drifts from its call site simply misses. The gh path is untouched: no flag, no injected map, identical behaviour.

Three rules it does not bend

All three are the 2026-08-26 degraded-render invariant restated for the new path:

  1. A miss is could not ask (None), never an empty answer. That is precisely how a board goes green by never looking.
  2. An explicit null means the gatherer's own fetch failed — same outcome, stated rather than implied. {"workflow_runs": []} is the opposite: a real answer that happens to be empty.
  3. A malformed or missing file is fatal, not degrading. Every leg reading could not read renders as a GitHub outage; if the truth is that the gatherer wrote a broken file, the board must say so.

Proved in a session with no gh

One injected endpoint, rendered here:

## 🌙 Overnight
- ✓ PyAutoLabs/PyAutoBrain/nightly-release.yml — success (6h) — [run](…/runs/33071748585)
- ? PyAutoLabs/PyAutoHeart/heart-health.yml — could not read (see Degraded)
  …

The injected leg is live; the six uninjected ones still say could not read, and the render stays degraded and non-green. That is the behaviour worth having.

Storing the response verbatim is part of the contract, not a nicety: the row's age comes from created_at, and the first hand-written fixture used updated_at — which renders ? and reads as a render bug rather than a bad file. Named in board/AGENTS.md, in the skill, and pinned in the tests.

Scope

Phase 1 covers the seam and the overnight legs (seven of the eleven). The remaining four — versions, community, resume, upkeep — are phase 2 (draft/feature/pyautobrain/board_without_gh_phase2_legs.md), whose real question is whether each script grows its own seam or the board gathers for them; that is answered in this contract's terms, not with a second shape.

A full seven-row live render is not demonstrable from this session: three of the watched repos (PyAutoHeart, PyAutoHands, autolens_assistant) are outside its repository scope, so the gatherer cannot reach them here. The mechanism is identical per leg.

Why a seam at all

The cheaper option is an org admin connecting the Claude GitHub App, after which $GH_TOKEN would work from a subprocess and gh_json() could become a plain REST helper on every surface. Probed 2026-08-27: 200 on /user and /rate_limit, 403 on every repo-scoped path. If that changes, this seam becomes deletable — which is why it is small.

Validation

569 tests (-n auto), ruff clean. 8 new tests, fixture-driven with BOARD_GH pointed at a nonexistent command so a leak to a live gh fails loudly rather than answering.


Generated by Claude Code

…ithout gh

Phase 1 of PyAutoBrain#303. The board is the morning door and eleven of its
legs read GitHub through `gh api`, which the surface it is actually read from —
a session on a phone — does not have. `mcp__github__*` is an AGENT capability
and `_board.py` is a subprocess, so this is a seam, not a substitution: the
/board skill fetches, this file renders.

`--github-data <file>` takes {endpoint: response}, keyed by the endpoint string
exactly as gh_json() receives it, so injected and live data are interchangeable
by construction and a drifted key simply misses. The gh path is untouched.

Three rules the seam does not bend, all of them the 2026-08-26 degraded-render
invariant restated:

- a miss is *could not ask* (None), never an empty answer — that is how a board
  goes green by never looking;
- an explicit null says the gatherer's own fetch failed — same outcome, stated;
- a malformed or missing file is fatal, not degrading: every leg reading "could
  not read" renders as a GitHub outage when the truth is a broken file.

Proved end to end in this session, which has no gh: with one injected endpoint
the nightly-release row renders `✓ success (6h)` with its run link and the
other six still say `could not read`.

Storing the response verbatim is part of the contract, not a nicety — the row's
age comes from `created_at`, and the first hand-written fixture used
`updated_at`, which renders `?` and reads as a render bug rather than a bad
file. Documented in board/AGENTS.md and the skill, and pinned in the tests.

The alternative to all of this is an org admin connecting the Claude GitHub App;
probed 2026-08-27, still 403 on every repo-scoped path. Keep the seam small
enough to delete if that changes.

Refs #303

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016c1SLkLDW6aEZCVf95XXeu
@Jammy2211
Jammy2211 merged commit 71b62f5 into main Aug 27, 2026
2 checks passed
@Jammy2211
Jammy2211 deleted the claude/mobile-workflow-review-tyv13y branch August 27, 2026 18:42
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(board): inject GitHub data so the overnight legs render without gh

2 participants