Repository navigation
fix(sep-automation): close SEP pull requests after 180 days without progress - #3539
Open
claude[bot] wants to merge 3 commits into
Open
claude[bot] wants to merge 3 commits into
claude[bot] wants to merge 3 commits into
Conversation
…rogress Add one inactivity rule for every open SEP pull request, draft or ready for review: a single warning after 150 days without progress, then close at 180 days once the warning has been up for 30 days. No label or status is applied. Progress is a commit, a submitted review or a comment from a non-bot account, read from the issue timeline, so the bot's own pings and the mentioned/subscribed events they create no longer reset the clock. Draft pull requests get only this rule. The lifecycle workflow runs one job at a time per pull request.
Apply the inactivity rule only to pull requests that carry the SEP or wg-support-needed label. A pull request the detector matched only because its title contains "SEP" gets no notice and is not closed. Detection and the other code paths are unchanged.
dend
approved these changes
Nov 11, 2026
dend
marked this pull request as ready for review
November 27, 2026 20:09
This branch has not been deployed
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.
Requested by David Soria Parra · Slack thread
On hold: do not merge. The 180-day inactivity close and the
dormantstatus are going into a separate Process SEP. This pull request waits until the Core Maintainers decide that SEP.Before: Since #3535 the SEP lifecycle bot never closes anything. A quiet SEP pull request only gets reminders: a "Draft Check-in" after 90 days and a "Maintainer Activity Check" every two weeks. Those reminders also hid how quiet a pull request was, because the bot's own @mention counted as activity from the person it mentioned. #2343 is an example: its last commit, review or human comment was 252 days ago, and it has only collected bot pings since.
After: Every open pull request that carries the
SEPlabel or thewg-support-neededlabel follows one rule, whether it is a draft pull request or ready for review, and whatever its status.acceptedandin-reviewpull requests are covered too. After about 150 days without progress the bot posts one "Inactivity Notice". After about 180 days without progress the bot closes the pull request with one short comment that links the SEP guidelines. The close only happens after a notice that is at least 30 days old. The bot adds no label and no status. Progress is a new commit, a submitted review or a comment from a person. Draft pull requests get this inactivity rule and no status-based pings. A pull request that merely has "SEP" in its title, without either label, is never warned or closed.How
INACTIVITY_WARNING_DAYS = 150andINACTIVITY_CLOSE_DAYS = 180insrc/rules.ts, read throughsrc/config.tsand overridable by environment variables of the same names.src/processor.tsfor pull requests that carry theSEPorwg-support-neededlabel (SEP_LABELand the newWG_SUPPORT_NEEDED_LABELinsrc/sep/detector.ts). Status labels do not matter, sodraft,in-review,acceptedanddeferredpull requests are all covered. Detection itself is unchanged: the bot still treats "SEP" in a title as a SEP for its other code paths, but the inactivity rule skips a pull request that matched by title only, such as docs: working-group sponsored SEP process #3529, docs(community): align Auth IG charter with SEP sponsorship guidelines #3531 and this one. SEP issues are not touched.progressTimeandanalyzeInactivityinsrc/sep/analyzer.ts): the bot now reads the issue timeline through a newgetTimelineinsrc/github/client.ts.committedentries count by committer date,reviewedandcommentedentries count unless they come from a bot account or carry the bot's comment marker, andreopenedrestarts the clock so that a reopened pull request is not closed again on the next run. Everything else is ignored, including thementionedandsubscribedevents that the bot's own pings create. The clock starts at the pull request's creation.SEPItemgetsisDraftfrom the API'sdraftfield. A draft pull request gets the inactivity rule and skips the status-based pings (draft check-in, maintainer activity check, accepted reminder), even if it carries a status label. Today that changes SEP-2343: Clarify that elicitation requires authorization for remote servers #2343 only. Noready_for_revieworconverted_to_drafttrigger is added, because nothing in the code reacts to those events and the weekly sweep reads the flag.handleInactivityinsrc/actions/ping.tscloses first and comments second, so a failed close is retried without a duplicate comment. Therun-automationjob insep-lifecycle.ymlgets a concurrency group per pull request, so two label events cannot post the same notice twice. The Discord summary section "Marked Dormant" becomes "Inactive Pull Requests". The maintainer activity comment no longer talks about sponsoring.markDormant,createDormantComment, thedormantstate) andTransitionHandler. Removing them with their tests is about 500 lines of pure deletion and is left for a separate follow-up pull request to keep this one reviewable.Testing
npm run build,npm run typecheckandnpm testpass intools/sep-automation(8 files, 62 tests, 21 of them new intest/unit/inactivity.test.ts).npm run preppasses at the repo root. The new tests cover: the bot's own pings and other bots not counting as progress,mentionedandsubscribedbeing ignored, the notice at 150 days, the close at 180 days for a draft and a ready pull request, the clock restarting on a commit, review, human comment or reopening, no second notice in the same quiet period, no close without a 30-day-old notice, a title-only match without either label being left alone at 150 and at 180+ days, awg-support-neededpull request without theSEPlabel being covered, dry run, and issues being left alone.I also ran the built processor read-only, in dry run, against the 32 open pull requests the bot detects today. The rule covers 27 of them. Two would get the notice on the first run (#2343 at 252 days and #2293 at 176 days), and none would be closed. It skips five that carry neither label: #3529, #3531 and this pull request, plus #2624 and #2633, which are SEP pull requests without labels and need the
SEPorwg-support-neededlabel to be covered.Follows #3535 and matches the wording in #3529: "SEP pull requests that have had no progress for about 180 days will be closed."
This PR was drafted with AI assistance (Claude Code).