Approve/merge enumerate the session's PRs by feature branch; gitignore inventory snapshots - #82
Merged
Merged
Conversation
…onal The approve/merge plans no longer consume a repo inventory: they enumerate the session's open PRs directly from the GitHub API by git.feature_branch (+ pr_user as author) via the new list_github_prs task, building targets from the results (each repo's branch = its PR's base ref, via the new repo_targets_from_prs function). The PRs are the ground truth for the harvest, so this is strictly more accurate than any inventory: repos that failed before the PR stage aren't approached, repos that joined/left the org between sync and harvest can't drift in, and no snapshot handoff state is needed — any approver on any machine needs only the session config. That also makes the no-arguments invocation (config/repolist via the latest symlinks) fully self-contained for scheduled runs (simp#56). Consequently the dynamic-inventory snapshot (generated-*.yaml) is now informational: gitignored, and the sync's message no longer tells operators to hand it to approve/merge. repos_config remains a plan parameter for CLI compatibility but is deprecated/unused in these two plans. Verified against the live session: list_github_prs enumerated exactly the 71 open PRs from the 20260731-release-rpms-ghcr run (the unchanged repos correctly absent, all base refs hydrated). BoltSpec approve/merge suites rewritten for the new flow (+ no-open-PRs fail-fast specs); 17 plan examples and 199 plain examples green, e2e green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
michael-riddle
approved these changes
Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Combined change per the workflow discussion: make the harvest plans self-contained, and demote the dynamic-inventory snapshot to an informational artifact.
Approve/merge: the PRs are the ground truth
puppetsync::approve_github_prsand::merge_github_prsno longer consume a repo inventory. They enumerate the session's open PRs directly from the GitHub API — search byorg+ head branch (git.feature_branch) + author (github.pr_user), then hydrate each PR's base ref — via the newlist_github_prstask andrepo_targets_from_prsfunction (each target's branch comes from its PR's base, not from any list).Why this beats any inventory:
bolt plan run puppetsync::approve_github_prsinvocation (config via thelatestsymlink) fully self-contained, which is exactly the shape scheduled runs (Scheduled org-wide puppetsync runs (continuous baseline enforcement) #56) need.github.orgis a new optional config key (defaultsimp).Live-verified against the real session:
list_github_prsenumerated exactly the 71 open PRs from the20260731-release-rpms-ghcrrun — the twounchangedrepos correctly absent, all base refs hydrated.Snapshot demoted to informational
data/sync/repolists/generated-*.yamlis now gitignored; the sync's completion message,github-org.yaml, and the README no longer direct operators to hand it to approve/merge. (Thegenerated-latest.yamlnaming from symlink-driven runs made it a poor artifact of record anyway.)repos_configremains a parameter on both plans for CLI compatibility, documented as deprecated/unused.Testing
list_github_prssubprocess spec (injection-based, matching thelist_github_repospattern); 199 plain examples, 0 failures; idempotency e2e green.puppet parser validate --tasks,bolt plan showfor both plans, and the stage-list dry run all green.Suggested test-for-real
Merge this, rebase #80 on top, then harvest the live session with the new flow:
bolt plan run puppetsync::approve_github_prs/::merge_github_prswith no repolist argument at all.🤖 Generated with Claude Code