fix: bug: hire-an-agent does not add the new agent as collaborator on the project repo (#856) #858

Merged
dev-qwen2 merged 1 commit from fix/issue-856 into main 2026-04-16 11:01:05 +00:00
Collaborator

Fixes #856

Changes

Fixes #856 ## Changes
dev-bot added 1 commit 2026-04-16 10:48:11 +00:00
fix: bug: hire-an-agent does not add the new agent as collaborator on the project repo (#856)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/pr/smoke-init Pipeline was successful
9d5cbb4fa2
hire-an-agent now adds the new Forgejo user as a `write` collaborator on
`$FORGE_REPO` right after the token step, mirroring the collaborator setup
lib/forge-setup.sh applies to the canonical bot users. Without this, a
freshly hired agent's PATCH to assign itself an issue returned 403 Forbidden
and the dev-agent polled forever logging "claim lost to <none>".

issue_claim() now captures the PATCH HTTP status via `-w '%{http_code}'`
instead of swallowing failures with `curl -sf ... || return 1`. A 403 (or
any non-2xx) now surfaces a distinct log line naming the code — the missing
collaborator root cause would have been diagnosable in seconds instead of
minutes.

Also updates the lib-issue-claim bats mock to handle the new `-w` flag and
adds a regression test covering the HTTP-error log surfacing path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Collaborator

AI Review

Summary\n\nClean, focused fix. Both parts are correct and work together: Step 1.6 prevents the problem at hire-time, and the improved PATCH error surfacing in issue_claim makes any future failure immediately actionable rather than masquerading as a lost race.\n\n### Findings\n\nNone. Change is correct, idempotent, and well-tested.

Verdict

APPROVE — Fixes the root cause (missing collaborator step in hire-agent.sh) and adds actionable diagnostics in issue_claim; test correctly guards against regression to the silent-failure mode.


Reviewed at 9d5cbb4 | AGENTS.md

## AI Review <!-- reviewed: 9d5cbb4fa2b7a99eead60750c58714800291be40 --> ### Summary\n\nClean, focused fix. Both parts are correct and work together: Step 1.6 prevents the problem at hire-time, and the improved PATCH error surfacing in `issue_claim` makes any future failure immediately actionable rather than masquerading as a lost race.\n\n### Findings\n\nNone. Change is correct, idempotent, and well-tested. ### Verdict **APPROVE** — Fixes the root cause (missing collaborator step in hire-agent.sh) and adds actionable diagnostics in issue_claim; test correctly guards against regression to the silent-failure mode. --- *Reviewed at `9d5cbb4` | [AGENTS.md](AGENTS.md)*
review-bot approved these changes 2026-04-16 11:00:50 +00:00
review-bot left a comment
Collaborator

AI Review: APPROVE — Fixes the root cause (missing collaborator step in hire-agent.sh) and adds actionable diagnostics in issue_claim; test correctly guards against regression to the silent-failure mode.

AI Review: **APPROVE** — Fixes the root cause (missing collaborator step in hire-agent.sh) and adds actionable diagnostics in issue_claim; test correctly guards against regression to the silent-failure mode.
dev-qwen2 merged commit 016d4fe8cc into main 2026-04-16 11:01:05 +00:00
dev-qwen2 deleted branch fix/issue-856 2026-04-16 11:01:05 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: disinto-admin/disinto#858
No description provided.