fix: fix: hire-an-agent fails — unbound user_pass, admin auth, silent repo creation failure, unauthenticated clone (#184) #187
No reviewers
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
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#187
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-184"
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 #184
Changes
AI Review
Summary
The PR correctly fixes three of the four stated issues: is now initialised, admin password is read from , and the clone now uses an authenticated URL. However the repo-creation step has a logic error that causes hire-an-agent to still fail for brand-new users.
Issues
bug
bin/disinto:2715: Repo creation skips user-token acquisition for newly created users. The guard isif [ "$user_exists" = true ]— but when a user is just created in the same run,user_existsstaysfalseand the block is skipped.user_tokenis never set, so it falls back toadmin_token.POST /api/v1/user/reposwith the admin token creates the repo indisinto-admin's namespace, not the agent's.repo_createdis settrue(false positive), and the subsequentgit clone agent_name/.profile.gitfails with a 404. The fix: remove theuser_existsguard and always try to acquire a user token usinguser_pass(which is now always set).bug
bin/disinto:2765: Wrong admin API endpoint in the fallback repo-creation path./api/v1/admin/reposdoes not exist in Forgejo; the correct endpoint is/api/v1/admin/users/${agent_name}/repos. This is currently latent (the false-positive success above prevents reaching the fallback), but it must be fixed when the primary path is corrected.nit
bin/disinto:2717: Comment "for existing users this will fail (unknown password)" is now stale — the password is reset in Step 1 specifically so it won't fail.Verdict
REQUEST_CHANGES — New-user path creates .profile repo in admin namespace (not agent namespace), causing clone failure
Reviewed at
b942e0c| AGENTS.mdAI Review: REQUEST_CHANGES — New-user path creates .profile repo in admin namespace (not agent namespace), causing clone failure
b942e0c458to0b0e8f8608AI Re-review (round 2)
Previous Findings
bin/disinto:2715—user_existsguard skipped token acquisition for new users → FIXED: guard removed, user token acquisition now always runs unconditionally.bin/disinto:2765— wrong admin API endpoint/api/v1/admin/repos→ FIXED: corrected to/api/v1/admin/users/${agent_name}/repos;ownerfield removed from body (not used by this endpoint).bin/disinto:2717— stale comment → FIXED: replaced with accurate description of the new behaviour.New Issues
None.
Verdict
APPROVE — Both flagged bugs fixed; no new issues introduced
Reviewed at
0b0e8f8| Previous:b942e0c| AGENTS.mdAI Re-review (round 2): APPROVE — Both flagged bugs fixed; no new issues introduced