Skip to content

chore: add fleet-wide no-op approve-step remediation scripts - #39

Merged
smartwatermelon merged 2 commits into
mainfrom
claude/chore-fleet-approve-remediation-scripts-e8fa77d8
Aug 3, 2026
Merged

chore: add fleet-wide no-op approve-step remediation scripts#39
smartwatermelon merged 2 commits into
mainfrom
claude/chore-fleet-approve-remediation-scripts-e8fa77d8

Conversation

@smartwatermelon

Copy link
Copy Markdown
Owner

Summary

Implements the remediation plan from #21's audit as two operator-run scripts, so the fleet-wide fix doesn't require token-burning agent supervision per repo.

  • scripts/drop-noop-approve-step.sh — clones each of the 26 affected repos, removes the dead gh pr review --approve step from dependabot-auto-merge.yml (no repo in either org requires an approving review, so the step never did anything), and opens one real PR per repo. Nothing is merged automatically.
  • scripts/generate-settings-plan.sh — writes (does not execute) the gh api commands to flip can_approve_pull_request_reviews to false for all 28 candidate repos, preserving each repo's current default_workflow_permissions. The operator reviews and runs the output by hand.

Both scripts are macOS-only (documented), preflight-check gh auth status, and fail loudly rather than silently on partial failures.

Related: #21 (audit), #35 (pre-commit review-loop process issue filed during this PR's development), #36/#37/#38 (non-blocking findings auto-filed by pre-push codebase review — minor comment/clarity fixes, already partially addressed).

Test plan

  • bash -n and shellcheck -S info clean on both scripts (done locally)
  • generate-settings-plan.sh dry-run produces a correct, reviewable plan (done locally against live repos)
  • Operator runs drop-noop-approve-step.sh against the real fleet and confirms PRs open cleanly
  • Operator reviews and runs the generated settings-plan output separately

smartwatermelon and others added 2 commits August 3, 2026 14:15
Adds two operator-run scripts implementing dev-env#21's remediation
plan: no repo in either org requires an approving review, so the
`gh pr review --approve` step in dependabot-auto-merge.yml is dead
weight everywhere it appears.

- drop-noop-approve-step.sh: clones each of the 26 affected repos into
  a scratch dir, removes the inert approve line, and opens one real PR
  per repo (normal review hooks apply; nothing is merged automatically).
- generate-settings-plan.sh: writes (does not execute) the gh api
  commands to flip can_approve_pull_request_reviews to false for all
  28 candidate repos, preserving each repo's existing
  default_workflow_permissions. Output is reviewed and run by hand.
Git hooks aren't cloned with a repo, so no local review hook runs in
the scratch clones this script creates. Corrects the comment to say so.

Closes #36
@claude

claude Bot commented Aug 3, 2026

Copy link
Copy Markdown

Review

Two new operator scripts for the #21 remediation (fleet-wide audit of can_approve_pull_request_reviews and gh pr review --approve no-ops).

drop-noop-approve-step.sh: Clones 26 repos, removes dead gh pr review --approve line from CI workflows, commits, pushes branch, and opens PR. Has defensive checks at each step (auth check, file existence, line verification before/after sed). Handles re-run case (branch already exists). PRs are not auto-merged per line 171.

generate-settings-plan.sh: Generates gh api commands to flip can_approve_pull_request_reviews to false. Aborts entirely if any repo query fails (no partial plans). Operator reviews generated commands before executing (not auto-run).

gitignore: Correctly ignores the generated plan file.

No unreachable code paths, missing error handling, or silent failures detected. Scripts have early auth checks, proper logging of results/errors at each step. Suitable for personal operator use.

VERDICT: PASS

@smartwatermelon
smartwatermelon merged commit 4bf862a into main Aug 3, 2026
2 of 3 checks passed
@smartwatermelon
smartwatermelon deleted the claude/chore-fleet-approve-remediation-scripts-e8fa77d8 branch August 3, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant