Task merge, close and issue tools use the default forge, not the repository's connection #1847

Closed
opened 2026-11-10 08:06:58 +00:00 by sam · 2 comments
Owner

Merging a task's PR on a repository bound to a non-default forge connection fails. Task 462 on sam/archie (repository policy connection gitea) opened PR #1846 on Gitea; Merge then failed with forge merge pull request: merge pull request sam/archie#1846: GitHub 404 Not Found. The chat agent's issue_list for sam/archie fails the same way.

Cause: archied keeps one forge client resolved for connection "default" (openForge/reopenForge in internal/app/archied/bootstrap.go). mergePR, closePR and closeIssue in internal/app/archied/task_actions.go, issueForge() (chat issue tools) and daemon.Forge all use it. Clone and push already resolve per repository through repositoryBinding and openRepositoryConnection.

Done when task actions and the chat issue tools resolve the forge from the task's repository binding, and merging a Gitea PR from the task page succeeds while a GitHub connection is the default.

Merging a task's PR on a repository bound to a non-default forge connection fails. Task 462 on sam/archie (repository policy connection `gitea`) opened PR #1846 on Gitea; Merge then failed with `forge merge pull request: merge pull request sam/archie#1846: GitHub 404 Not Found`. The chat agent's `issue_list` for sam/archie fails the same way. Cause: archied keeps one forge client resolved for connection `"default"` (`openForge`/`reopenForge` in `internal/app/archied/bootstrap.go`). `mergePR`, `closePR` and `closeIssue` in `internal/app/archied/task_actions.go`, `issueForge()` (chat issue tools) and `daemon.Forge` all use it. Clone and push already resolve per repository through `repositoryBinding` and `openRepositoryConnection`. Done when task actions and the chat issue tools resolve the forge from the task's repository binding, and merging a Gitea PR from the task page succeeds while a GitHub connection is the default.
Author
Owner

Fixed in 0e889977c on main: merge, close-PR, close-issue and the chat issue RPC resolve the forge through the repository's binding and connection, in the task's org. Regression test TestMergeUsesRepositoryConnection fails on the old code. task check passes. Not deployed yet, so the live merge from the task page is unverified.

Fixed in 0e889977c on main: merge, close-PR, close-issue and the chat issue RPC resolve the forge through the repository's binding and connection, in the task's org. Regression test TestMergeUsesRepositoryConnection fails on the old code. task check passes. Not deployed yet, so the live merge from the task page is unverified.
sam added the bug label 2026-11-12 15:52:54 +00:00
Author
Owner

Fixed by 0e889977c, on main and deployed to carina. Checked by reading the code: mergePR, closePR and closeIssue in task_actions.go and the issuerpc server (chat issue tools) now resolve the forge through repositoryForge, from the repository's connection. Not verified live by merging a Gitea PR while GitHub is the default connection.

Fixed by 0e889977c, on main and deployed to carina. Checked by reading the code: mergePR, closePR and closeIssue in task_actions.go and the issuerpc server (chat issue tools) now resolve the forge through repositoryForge, from the repository's connection. Not verified live by merging a Gitea PR while GitHub is the default connection.
sam closed this issue 2026-11-14 03:19:11 +00:00
sam added the task label 2026-11-14 14:45:21 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1847