Repository navigation
Mobile workflow: wait for CI by being woken, and carry the mcp lane inline - #304
Merged
Merged
Conversation
/prm step 3 polled every ~90s, which on mobile is one turn — and one context re-read — per poll, for as long as CI runs. This harness can be woken instead: subscribe_pr_activity delivers the check-suite rollup as an event, so the wait costs one turn per event and the phone can be put down between them. The wake path is offered first where the tools exist; the poll stays for a local CLI, which has no wake mechanism. Two details are load-bearing and written down rather than left to be rediscovered: webhooks are best-effort and a *successful* rollup is the event most likely to go missing (hence the send_later check-in), and an event is a reason to re-judge from step 2, never evidence of green. Step 4 now drops the subscription once the PR reads MERGED, so a live subscription cannot outlive the run and wake later sessions. GITHUB_ACCESS.md carries the mapping row: this is the one operation where the MCP surface beats gh rather than merely matching it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016c1SLkLDW6aEZCVf95XXeu
The remote-session block told a session to bootstrap if pytest misbehaved. That trigger stopped firing: measured 2026-08-27, the container ships Python 3.12 with pytest, mypy, ruff and flake8 on it, so the session looks correct while `pytest -n auto` still dies on `unrecognized arguments: -n` — which reads like a bad flag, not a stale environment. Reordered so the bootstrap comes before the parallel-test line it supplies xdist for. The probe defect behind it is fixed in PyAutoMind. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016c1SLkLDW6aEZCVf95XXeu
Close-out step 1 proves each branch merged with `merge-base --is-ancestor`. A remote session clones shallow (measured 2026-08-27: PyAutoMind at 78 of 4478 commits), and that command reports "not an ancestor" for a commit whose ancestry is merely absent — so a merged branch reads UNMERGED and the close-out stops on nothing. The bootstrap unshallows; the reference now says so at the step that acts on the answer, with `git rev-parse --is-shallow-repository` as the check for a session that skipped it. Same line added to the always-loaded remote-session block, which previously named only the pytest consequences. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016c1SLkLDW6aEZCVf95XXeu
/prm is ~4k words of gh mechanics. A run without gh loaded those AND GITHUB_ACCESS.md's mapping table, then translated step by step — paying twice for the surface that is now the common one. The close-out's GitHub calls are few and stable, so they are named inline: one row per step, with the parameters a run would otherwise re-derive. Two of them are traps rather than lookups, and cost turns: - `actions_list list_workflow_runs` has NO head_sha filter — workflow_runs_filter is actor/branch/event/status only. Filter by branch and match head_sha yourself, or judge a stale run green. - `issue_write update` with state closed and no state_reason leaves the issue reading "closed as not planned". GITHUB_ACCESS.md stays the index for everything else; it is no longer a required second read for this command. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016c1SLkLDW6aEZCVf95XXeu
The block is now single-sourced in PyAutoMind/policy/remote_sessions.md and written here by repos_sync.py --write, with a drift check. Content is unchanged apart from losing this repo's test count and timings, which rot and now live in the commit record instead. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016c1SLkLDW6aEZCVf95XXeu
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.
A pass over the mobile workflow, measured in this session rather than recalled. Companion PR in PyAutoMind carries the session/environment half and must merge after this one — Mind's
firewall_gate.ymlpins PyAutoBrain tomain, and that PR touchesscripts/repos_sync.py, the gate's path filter.What changes
/prmwaits by being woken, not by polling. Step 3 polled every ~90s, which on mobile is a turn — and a context re-read — per poll, for as long as CI runs. Where the harness exposessubscribe_pr_activity, the run subscribes once and ends the turn; the check-suite rollup wakes it. Two things are written down rather than left to be rediscovered: webhooks are best-effort and a successful rollup is the event most likely to go missing (hence thesend_latercheck-in), and an event is a reason to re-judge from step 2, never evidence of green. Step 4 drops the subscription once the PR readsMERGED, so it cannot outlive the run.The mcp lane is inline, so a mobile close-out reads one page.
/prmis ~4k words ofghmechanics; a run withoutghloaded those andGITHUB_ACCESS.md, then translated step by step — paying twice for what is now the common surface. The close-out's GitHub calls are few and stable, so they are named per step, including two that are traps rather than lookups:actions_list list_workflow_runshas nohead_shafilter (workflow_runs_filteris actor/branch/event/status only) — filter by branch and matchhead_shayourself, or judge a stale run green.issue_write updatewithstate: closedand nostate_reasonleaves the issue reading "closed as not planned".A shallow clone makes the merge proof lie. Close-out step 1 proves each branch merged with
merge-base --is-ancestor. This session's clones arrived shallow (PyAutoMind at 78 of 4478 commits), and that command answers "not an ancestor" for a commit whose ancestry is merely absent — so a merged branch readsUNMERGEDand the close-out stops on nothing. Named at the step that acts on the answer, withgit rev-parse --is-shallow-repositoryas the check.The remote-session block is now generated from
PyAutoMind/policy/remote_sessions.md(the generator and its drift check are in the Mind PR). Content is unchanged apart from losing this repo's test count and timings, which rot.Validation
561 tests green,
ruffclean on the files touched. The three new guards intests/test_gh_surface.pywere each confirmed to FAIL against the pre-fix tree before being trusted.Generated by Claude Code