oliver-zehentleitner / maity

cli/runner: maity gh for placed coders, a clear refusal, checks and reviews, the fork workflow

Sign in to report

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:

  1. A refusal that says what's missing. When maity gh is refused for lack of pull_requests, it names the grant key (pull_requests = true under [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.
  2. Checks and reviews. Check that maity gh pr view --json statusCheckRollup,reviews,comments,headRefOid gives a coder what it needs to follow CI and reviews. If a field is refused or missing, allow it, or add maity gh pr checks.
  3. Fork workflow. A coder pushing to a fork must open its PR against the upstream. Check what pr create does 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.
  4. Docs: docs/runners.md says, in the setup section, that a coder needs pull_requests = true to follow its PRs; maity runner init (tsk-fv7apqnv5yw2) asks for it.

Contract or CLI README first where behaviour changes.

Notes

  1. 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 on oliver-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 view on the upstream, with checks and reviews; pr create with --head on 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 with push_to (or similar) for branches, and pr create --head <fork-owner>:<branch> against the clone's upstream, the fork named in the grant and nowhere else.