Repository navigation
release: branch sweep + archive on the pyautolabs-bot App (token phase 2b) - #537
Merged
Merged
Conversation
…e 2b) branch_sweep_all.yml mints an owner-wide App token (contents write, pull-requests read) right before the loop; clones use plain URLs via `gh auth setup-git`. Audit mode now `push --dry-run`s each repo, proving the delete credential without using it. branch_archive.yml validates the request first, then mints a token scoped to the source repo + PyAutoGut with contents + workflows write (history holding .github/workflows changes can now be archived). The extraheader guard and the URL-embedded PAT are gone; verify-then-delete order unchanged. New `dry_run` input: fetch, then push --dry-run the archive ref and the source delete, and stop. Bot identity pyautolabs-bot[bot]. repo_cleanup reference reworded. Refs #534 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… cannot race it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
Token consolidation phase 2b (#534). Brain's two cross-repo branch writers move off
PAT_PYAUTOLABSonto per-jobpyautolabs-botApp tokens.branch_sweep_all.ymlmints an owner-wide token (contents write, pull-requests read forbranch_sweep.sh's PR lookups) right before the loop. Clones use plain URLs throughgh auth setup-git. Audit mode now also runsgit push --dry-run origin HEADper repo, so an audit shows the delete credential works without using it. The delete gate and the audit-only default are unchanged. A second commit runs auto-gc in the foreground (gc.autoDetach false). That fixes a pre-existingrm: Directory not emptycleanup race, which also failed the 2026-09-27 scheduled run and my first dry-run dispatch.branch_archive.ymlvalidates the request in its own step, then mints a token scoped to the source repo + PyAutoGut with contents + workflows write. Branches whose history contains.github/workflows/*can now be archived, which the PAT could not do; memoryfeedback_branch_archive_pat_lacks_workflow_scopeis obsolete once this merges. The URL-embedded PAT and the "persisted extraheader" guard are gone.persist-credentials: falsestays. Verify-then-delete order is unchanged. Newdry_runinput: fetch the branch, thenpush --dry-runthe archive ref and the source delete, and stop. Bot identity ispyautolabs-bot[bot].skills/repo_cleanup/reference.mdis reworded to describe the App instead of the PAT.API Changes
None (workflow auth change).
APP_CLIENT_ID, org secretAPP_PRIVATE_KEY.secrets.PAT_PYAUTOLABS(both workflows).Test Plan
pytest tests(deselecting the known worktree-resolver failuretest_grouped_organ_consumers.py::test_hygiene_map_and_heart_board_find_grouped_checkouts): 1267 passedmode=audit(all sweepable repos): https://github.com/PyAutoLabs/PyAutoBrain/actions/runs/39976236635. Green, 32/32 repospush credential: ok, 0 refused. (First attempt https://github.com/PyAutoLabs/PyAutoBrain/actions/runs/39975937556 hit the pre-existing rm race, which the second commit fixes.)dry_run=true(PyAutoFitexperiment/jax-vmap-jit-ordering→archive/condemned/token-p2b-dryrun-probe): https://github.com/PyAutoLabs/PyAutoBrain/actions/runs/39975942351. Green; I checked afterwards that the source branch is intact and no Gut ref was created.Heart YELLOW acknowledged by the human before PR-open (manifest drift on one workspace checkout; PyAutoLens release validation stale — both unrelated to this change).
Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code