Repository navigation
Add interactive org and enterprise update rollouts - #72418
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Commit pushed:
|
There was a problem hiding this comment.
Review summary
No actionable blocking issues found in the changed lines. The specialist pass was unavailable because its diff-read invocation was denied, so this assessment is based on the independent static review of the supplied patch; no tests or builds were run per review instructions.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~4 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again
🏗️ Design Decision Gate — ADR RequiredThis PR makes significant changes to core business logic (1,774 new lines in 📄 Draft ADR committed:
Decision captured in the draft: each repository rollout runs as an isolated
📋 What to do next
Once an ADR is linked in the PR body, this gate will re-run and check that the implementation matches the decision. ❓ Why ADRs Matter
An ADR is a permanent, searchable record of why the codebase looks the way it does, so future contributors don't have to guess. 📋 Michael Nygard ADR Format ReferenceAn ADR must contain these four sections to be considered complete:
All ADRs are stored in
|
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /tdd and /grill-with-docs (per pr-triage, change_type: new_feature). One actionable gap found; otherwise this is a well-tested, carefully designed feature.
📋 Key Themes & Highlights
Key Themes
- Confirmation prompt shows no preview data: runOrgRolloutPlain (org_rollout.go:182) calls confirmOrgAction with an empty orgRepoPreview{Repo: row.repo} — no workflow/version diff is shown before the user approves PR creation in plain --interactive mode, unlike the legacy org_runner.go path which populates TotalWorkflows/Workflows. No test covers this call site. Flagged inline with a concrete fix suggestion.
- Docs: otherwise excellent coverage of replacement/skip semantics, flags, and examples; added a note to call out the preview gap once addressed.
Positive Highlights
- ✅ Strong race-detector test coverage for concurrency, cancellation, pacing, and budget admission (TestOrgRolloutConcurrentWorkers, TestOrgRolloutBudgetFailureStopsAdmission, TestOrgRolloutThrottlingStopsPendingWorkers, TestOrgRolloutWorkerStartsArePaced).
- ✅ Replacement lifecycle is safe-by-construction: old PRs are never closed before a new one exists (finishOrgRolloutWorker), and this is explicitly tested (TestOrgRolloutReplacementCloseError, TestOrgRolloutExistingPRPolicy).
- ✅ The rate-limit "hard-fail on budget-check error" change in update_org_search.go initially looked like a regression vs. the legacy soft-warning pattern in org_runner.go, but it's intentional ("Stop admitting work on quota exhaustion or throttling" per PR description) and is directly tested (TestOrgRolloutSearchBudgetErrorDoesNotSearch) — no action needed.
- ✅ Search-ceiling fallback to paginated listing instead of silently truncating at 1,000 results is a solid correctness improvement, with dedicated test coverage.
- ✅ Worker-subprocess isolation is well-justified and documented (avoids os.Chdir/global-compiler-state races from goroutines).
Nothing blocking; recommend addressing the confirmation-preview gap before merge or as a fast follow-up.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet50 · ~153 AIC · ⌖ ~16 AIC · ⊞ 10.2K
Comment /matt to run again
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Note
Copilot was unable to run its full agentic suite in this review.
Copilot review overview
4 open issues
sync.WaitGroupdoes not have aGomethod, so this code will not compile. Either switch… · New Theunixbuild tag is not a standard GOOS constraint and is typically not set unless your build… · New This condition suppresses the compiler-version summary when a repo has no known versions and no… · New This PR expands rollout targeting to include--enterprise, but theRunEvalidation error for… · New
What changed in this PR
This PR introduces an org/enterprise “rollout” execution mode for gh aw update and gh aw upgrade, enabling bounded concurrency via subprocess workers, optional interactive TUI selection, and improved upgrade scanning/reporting of compiler versions.
Changes:
- Add org/enterprise rollout orchestration (discovery, scheduling, subprocess workers, and interactive TUI), including skip-by-default behavior for existing rollout PRs and optional “replace existing” flow.
- Enhance
upgrade --org/--enterpriseto scan all workflow lock headers for distinct compiler versions, report mixed/unknown/uncompiled states, and skip upgrades when versions already match. - Add native GitHub API client caching for rollout workers and improve org search handling when code search is incomplete or at the 1,000-result ceiling.
| File | Description |
|---|---|
| pkg/cli/upgrade_org_versions_test.go | Adds tests for lock-header compiler version parsing and upgrade preview/version reporting behaviors. |
| pkg/cli/upgrade_org_versions.go | Implements lock-header scanning and formatting for compiler version sets. |
| pkg/cli/upgrade_org_test.go | Updates org-upgrade dry-run expectations to the new version-set reporting format. |
| pkg/cli/upgrade_org_skip_test.go | Adds tests for version-match skip logic, markdown/lock counting, and worker-side “skip before mutations” behavior. |
| pkg/cli/upgrade_org.go | Refactors upgrade scanning to collect version sets, adds skip logic, and integrates rollout-worker lifecycle handling. |
| pkg/cli/upgrade_command.go | Wires org/enterprise rollout configuration into upgrade and updates help text/flag docs. |
| pkg/cli/update_org_search.go | Adds code-search completeness detection and fallback to full org repo listing; routes search via host-aware GH runner. |
| pkg/cli/update_org.go | Extends orgRepoPreview to carry compiler version sets and refactors checkout preview into a helper. |
| pkg/cli/update_github_api_test.go | Adds a test ensuring rollout workers share cached dependency reads across processes. |
| pkg/cli/update_github_api.go | Enables optional REST client caching (TTL + cache dir) for rollout workers and improves response-body close error handling. |
| pkg/cli/update_command.go | Wires org/enterprise rollout configuration into update and updates help text/flag docs. |
| pkg/cli/org_runner.go | Routes org commands through the rollout orchestrator when enabled and updates compiler version summary output. |
| pkg/cli/org_rollout_tui.go | Adds Bubble Tea-based interactive selection + live progress UI for rollouts. |
| pkg/cli/org_rollout_test.go | Adds tests for rollout flags, worker args, pacing/concurrency, cancellation, and TUI selection logic. |
| pkg/cli/org_rollout_process_unix.go | Adds Unix process-group cancellation so terminating a worker kills descendants. |
| pkg/cli/org_rollout_process_other.go | Adds non-Unix fallback process configuration. |
| pkg/cli/org_rollout_flags.go | Introduces org/enterprise rollout flags, validation, and worker arg forwarding. |
| pkg/cli/org_rollout_discovery_test.go | Adds tests for PR discovery batching/pagination, enterprise org discovery, and search ceiling fallback. |
| pkg/cli/org_rollout_discovery.go | Implements rollout PR discovery, replacement semantics, and org repo listing fallback. |
| pkg/cli/org_rollout.go | Implements rollout orchestration, IPC result protocol, worker process execution, and result aggregation/reporting. |
| docs/src/content/docs/setup/cli.md | Documents org/enterprise rollouts, interactive mode, concurrency, replacement behavior, and upgrade version scanning/skip rules. |
| docs/adr/72418-subprocess-workers-for-concurrent-org-rollouts.md | Adds ADR describing the subprocess-worker rollout approach and tradeoffs. |
Review effort: Lite
|
@copilot address the following outstanding work in one pass:
Push the necessary fixes, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved. Use the pr-finisher skill and stop when only human review or CI remains; do not trigger CI. Sous-chef state: eb944ccdf8d26242697fa4874278e040ea1c93c1c6d23c086426d37db34955b9
|
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
|
🎉 This pull request is included in a new release. Release: |


Organization administrators need to roll out workflow updates and upgrades across many repositories without creating duplicate PRs or exhausting GitHub API budgets.
Approach
--enterprise,--interactive,--dry-run,--concurrency, and--replace-existingto bothupdateandupgrade.owner/repositorynames, before checkout or worker execution. Document unattended usage, cancellation, replacement semantics, and rollout limitations.Examples
Quote wildcard patterns so the shell does not expand them locally. Dry-run performs discovery and local previews without creating or closing PRs or issues, committing, pushing, or upgrading the CLI extension. Rollout workers use the currently running compiler consistently. Separate simultaneous CLI invocations are not an atomic distributed lock.
Architecture decision
ADR: ADR-72418: Isolated Subprocess Workers and Skip-by-Default Deduplication for Concurrent Org and Enterprise Rollouts
Validation
make agent-report-progresspassed, including impacted Go tests, standard and custom lint gates, and workflow lock-file drift checks.