fix: disinto init re-run silently drops HUMAN_TOKEN when token already exists #275
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#275
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?
Flagged by AI reviewer in PR #274.
Problem
In
bin/disintosetup_forge(), the admin token was fixed (PR #274) to delete-then-recreate so the sha1 is captured. However the human token fallback at lines 791–797 still uses the old broken pattern:Forge/Forgejo does not return
sha1in token list responses — only at creation time. So on a re-run whendisinto-human-tokenalready exists, the create call returns 409 (token name collision), the fallback listing returns an empty sha1, andHUMAN_TOKENis silently not saved/updated.Fix
Apply the same delete-then-recreate pattern used for the admin token in PR #274: look up the token by name, delete it if it exists, then create fresh.
Auto-created from AI review
Affected files
bin/disinto(lines ~791–797, insidesetup_forge())Acceptance criteria
disinto initon an existing box correctly savesHUMAN_TOKEN(no silent empty)Blocked — issue #275
no_push2026-04-06T12:14:05ZDiagnostic output