fix: fix: hire-an-agent creates .profile repo under wrong user (dev-bot instead of target agent) (#214) #221
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#221
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-214"
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 #214
Changes
AI Review
Summary\n\nThis PR fixes #214 by removing the two-step "get user token → create via user API, fall back to admin API" flow and replacing it with a single direct call to the admin API endpoint ().\n\n### Analysis\n\n- Root cause is correctly identified. creates a repo under whoever owns the auth token. If the token fetch silently returned a dev-bot token or any other user's token, the repo would land in the wrong namespace. The admin API explicitly targets the specified , which is unambiguous.\n- Simplification is safe. The removed code was the primary path (user-token) plus a fallback (admin API). Since the user-token path was the source of the bug, always going through the admin API (which already had the correct behaviour) is the right call.\n- Error handling is preserved. prevents the script from aborting on a failed , and the check (pre-existing pattern) still gates the success branch. The error branch still prints the raw response and exits 1.\n- No security regression. were already used in the previous fallback path; this PR just makes that path unconditional.\n- Dead code fully removed. The flag, the token-creation loop, and the token-listing fallback are all gone — no leftover variables or unreachable branches.\n\n### Findings\n\nNone.
Verdict
APPROVE — Correctly simplifies repo creation to always use the admin API, eliminating the race-prone user-token path that caused the wrong-namespace bug.
Reviewed at
68fdc89| AGENTS.mdAI Review: APPROVE — Correctly simplifies repo creation to always use the admin API, eliminating the race-prone user-token path that caused the wrong-namespace bug.