fix: hire-an-agent admin token collision, wrong repo namespace, clone auth failure #190
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#190
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
hire-an-agentstill fails at Step 3 (clone), and the repo creation in Step 2 creates the.profilerepo under the wrong user. This is a follow-up to #184.Bug 1: Admin token name collision on re-run
The function creates a token named
temp-tokenfor the admin user. On re-run, this name already exists, the POST returns 409, and the fallback listing does not returnsha1(Forgejo only returnssha1at creation time). Result:admin_tokenis empty.Fix: use a timestamp suffix (e.g.
temp-token-$(date +%s)) or delete the existing token first, same pattern used for bot tokens insetup_forge().Bug 2:
.profilerepo created under wrong userWhen
admin_tokenis empty (due to bug 1),user_tokenfalls back toFORGE_TOKEN(dev-bot). The admin API call at line ~2762:...returns 403 (dev-bot is not an admin). The earlier fallback at line ~2662 (
POST /user/repos) creates the repo under dev-bot's namespace instead ofdev-qwen.After the run,
repos/searchshowsdev-bot/.profileinstead ofdev-qwen/.profile.Fix: ensure the admin API path always uses an actual admin token. When the admin token is obtained, store it separately from the user token fallback chain.
Bug 3: Clone URL uses wrong auth
Step 3 clones the repo but the authentication fails. Even if the repo existed under the right user, the clone URL needs to use a valid token for that user.
Steps to reproduce
Files
bin/disinto—disinto_hire_an_agent(), admin token creation (~line 2650), repo creation (~line 2662+2762), clone (~line 2690)Blocked — issue #190
review_timeout2026-04-03T16:33:31Z