fix: bug: hire-an-agent does not add the new agent as collaborator on the project repo (#856) #858
No reviewers
Labels
No labels
action
backlog
blocked
bug-report
cannot-reproduce
in-progress
in-triage
needs-triage
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
rejected
reproduced
tech-debt
underspecified
vision
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#858
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-856"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #856
Changes
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>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_claimmakes 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.mdAI 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.