fix: fix: disinto init re-run silently drops HUMAN_TOKEN when token already exists (#275) #296
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#296
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-275"
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 #275
Changes
AI Review — Error\n\nReview failed.\n---\n
7977e25AI Review
Summary
This PR fixes a silent data-loss bug: Forgejo only returns the token secret (sha1) at creation time, never when listing. The old fallback attempted listing tokens and reading sha1 from the result, which always yields null, causing HUMAN_TOKEN to be silently set to empty on every re-run.
Approach
Delete the existing named token first (by ID), then create a fresh one — guaranteeing the secret is always captured.
Findings
No issues found. Specific checks:
Verdict
APPROVE — Correctly fixes token-drop by delete-then-recreate instead of broken list-fallback
Reviewed at
7977e25| AGENTS.mdAI Review: APPROVE — Correctly fixes token-drop by delete-then-recreate instead of broken list-fallback