feat(yo61): allow per-repo dismiss_stale_reviews_on_push, off for homebrew-tap - #63
Conversation
…ebrew-tap homebrew-tap's publish-bottles.yaml pushes the bottle commit to the bump PR branch and then squash-merges it. With dismissal on, that push dismisses lastlight's approval — the approval the merge needs — and the merge fails on "At least 1 approving review is required". Re-approval lands ~40s after the workflow's retry window closes, and the automatic retry dies earlier still on a non-idempotent bottle upload (ReleaseAsset already_exists), so the release cannot recover on its own. First seen on homebrew-tap#104, the first release bump after eabc303 put the repo under the review policy. dismiss_stale_reviews_on_push was hardcoded in the shared ruleset catalog, so it could not be changed for one repo. Inject it from a variable instead — the same treatment bypass_actors, required_approving_review_count and require_last_push_approval already get — defaulting to true so the other nine repos plan identically. 2026-08-06-unifi-mcp-ci-only-gate rejected changing this fleet-wide; that default is preserved. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Plumbs dismiss_stale_reviews_on_push through as a per-repo variable following the exact existing pattern for bypass_actors/required_approving_review_count/require_last_push_approval, defaulting to true (unchanged fleet-wide behavior) and overriding to false only on homebrew-tap for a well-documented reason (release automation pushes a bottle commit after approval and merges it). The change is correctly scoped to the default_branch ruleset's pull_request block and does not touch the separate, unrelated branch_protection_rules_default.required_pull_request_reviews.dismiss_stale_reviews field. Comments, variable docs, and the decision record are thorough and consistent with the prior 2026-08-06 decision it explicitly preserves. No issues found.
Why
homebrew-tap's release pipeline cannot merge a release under the review policy it was brought under in #62.publish-bottles.yamlbuilds bottles, uploads them, then commits thebottle doblock to the bump PR branch and squash-merges it. That push dismissesyo61-lastlight[bot]'s approval — the approval the merge depends on — so the merge fails:lastlight re-approved ~40s after the workflow's ~35s retry window closed. The automatic retry then failed earlier still, at
brew pr-upload, withValidation Failed: ReleaseAsset already_exists— the upload step is not idempotent, so the pipeline cannot recover on its own.Seen on homebrew-tap#104, the first release bump after
eabc303setrequired_approving_review_count: 1on the repo. It is structural: every release bump pushes after review, so every release fails the same way.What changed
dismiss_stale_reviews_on_pushwas hardcoded inmodules/github-repo/data/rulesets.yaml, so it could not be varied per repo. It is now injected from a variable — the same treatmentbypass_actors,required_approving_review_countandrequire_last_push_approvalalready get, and the reason the in-code comment gives for keeping such fields out of the YAML.modules/github-repo/variables.tf— newdefault_branch_ruleset_dismiss_stale_reviews_on_push, defaulttruemodules/github-repo/data.tf— injected into thedefault_branchruleset'spull_requestblockmodules/github-repo/data/rulesets.yaml— hardcoded value removedmodules/org/{variables,main}.tf— org default + per-repo YAML lookupdata/yo61/homebrew-tap.yaml— setfalse, with a comment pointing at #104Because the default matches the removed literal, the other nine repos should plan as no-ops. Worth confirming in the plan before apply — I could not run
task plan(noTF_HTTP_ADDRESSin a non-interactive shell).On the earlier decision
decisions/2026-08-06-unifi-mcp-ci-only-gate.mdexplicitly rejected settingdismiss_stale_reviews_on_push: falsein the module default, and recorded thattruestays the fleet-wide default. That is preserved here — the default is unchanged and onlyhomebrew-tapdeviates. Rationale, and the two alternatives considered (dropping the tap's review count to 0 per the unifi-mcp shape; or fixing the workflow's retry instead), are indecisions/2026-08-12-homebrew-tap-dismiss-stale-override.md.Verification
terraform validate— successterraform fmt -recursive -check— cleanprek run --files <changed>— all hooks pass, includingterraform_docsand the repo-YAML name checkquality/criteria.md("every key states a deviation from the module default"):falsevs module defaulttrue✓task planwith the Stategraph backend env.🤖 Generated with Claude Code