fix: hire-an-agent creates .profile repo under wrong user (dev-bot instead of target agent) #214
Labels
No labels
action
backlog
blocked
bug-report
in-progress
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
tech-debt
underspecified
vision
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#214
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Problem
When hiring an agent that already exists,
hire-an-agentcannot generate a user token becauseuser_passis unbound (the bot's password is not stored). It falls back to the admin token (FORGE_TOKEN = dev-bot). It then creates the .profile repo via:This creates the repo under the authenticated user (dev-bot), not the target agent. Result:
dev-bot/.profileis created instead ofgardener-bot/.profile.The clone then fails because it looks for
gardener-bot/.profile.gitwhich doesn't exist.Observed output
Proposed solution
Use the Forgejo admin API to create repos under a specific user:
This requires the token to belong to a site admin. If FORGE_TOKEN is not an admin token, the command should error with a clear message.
Also fix the
user_passunbound variable — for existing users where the password is unknown, skip the token generation step cleanly instead of hittingset -u.Affected files
Acceptance criteria
.profilerepo is created under the target agent's namespace, not the authenticated userdev-bot referenced this issue2026-04-05 16:11:28 +00:00