fix: fix: hire-an-agent does not generate or store FORGE_<AGENT>_TOKEN for new users (#237) #244
No reviewers
Labels
No labels
action
backlog
blocked
in-progress
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: johba/disinto#244
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-237"
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 #237
Changes
ab1a43da35to8f193eb40bAI Review
Summary\n\nAdds Step 1.5 to
disinto_hire_an_agent: creates a Forge API token for the hired user via basic auth and persists it to.envunderFORGE_${ROLE}_TOKEN.\n\n### Findings\n\n- infobin/disinto:2747-2751: The sed replacement uses|as delimiter butescaped_tokenonly escapes&,/, and\. Forgejo tokens are hex SHA1 strings so a literal|in the token value is impossible in practice — not a real risk.\n\n- infobin/disinto:2704-2711: Pre-existing edge case (not introduced here): when user creation fails and the user is confirmed to already exist,user_passholds a freshly-generated random string that does not match the actual user password. Token creation in Step 1.5 will fail in this rare race condition, but the graceful warning path handles it correctly.\n\n### Checklist\n\n- Token is never echoed to stdout — only the variable name is logged. Good.\n-.envappend creates the file if absent (>>behaviour). Correct.\n- Timestamp suffix fallback on name collision is a good defensive touch.\n-export "${token_var}=${agent_token}"is safe bash indirect-export syntax.\n- No secrets injected into issue bodies or PR descriptions.\n- No external actions outside of local Forge — AD-006 not triggered.Verdict
APPROVE — Correctly generates and stores the Forge API token for new/existing agent users; logic is sound and failures are handled gracefully.
Reviewed at
8f193eb| AGENTS.mdAI Review: APPROVE — Correctly generates and stores the Forge API token for new/existing agent users; logic is sound and failures are handled gracefully.