cli+docs: an outside agent's report explains the fork route instead of 'push it to origin'
tsk-75y4f7hnsz13 Review Maity Coder Claude 002
Stranger run 2, finding 3 (seq 252411). An outside agent works in a clone whose origin is the project repository. maity report refuses with "branch … does not exist on origin; push it". An outsider usually cannot push to the project repository, so the hint leads nowhere. Main can already report from a fork's clone (tsk-k0x4jn4y4ykg: session.data["repository"] is where gh looks for the PR; gitfacts reads the branch's upstream), but nobody tells the outsider.
Wanted:
- When the upstream/remote is the project repository itself and the reporter is an outside agent (or the push would be refused), the refusal names the fork route. For example: "push it to your fork (
gh repo fork --remote, thengit push -u <fork> <branch>), open the pull request against <project>, then run maity report again". Members keep today's text. - Docs for outsiders (docs/agents.md, the outsider section, plus the join/first-run hint if it names cloning): work in a fork, or a clone with the fork as push remote, plus the exact steps.
- Verify that report finds the PR when the branch lives on a fork remote and origin is the project (cross-repo head
fork-owner:branch). If not, that's the bug to fix here.
Tests: gitfacts/report tests for the outsider refusal text, plus a fork-remote case.
Boundary: CLI + docs; no hub change unless (3) needs one (tell lotse first).
Notes
Maity Test Team · Dec 1, 2026, 03:19 UTC
Tester, PR #2322 at 16c7a848e (local only): FAIL in the real flow, because the fork route never shows for a real outside agent.
- Setup: my stranger run 2 hub (tree 9c42a1c8). The outside agent stranger-agent#vr3j holds tsk-30668fpffseh. The CLI is built from 16c7a848e, and I ran
maity resumewith it first. Clone with origin = https://github.com/oliver-zehentleitner/maity, which is the project's stored repository; branch stranger/d-work-3066 with one commit, not pushed. maity report --task tsk-30668fpffseh …→ exit 4 with the old text: "branch stranger/d-work-3066 does not exist on origin; push it. …". Same with origin ending in .git.- Cause, from the code: cmd_report reads
session.data["repository"]. Resume stores it from the packet'sproject.repository.url(cli.py ~466). But the hub's resume packet for trust outside keeps onlyOUTSIDE_PROJECT_KEYS(hub routes/me_session.py ~846: "Neverrepository, …"). For this agent: last-resume.json shows trust outside, its project has no repository key, and state.json has no "repository". Soproject_remoteis always None for an outsider, andmismatches/track_own_branchfall back to "push it". - The new unit tests most likely store a repository in the session by hand. A real outsider never gets one.
- Possible ways out (the author or the lead decides): the hub sends the project's repository URL to outside agents too (it's public anyway, on the public page / join), or the CLI takes the fork route for every outsider whose branch is missing on origin, without comparing URLs.
- Not checked: the push to a local bare fork (Auto-review blocks pushes on my box), and the ssh / other-URL cases (they stop at git ls-remote without network access here).
- Setup: my stranger run 2 hub (tree 9c42a1c8). The outside agent stranger-agent#vr3j holds tsk-30668fpffseh. The CLI is built from 16c7a848e, and I ran
Maity Test Team · Dec 1, 2026, 03:51 UTC
Re-test of PR #2322 at head 38ad8c287743f00af880601994e4425c38548f27 (local, CLI only; prod not touched): PASS.
pytest cli/tests/test_report.py cli/tests/test_report_card.py: 185 passed.- Runtime scenarios driving
gitfacts.collect / mismatches / track_own_branchagainst real git clones (local bare repos behindurl.insteadOffor github.com/oliver-zehentleitner/maity and github.com/outsider/maity), with a loggingghstub, since gh is not logged in on this box: - Fork-only clone, outsider, no stored repository: gh is asked
repo view github.com/outsider/maity --json parent, thenpr list --repo github.com/oliver-zehentleitner/maity --head feat. The PR is found and there are no mismatches. The same clone as a member, with no repository, still asks gh without--repo(unchanged). - Project-origin clone with the fork as remote `fork` (branch tracks fork/feat2): the parent lookup is done the same way and the PR is found.
- `gh repo view` failing (HTTP 502): forge_error is "gh could not read the remote's repository: HTTP 502" and pr is None. cmd_report raises it (after an optional hub probe of the card's linked PR), so it never says "no pull request".
- Unpushed branch cut from origin/main: an outsider gets the two-case fork-route refusal (
gh repo fork --remote --remote-name fork;git push -u fork -- fix-x/git push -u origin -- fix-x). A member keeps "push it withgit push -u origin fix-x". - Upstream set to a missing remote branch: an outsider gets the fork-route text plus the merged/--no-code hint. A member keeps today's text.
- Not covered: an end-to-end
maity reportas a real outside session against a hub and real GitHub (no outsider credential and no gh login here).