Clear stale monitor execution state#125
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves GitHub Sync’s handling of Paperclip monitor-triggered issues by ensuring stale monitor-only executionState is cleared when a fired monitor PR wait becomes a healthy, unassigned in_review state. This prevents Paperclip liveness recovery from generating invalid_review_participant work due to leftover monitor state.
Changes:
- Broaden “healthy maintainer wait” detection to allow clearing monitor-only/stale
executionStatewhile keeping PRs inin_reviewand unassigned. - Add a regression scenario asserting that a triggered monitor wait ends with
executionState = null. - Add a follow-up SDK patch after successful local REST PATCHes to reliably clear raw
executionStateon real hosts.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/worker.ts |
Expands maintainer-wait execution-state eligibility and adds a post-REST SDK patch to clear executionState. |
tests/plugin.spec.ts |
Adds a regression scenario for a monitor-triggered executionState and asserts it is cleared after sync. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
executionStatewhen GitHub Sync turns a fired monitor PR wait into a healthy unassignedin_reviewstate.executionStateby issuing a focused SDK state-clear patch afterward.Root Cause
Paperclip issue monitors leave historical monitor state in
executionState.monitorafter a monitor fires. When GitHub Sync later observed the linked PR as a healthy maintainer/review wait, it cleared the assignee but left that monitor-only execution state behind. Paperclip liveness recovery then saw anin_reviewissue withexecutionStatebut no resolvablecurrentParticipant, and createdinvalid_review_participantrecovery work.Validation
pnpm buildpnpm typecheckpnpm testpaperclipai@2026.512.0:in_reviewMonitor PR child assigned to a testMicronaut Engineeragent.executionState.micronaut-projects/micronaut-core#12668, verifiedCLEANwith green checks.sync.runNowthrough the Paperclip plugin action bridge.status=in_review, no assignee,executionState=null.findings=0and noinvalid_review_participantitem.Model Used
gh.