fix(server): do not report a merged implementation as abandoned #251
No reviewers
Labels
No labels
Agent
Ignore
Agent
In Progress
Agent
Planned
Agent
Planning
Agent
Ready
Agent
Triage
Compat
Breaking
Kind
Bug
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
Security
Kind
Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lucas/omp-deck!251
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/issue-250-followup-close-not-abandoned"
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?
Closes: #250
What changed
hasMergedPull(repo, sessionId, exceptNumber)indb/forgejo-post-merge.ts: true when the session owns aforgejo_post_mergerecord for another pull request, i.e. it already merged one. No schema change — a record in either state proves the merge.handleLifecycle, an unmerged close of an agent PR whose session already merged a pull request archives the session and finishes the row asarchived: follow-up closed without merge. Nothing is posted, no scrap row is queued, soqueueScrap/buildScrappedTurn/handleAbandonstay exactly as they are for the genuine case.forgejo_abandon_implementationis denied once the session has a merged pull request; the denial and the implementer system prompt both point a stuck agent atforgejo_create_issue.finishMergedImplementationis now the single ending for an implementation that landed: it removes the repository'simplementation.progress_labelfrom the issue, then archives. Wired into the green post-merge resolve, the sweep's green/no-CI and pending-past-timeout verdicts, the merged-but-unmonitored lifecycle fall-through, and the new follow-up-close branch. Label problems are logged only — the implementation is merged, so no human decision waits on the label. Previously the abandon reset was the only code that ever removed that label, so every implementation that merged kept it forever.Verification
bun test apps/server/src— 1284 pass, 0 fail (includes 4 new tests: thehasMergedPullcases, the silent follow-up archive, the progress-label removal on a merged implementation, and the merged-abandon denial plus its prompt bullet).bun run typecheck— clean.Note
Step 6 of the plan assumes a resumed implementer session rebuilds its system prompt, so the changed bullet reaches the post-merge turn. That assumption is not verified here; the behaviour is correct either way, because the tool denial carries the same instruction.