You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(gate): never close a PR for visual evidence the pipeline cannot produce (#9881)
`screenshotTableGate.action: "close"` closed PRs when no visual evidence was found.
Correct when evidence is merely absent; wrong when it was never obtainable. A repo
with `review.visual.enabled` but no preview deploys at all (JSONbored/awesome-claude)
exhausts its poll budget, never sets visualCaptureSatisfiedSha, and every contributor
PR touching a visual-scoped path is closed one-shot -- for evidence no contributor
action could ever supply, against a misconfiguration nobody was told about.
The proof was already in the capture: build state `absent` means no preview check-run
was found AT ALL, and the file already noted this was "confirmed live on a repo whose
UI has no preview-deploy CI configured". Paired with a spent poll budget, that
distinguishes "no pipeline" from a late deploy or a renderer blip, which is exactly
the distinction the close was missing.
The violation is UNCHANGED -- the PR really does lack visual evidence and the finding
still says so. Only enforcement degrades, and the contributor-visible reason names
the maintainer-side remedy, since no contributor action can resolve it.
Marked per head SHA like its siblings, so a later push re-arms the requirement and a
repo that gains preview deploys stops matching on its very next commit.
/** #9881: the reason attached when enforcement is degraded. Stated in the contributor-visible comment, so
405
+
* the PR author learns the gate could not be satisfied here rather than being left to guess. */
406
+
exportconstCAPTURE_UNOBTAINABLE_REASON=
407
+
"This repository has `review.visual.enabled` but produces no preview deployment, so the bot cannot capture the AFTER screenshot — the screenshot-table requirement is reported here but not enforced. A maintainer needs to either enable preview deploys or set `requireScreenshotTable.action: advisory`.";
408
+
409
+
/**
410
+
* The gate, with #9881's enforcement degrade applied.
411
+
*
412
+
* The violation itself is decided by the pure evaluator below and is UNCHANGED by the degrade: a PR with no
413
+
* visual evidence still has no visual evidence, and the finding still says so. What changes is whether that
414
+
* finding may be acted on. When the bot has proved the repo cannot produce a capture at all, a CLOSE would
415
+
* punish a contributor for a maintainer-side pipeline gap that no contributor action can close.
0 commit comments