Skip to content

fix(host): match a channel's pull request only among the repository's own branches - #641

Merged
iamnbutler merged 3 commits into
mainfrom
fix-pr-branch
Oct 22, 2026
Merged

iamnbutler merged 3 commits into
mainfrom
fix-pr-branch

Conversation

@iamnbutler

Copy link
Copy Markdown
Contributor

A channel's pull request now comes only from its own repository's branches. gh pr list --head=<branch> matches the branch name in every fork, so a fresh clone of octocat/Hello-World on master showed a stranger's fork PR (#11598) with Update PR and Close PR. The host now lists up to 30 candidates and keeps the newest one that isn't cross-repository.

Fixes #628. Map: ^715, ^692.

Smoke test on an isolated host (own ACE_HOME, port 4732, --loopback):

  • A channel on a fresh octocat/Hello-World clone (branch master) shows master and "No pull request" in Details, with no Update PR or Close PR. Before the fix, gh pr list --head=master returned the cross-repository #11598 first.
  • A channel on a clone of this PR's own branch shows this PR in Details.

Built in Ace

Made from Claude Code (a fix-train worker), not in Ace, because it was run headless as a parallel agent with its own isolated host. Gap tracked in the dogfooding meta issue, #5.

… own branches

Why: apps/host/src/github.ts#function pull | gh --head matches a branch name in any fork; only same-repository pull requests are a channel's
@iamnbutler
iamnbutler merged commit 704c647 into main Oct 22, 2026
1 check passed
@iamnbutler
iamnbutler deleted the fix-pr-branch branch October 22, 2026 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A new channel shows a stranger's pull request matched on branch master

1 participant