Skip to content

release: branch sweep + archive on the pyautolabs-bot App (token phase 2b) - #537

Merged
Jammy2211 merged 2 commits into
mainfrom
feature/github-token-p2b-writers-app
Oct 23, 2026
Merged

Jammy2211 merged 2 commits into
mainfrom
feature/github-token-p2b-writers-app

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Summary

Token consolidation phase 2b (#534). Brain's two cross-repo branch writers move off PAT_PYAUTOLABS onto per-job pyautolabs-bot App tokens.

  • branch_sweep_all.yml mints an owner-wide token (contents write, pull-requests read for branch_sweep.sh's PR lookups) right before the loop. Clones use plain URLs through gh auth setup-git. Audit mode now also runs git push --dry-run origin HEAD per 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-existing rm: Directory not empty cleanup race, which also failed the 2026-09-27 scheduled run and my first dry-run dispatch.
  • branch_archive.yml validates 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; memory feedback_branch_archive_pat_lacks_workflow_scope is obsolete once this merges. The URL-embedded PAT and the "persisted extraheader" guard are gone. persist-credentials: false stays. Verify-then-delete order is unchanged. New dry_run input: fetch the branch, then push --dry-run the archive ref and the source delete, and stop. Bot identity is pyautolabs-bot[bot].
  • skills/repo_cleanup/reference.md is reworded to describe the App instead of the PAT.

API Changes

None (workflow auth change).

  • Requires: org variable APP_CLIENT_ID, org secret APP_PRIVATE_KEY.
  • No longer reads: secrets.PAT_PYAUTOLABS (both workflows).

Test Plan

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

Jammy2211 and others added 2 commits October 23, 2026 16:09
…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>
@Jammy2211
Jammy2211 merged commit 0d32d61 into main Oct 23, 2026
3 checks passed
@Jammy2211
Jammy2211 deleted the feature/github-token-p2b-writers-app branch October 23, 2026 15:22
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