fix: hire-an-agent fails — unbound user_pass, admin auth, silent repo creation failure, unauthenticated clone #184
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#184
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
disinto hire-an-agenthas several bugs that prevent it from working end-to-end, both on first run and re-run.Bug 1:
user_pass: unbound variablewhen user already existsWhen the agent user already exists (e.g. from a previous partial run), step 1 is skipped but
user_passis never set. Lines 2707 and 2714 reference${user_pass}which crashes withset -u:The password is only generated in the creation branch. On re-run, it needs to either be persisted to
.env(likeFORGE_ADMIN_PASS) or reset via the admin CLI.Bug 2:
_FORGE_ADMIN_PASSnot read from.envThe function uses
_FORGE_ADMIN_PASS:-adminas the fallback admin password, but_FORGE_ADMIN_PASSis only set as a shell variable duringsetup_forge()in the same init session. Whenhire-an-agentis called standalone, the variable is unset and the fallback"admin"is wrong (the real password is in.envasFORGE_ADMIN_PASS).Fix: read
FORGE_ADMIN_PASSfrom.envat the top of the function, same pattern assetup_forge()does after #158.Bug 3:
.profilerepo creation reports success but repo does not existStep 2 prints "Created repo 'dev-qwen/.profile'" but the repo is not actually created on Forgejo. The API call likely fails silently (same class of bug as #164 — wrong endpoint or swallowed errors). After the run,
repos/searchreturns onlyjohba/harb.Bug 4: Clone fails because no auth credentials
Step 3 tries to clone
http://localhost:3000/dev-qwen/.profile.gitwithout authentication. Even if the repo existed, the clone would fail for private repos. The clone URL should include the token, e.g.http://dev-qwen:<token>@localhost:3000/dev-qwen/.profile.git.Steps to reproduce
Files
bin/disinto—disinto_hire_an_agent()/hire_an_agent()function, around lines 2680-2730