threadwatch: fire-once merge alert for pinned PRs (PR-merge transition detection)#236
Open
MoltyCel wants to merge 1 commit into
Open
threadwatch: fire-once merge alert for pinned PRs (PR-merge transition detection)#236MoltyCel wants to merge 1 commit into
MoltyCel wants to merge 1 commit into
Conversation
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.
Problem. ThreadWatch pins PRs (e.g. w3c-cg/ai-agent-protocol#40 in #234), but the trigger that matters for a pinned PR is the MERGE event — that is when a deferred own-task (publish the VC-serialization annex) becomes live. Merge state was already detected (a merged pinned PR renders a persistent
🟣 MERGEDroster label viaanalyze_pinned), but there was no distinct, fire-once transition alert — a merge just silently changed a label that is easy to miss and never says "the deferred task is now unblocked".Change (additive, no bucket/classify logic touched).
build_roster_entry: for a closed pinned PR, confirm merge via the canonical pulls API (GET /repos/{repo}/pulls/{n}→merged/merged_at). Only closed PRs incur the extra call; open PRs cannot be merged. This distinguishes MERGED from closed-unmerged authoritatively.analyze_pinned: roster entry now carriesis_pr/merged/merged_at.main: after building the roster, compute fire-once merge alerts using a newmerged_announcedstate map instate/threadwatch.json; the guard is persisted immediately so it fires exactly once per pinned PR.fmt_report: renders a distinct block at the very top:🔀 <key> MERGED — <note>.Verification (no network). Unit-exercised
analyze_pinned/fmt_report+ the fire-once loop:merged=True,🟣 MERGED, alert fires run 1 and is silent run 2 (idempotent);merged=False,⬛ CLOSED(no alert);merged=False;🔀 PINNED PR MERGEDat top with the pin note; absent when no merges.py_compileclean.Once this + #234 are live, #40 merging by a maintainer will surface a one-time
🔀 w3c-cg/ai-agent-protocol#40 MERGEDalert = the go-signal for the VC-serialization annex.