Skip to content

Commit a088474

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/untrack-fits-test-artifacts-r1eard
# Conflicts: # dashboard.html # dashboard.md
2 parents 7c2ca36 + 0124c86 commit a088474

13 files changed

Lines changed: 758 additions & 73 deletions

AGENTS.md

Lines changed: 46 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -90,32 +90,52 @@ For the full workflow narrative, conventions, and registry schemas, read
9090
loosely-related changes, split into separate prompt files before issuing.
9191
4. **`tmp/` is scratch.** Never commit anything under it.
9292

93-
## Running tests in a remote (web/mobile) session
94-
95-
Two facts, both measured, both worth one line each:
96-
97-
1. **Run the suite in parallel.** A remote container has 4 cores and the suites
98-
are subprocess-heavy with no single slow test: PyAutoBrain's 554 tests take
99-
96s on one core and 28s on four. `pytest-xdist` is installed by the
100-
session-start hook, so the command is just:
101-
102-
```
103-
python3 -m pytest -q -n auto
104-
```
105-
106-
2. **If `python3 -m pytest` or `pytest` misbehaves, the environment is stale,
107-
not the code.** A session holding several organs registers no SessionStart
108-
hook (Claude Code reads hooks from the project directory, which is the
109-
repos' *parent*). Knock on the door directly, once, in the first turn:
110-
111-
```
112-
bash PyAutoMind/scripts/session_bootstrap.sh # fix it
113-
bash PyAutoMind/scripts/session_bootstrap.sh --check # report only
114-
```
115-
116-
The symptom to recognise: collection `ImportError`s naming `yaml`, or
117-
`No module named pytest`. Both are the session resolving a pytest that is not
118-
this workspace's — never a broken test module.
93+
<!-- repos_sync:remote:begin -->
94+
## Remote sessions (Claude Code on web and mobile)
95+
96+
Three facts, all measured in a web/mobile container, where this file is loaded
97+
and little else is. They ride in every organ because a session may hold any
98+
subset of them — and the session that needs this most is the one holding
99+
several, which is exactly the session no hook fires in.
100+
101+
- **Bootstrap in the first turn, unconditionally** — before the first test
102+
command, not as a remedy once something looks wrong:
103+
104+
```
105+
bash PyAutoMind/scripts/session_bootstrap.sh # ~10s cold, ~1s warm
106+
bash PyAutoMind/scripts/session_bootstrap.sh --check # report only
107+
```
108+
109+
A session holding several organs registers no SessionStart hook — Claude Code
110+
reads project hooks from the project directory, which in that layout is the
111+
repos' *parent*, not a repo — so nothing has set this session up. It was once
112+
phrased as a remedy keyed to `No module named pytest` or collection
113+
`ImportError`s naming `yaml`; that symptom stopped appearing when the
114+
container image moved to Python 3.12, while the environment is still wrong in
115+
ways that read like a bad command rather than a stale session (`pytest -n
116+
auto``unrecognized arguments: -n`). The bootstrap also **unshallows the
117+
clones**: a remote session clones shallow, and `git merge-base --is-ancestor`
118+
then answers "not an ancestor" for a commit whose ancestry is merely absent —
119+
the answer the ship and close-out procedures act on when proving a branch
120+
merged.
121+
122+
- **Then run the suite in parallel.** 4 cores, subprocess-heavy suites, no
123+
single slow test: about 3.5x. `python3 -m pytest -q -n auto`, with
124+
`pytest-xdist` supplied by the bootstrap above.
125+
126+
- **There is no `gh`, and installing one does not help.** A remote session
127+
reaches GitHub through the `mcp__github__*` tools, already scoped to the
128+
session's repos. `gh` installs in two seconds and is a trap: it authenticates,
129+
then 403s every repo-scoped call, because the egress proxy serves neither the
130+
REST repo paths nor GraphQL beyond a pinned set of PR-review operations — a
131+
binary that looks healthy and fails everything that matters. It also defeats
132+
the surface probe, which keys off `gh auth status`. Read
133+
`PyAutoBrain/skills/GITHUB_ACCESS.md` at the top of any run that touches
134+
GitHub; it maps each `gh` operation onto its MCP tool. Spell that path from
135+
the workspace root, as written: a multi-organ session is cwd'd at the repos'
136+
*parent*, so a bare `skills/…` reads as a missing file rather than a missing
137+
repo prefix.
138+
<!-- repos_sync:remote:end -->
119139

120140
## When you are asked to add a new prompt
121141

active.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Active Tasks
22

3+
## board-github-data-seam
4+
- issue: https://github.com/PyAutoLabs/PyAutoBrain/issues/303 (issued 2026-08-27)
5+
- issued: 2026-08-27
6+
- prompt: active/board_without_gh_phase1_seam.md
7+
- status: library-dev — not started; routed by /start_dev, no worktree claimed yet
8+
(this session is remote: no ~/Code/PyAutoLabs-wt, so /start_library runs on the
9+
machine that picks the task up).
10+
- worktree: ~/Code/PyAutoLabs-wt/board-github-data-seam/ (to be created by /start_library)
11+
- repos: PyAutoBrain
12+
- phase: 1 of 2 — phase 2 is draft/feature/pyautobrain/board_without_gh_phase2_legs.md,
13+
blocked-by this one; parent design + probe evidence in
14+
draft/feature/pyautobrain/board_without_gh.md
15+
- why: the board is the morning door and eleven legs are dark on the surface it is
16+
read from. The 2026-08-27 probe closed the two cheaper options — $GH_TOKEN 403s
17+
every repo path — so the injection seam is the design.
18+
319
## transformed-message-factor-gradient-unpack
420
- issue: https://github.com/PyAutoLabs/PyAutoFit/issues/1501 (issued 2026-08-19)
521
- issued: 2026-08-19
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Board phase 1: the injection seam, proven on the overnight legs
2+
3+
Type: feature
4+
Target: pyautobrain
5+
Repos:
6+
- PyAutoBrain
7+
Difficulty: medium
8+
Autonomy: supervised
9+
Priority: normal
10+
Status: formalised
11+
Filed: 2026-08-27
12+
Issued: 2026-08-27
13+
Parent: draft/feature/pyautobrain/board_without_gh.md
14+
15+
Phase 1 of the board's gh-less work. The parent prompt holds the design, the
16+
measurements and the 2026-08-27 probe that selected this option; read it first
17+
and do not re-derive them.
18+
19+
## Scope
20+
21+
Build the seam and prove it on **one** leg family — the seven `overnight:
22+
could not read <repo>/<workflow>` rows, the largest block of the eleven.
23+
24+
- `board/_board.py` accepts pre-fetched GitHub JSON (`--github-data <file>`),
25+
and `gh_json()` reads from it when present. The `gh` path is untouched, so a
26+
dev box behaves exactly as today.
27+
- The `/board` skill — which *is* the agent, and so is the only thing that can
28+
call `mcp__github__*` — gathers that JSON when `command -v gh` fails, writes
29+
it, and invokes the renderer with the flag. `_board.py` stays a pure
30+
renderer; a subprocess cannot reach MCP tools and this is the whole reason
31+
the seam exists.
32+
- The file's shape is a documented contract in `board/AGENTS.md` (extend
33+
"Reading the board in a remote session"), because it outlives whoever writes
34+
it.
35+
36+
## Guards
37+
38+
- Tests drive the seam from a **fixture file**, never a live call.
39+
- A leg with no injected data still reports `could not read` — the invariant
40+
from the 2026-08-26 work: no leg may substitute an empty answer for an
41+
unasked question. A green badge still requires a render that read everything.
42+
43+
## Done when
44+
45+
The overnight rows are live in a remote render, the degraded count drops by
46+
seven, the dev-box path is byte-identical, and `tests/test_board_degraded.py`
47+
plus the new fixture tests pass.

0 commit comments

Comments
 (0)