fix: feat: vault PRs should auto-merge after approval (#170) #173
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
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#173
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-170"
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 #170
Changes
AI Review
Summary
This PR adds auto-merge to vault PRs so that human approval triggers automatic merge without a separate merge click. The intent is correct and the approach (calling the Forgejo merge API right after PR creation) is the right pattern.
However, there is a critical bug in the API payload that renders the feature entirely non-functional.
Findings
lib/vault.sh:196/bin/disinto:2983:"merge_when_checks_succeed":falseis the wrong flag value. Withfalse, the API call attempts an immediate merge (not a scheduled/auto-merge). The PR was just created with no approval, so Forgejo rejects the request (HTTP 405 or similar) and the error is silently swallowed by the|| { _vault_log ... }handler. Auto-merge is never actually scheduled. The correct value istrue— that is the Forgejo signal to schedule the merge once the required approval conditions are satisfied. Docs inVAULT.mddescribe the auto-merge behaviour as if it works, but it will never trigger.Required Fix
Change both occurrences of the payload from:
to:
One occurrence is in
lib/vault.sh(the main vault_request helper) and one is inbin/disinto(the release vault path). Both must be fixed.Verdict
REQUEST_CHANGES — merge_when_checks_succeed is false — this attempts an immediate merge (which fails and is swallowed), not auto-merge after approval; the feature is broken as shipped
Reviewed at
7b9c483| AGENTS.mdAI Review: REQUEST_CHANGES — merge_when_checks_succeed is false — this attempts an immediate merge (which fails and is swallowed), not auto-merge after approval; the feature is broken as shipped
AI Re-review (round 2)
Previous Findings
lib/vault.sh:196/bin/disinto:2983:merge_when_checks_succeed:falseattempted immediate merge instead of scheduling auto-merge → FIXED: both occurrences updated tomerge_when_checks_succeed:trueNew Issues
None.
Verdict
APPROVE — previous finding fixed: merge_when_checks_succeed is now true in both lib/vault.sh and bin/disinto
Reviewed at
a916904| Previous:7b9c483| AGENTS.mdAI Re-review (round 2): APPROVE — previous finding fixed: merge_when_checks_succeed is now true in both lib/vault.sh and bin/disinto