Make block-pr-poller's no-skill fallback work without the Event Streams preview
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 76/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- bash, github, shell
- Bereich
- developer-experience, tooling
Rechercherichtung
Lies zuerst plugins/guardrails/hooks/block-pr-poller.sh und die vorhandenen Guard-Tests; prüfe, wie beide Ablehnungen in Zeile 29 und 85 ihre Meldungen erstellen. Aktualisiere die Fallback-Hinweise an beiden Stellen und füge einen Test hinzu, der den Text prüft und dabei die aktuellen Guard-Entscheidungen beibehält. Führe zum Abschluss die Guard-Tests aus und aktualisiere den Changelog-Eintrag für guardrails.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Problem
When block-pr-poller.sh refuses a sleep-and-poll loop over a pull request, its only fallback for a
session without the source-control skill is gh event listen (plugins/guardrails/hooks/block-pr-poller.sh:17,
used in the refusal at :85 and in the event-set refusal at :29). gh event listen needs GitHub's
Event Streams preview. On an account without it, the command the message gives exits at once:
event subscriptions are in preview and not enabled for this account: HTTP 403: Event subscriptions are not enabled for this account (https://api.github.com/event-subscriptions)
So on such an account the hook's no-skill path is a dead end, and the session has to invent a third
way. The reported session used gh run watch <run-id> --exit-status --interval 120, which watches one
workflow run but not review threads, labels or other check suites.
Evidence
- Verified on
origin/mainthis pass: the hint text atblock-pr-poller.sh:17and both refusals
(:29,:85) namegh event listenas the only non-skill wait, with no note that it needs the
preview. - Reported, not reproduced here (2026-12-03, a session on an account without the preview): the
refusal of awhile true; gh pr checks <n>; sleep 60Monitor command, then the 403 above from
gh event listenrun with the exact--eventlist and--timeout 30m. ghitself prints a hint ongh pr viewsaying event subscriptions "are in preview and may not be
enabled for your account", so the preview gate is documented upstream./source-control:pull-request monitordoes not depend on the preview:monitor-poll.shfalls back
to--intervalpolling whengh eventis absent, returns an error, or fails to attach
(plugins/source-control/CHANGELOG.md:589). Inferred from that entry, not run here against an
account without the preview.- Inferred, not verified: that every account without the preview gets the same 403.
Proposed approach
Change the hint so the no-skill path still works without the preview. Recommended: keep
gh event listen as the first choice, and add that if it fails with "not enabled for this account",
the session should wait on CI with gh run watch <run-id> --exit-status run in the background, then
read the checks, labels and review threads once when it ends. Alternatives:
- Say
/source-control:pull-request monitoris the only supported path (simplest, but leaves a
session without that plugin with nothing). - Detect the preview in the hook (an API call per refused command; costs latency on a hot guard, so
not recommended).
Files: plugins/guardrails/hooks/block-pr-poller.sh, its tests, the guardrails changelog fragment.
Acceptance criteria
- The refusal at
block-pr-poller.sh:85names a wait that works on an account without the Event
Streams preview, or states that the source-control monitor is the only path. - The event-set refusal at
:29gets the same treatment. - No verdict changes: every command blocked today is still blocked and every command allowed
today is still allowed (existing guard tests pass unchanged apart from message text). - A test asserts the new fallback text is in the refusal.
Constraints and gotchas
- Message-only change; never loosen the guard (owner rule for guardrails changes).
- The suggested fallback must itself pass
block-pr-poller.shandblock-foreground-wait.sh
(a backgroundedgh run watchis allowed today; re-check before naming it). - Test guards by feeding command text as JSON on stdin only.
Context
Source: local handoff item 20261203-063155-guardrails-pr-poller-fallback-unavailable.md (retired into
this issue). Related: #20138 (closed; named the fixed event set), #19450 (closed; source-control
monitor's 403 fallback), #20298 (open; per-PR event streams in the multi-PR watch).
- Vorherrschende Sprache
- Shell
- Sterne
- 22
- Forks
- 2
- Ø Merge
- 3 Std. 4 Min.
- Gemergte PRs (30 T.)
- 941
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus melodic-software/claude-code-plugins
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
melodic-software/claude-code-plugins#20969 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
melodic-software/claude-code-plugins#20960 · 5 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
melodic-software/claude-code-plugins#20942 · 5 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
melodic-software/claude-code-plugins#20937 · 5 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 79/100
melodic-software/claude-code-plugins#20905 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in melodic-software/claude-code-plugins
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
buildkite/elastic-ci-stack-for-aws#2050 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 76/100
ChurchCRM/docs.churchcrm.io#350 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
boyingliu01/xp-gate#906 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 63/100
rancher/stackstate-product-docs#516 ·
Maintainer antworten meist innerhalb von 1 Tag