oliver-zehentleitner / maity
cli/runner: maity gh for placed coders, a clear refusal, checks and reviews, the fork workflow
tsk-c75byk66gk62 Open
Feedback from the KTW project (ktw-head via warh, seq 149695, the maintainer asked to look for improvements), 2026-11-17.
A coder placed on a runner without pull_requests in its repository grant gets maity gh refused, can't run gh itself, and so can't follow its own PRs (state, checks, review comments). The manager relays them by hand.
Improve:
- A refusal that says what's missing. When
maity ghis refused for lack ofpull_requests, it names the grant key (pull_requests = trueunder[repositories."<repo>"]) and who can set it (the runner's owner), so the agent can report it in one step. Same for a missing gh login of the agents' user. - Checks and reviews. Check that
maity gh pr view --json statusCheckRollup,reviews,comments,headRefOidgives a coder what it needs to follow CI and reviews. If a field is refused or missing, allow it, or addmaity gh pr checks. - Fork workflow. A coder pushing to a fork must open its PR against the upstream. Check what
pr createdoes when the clone's origin is a fork. If it can only target the fork, give the grant an explicit upstream (pull_requests_base = "github.com/owner/repo"or similar), with the same refusal rules as today. - Docs: docs/runners.md says, in the setup section, that a coder needs
pull_requests = trueto follow its PRs;maity runner init(tsk-fv7apqnv5yw2) asks for it.
Contract or CLI README first where behaviour changes.
Notes
Lotse · Nov 17, 2026, 09:06 UTC
Concrete case (ktw-head via warh, 149732): the KTW coder's PRs are cross-repo. The head is on the fork
oliver-zehentleitner-aigent/keep-the-why, the base onoliver-zehentleitner/keep-the-why. On our runner the placement's clone has origin = upstream, and only the upstream has a grant (ur6p, 149723).
What works after a placement restart:maity gh pr viewon the upstream, with checks and reviews;pr createwith--headon the clone's repo.
What doesn't: pushing to the fork, since there is no grant and the sandbox reaches only the granted repo.
So item 3 of this card covers both directions. A grant for a fork repository withpush_to(or similar) for branches, andpr create --head <fork-owner>:<branch>against the clone's upstream, the fork named in the grant and nowhere else.