Repository navigation
π contribute: open the contributor's PR against upstream, and say so when it lands in the fork - #18844
Merged
hivecommons-hive[bot] merged 1 commit intoNov 17, 2026
Conversation
β¦when it lands in the fork The task prompt never named the base repo for gh pr create, so a clone reused across tasks that defaults to the fork opened the PR fork-to-fork (projectbluefin/chairlift#798 -> kylerankin/chairlift#3). The relay rightly never credited that PR but dropped it silently. The prompt now names --repo <upstream> (and --head <login>:<branch> from a fork) and asks the agent to confirm the upstream PR URL. The relay tells the agent once to reopen a PR found in its own fork, as the task would finalize or before the stall backstop fails a frozen pane. Signed-off-by: Danathar <6772335+Danathar@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Contributor
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
Contributor
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.
Summary
A contributor agent working from a fork can open its fix PR inside its own fork. Both the head and the base are then in the fork, so the hive never sees the fix.
gh pr create.What happened
On projectbluefin/chairlift#798, all times Eastern on 11-17:
kylerankin/chairlift:main, so the head and base were both in the fork.pr_urlwas recorded.stage/010-actionablewhen a maintainer opened fix(agents): make single downloaded model active for Agent ModeΒ projectbluefin/chairlift#808, almost nine hours later.The same fork has two older PRs of the same kind, kylerankin/chairlift#1 and #2.
Cause
The prompt never named the base repo.
buildTaskPromptBodyWithHintsAndIssueRead(contribute_task_prompt.go):gh pr create --base <b>when a base is declared;Without
--repo,ghtakes the base repo from the clone, and a reused clone can default to the fork. The self-check asked only about the base branch, so a PR onfork:mainpassed it.The relay dropped the PR silently.
detectPRURLs(bin/contributor-relay.js) skips any URL outside the task repo. That rule is right: a PR in another repo is never this task's PR. But it skipped the agent's own misplaced PR with no log and no message to the agent.What changed
Prompt (
contribute_task_prompt.go)gh pr create --repo <upstream> --head <your-login>:<your-branch>, with the login read viagh api user --jq .login. This is the same shape as the reference-repo path inpkg/scheduler/kickmessage.go.gh pr create --repo <upstream>.--basenamed earlier in the prompt. The prompt also says why: a reused clone may default to the fork.https://github.com/<upstream>/pull/.Relay (
bin/contributor-relay.js)detectForkPRURLsfinds a URL in<other-owner>/<same-name>that belongs to the agent: either the owner is the contributor's login (HIVE_CONTRIBUTOR_USERNAME), or the URL is on a verdict line. Another fork's PR seen while researching, or a PR in an unrelated repo, is still ignored.maybeRequestUpstreamPRForForkPRtells the agent once, with a WARN log and atask_progressnote: "That PR is in your fork, not in β¦gh pr create --repo <repo> --head <login>:<your-branch>". It runs at two points where the agent is not mid-turn:HIVE_VERDICT: complete β PR openedwith zero commits and the hub books a completed task β the PR-less verdict is never checked against the claimΒ #7862's vaguer "no PR exists" follow-up, and π bug(contribute): an agent can claimHIVE_VERDICT: complete β PR openedwith zero commits and the hub books a completed task β the PR-less verdict is never checked against the claimΒ #7862 then stays quiet.HIVE_VERDICT: complete β PR openedwith zero commits and the hub books a completed task β the PR-less verdict is never checked against the claimΒ #7862 and β¨ feature(contribute): let an omp agent address advisor notes that land after HIVE_VERDICT before the relay finalizesΒ #7759. One follow-up per task; after that, the backstop and finalization behave as before.pr_url.Docs:
src/docs/contributor-relay.md, plus a changelog fragment.Not in this PR
gh repo fork, clone reuse and base resolution are unchanged.task_completefield. The relay tells the agent while it can still act, instead of reporting the PR to the hub after the fact.Tests
contribute_task_pr_repo_test.gocovers fork and push access, each with and without a declared base. It checks for--repo <upstream>, the upstream PR URL prefix in the self-check,--head <login>:<branch>in the fork case only, and thatgh pr create --base <b>is kept.bin/contributor-relay.test.js):detectForkPRURLs: the agent's own fork PR, a case-insensitive login, a fork URL on a verdict line with no login, another fork's PR, an unrelated repo, the task repo, and thatdetectPRURLsstill never credits a fork URL.HIVE_VERDICT: complete β PR openedwith zero commits and the hub books a completed task β the PR-less verdict is never checked against the claimΒ #7862 follow-up, held while mid-turn, and the upstream PR booked after the agent reopens it.task_failed, and the next confirmed stall fails as before.Only
gofmt -lwas run for Go (AGENTS.md bans localgo test/go build/go vet); CI runs the Go tests.node bin/contributor-relay.test.jswas run locally: the three new tests pass. The same 78 tests also fail on unmodified v6 on this host for environment reasons (753/831 there, 756/834 with this change, identical failure list).No existing issue or PR covers this. Searches for "PR opened against fork", "gh pr create --repo", "fork instead of upstream", "set-default", "detectPRURLs" and three other phrasings found only #18198, the reference-repo fork path this follows.
π€ Generated with Claude Code
https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1