Skip to content

release: nightly driver on the pyautolabs-bot App; retire repo_settings.yml (token phase 2a) - #532

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

Jammy2211 merged 2 commits into
mainfrom
feature/github-token-p2a-readers-app

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Summary

Token consolidation phase 2a (#531) for the Brain.

  • nightly-release.yml stops using PAT_PYAUTOLABS. It mints a per-job, owner-wide pyautolabs-bot App token instead, with actions write, contents read, issues read and variables write. The driver dispatches and polls the Hands release and Heart integrate workflows, reads commits, tags and release-blocker issues across the release-relevant repos, and reads and writes this repo's NIGHTLY_LAST_WINDOW_END anchor. No credential fallback.
  • nightly.sh: if the anchor read fails or returns a malformed value, the driver now pages and exits 1 (driver error). It used to judge a 24h window silently. If the anchor write fails, it exits 1; it used to print a stderr warning. The stale "PAT" comment on GH_TOKEN is updated.
  • repo_settings.yml is retired, along with its test. It needs repo Administration, which the App deliberately lacks. The skills that pointed at it (GITHUB_ACCESS.md, prm/reference.md, repo_cleanup/SKILL.md, repo_cleanup/reference.md) now document the local loop: gh api -X PATCH repos/PyAutoLabs/<repo> -F delete_branch_on_merge=true.

Merge gate: do not merge until the human has granted the App the Variables (read and write) permission AND approved it on the installation; verify with gh api orgs/PyAutoLabs/installations --jq '.installations[]|select(.app_slug=="pyautolabs-bot")|.permissions.variables' = write

permission-variables is not in create-github-app-token@v3's generated input list (upstream actions/create-github-app-token#231). The runner will warn "Unexpected input", but the action forwards every permission-* input to the token request.

Still on PAT_PYAUTOLABS on purpose: branch_sweep_all.yml and branch_archive.yml (phase 2b). Hands' docs/nightly_release_design.md secrets list is left for phase 5.

API Changes

None (workflow auth change).
See full details below.

Test Plan

  • YAML parse of nightly-release.yml; bash -n on nightly.sh
  • pytest tests -q: 1267 passed, 1 deselected (test_grouped_organ_consumers::test_hygiene_map_and_heart_board_find_grouped_checkouts fails the same way on main under the task bundle's PYAUTO_MIND)
  • Tenant firewall (organ code): OK
  • After merge, once the permission is granted: dispatch nightly-release.yml with dry_run=true
Full API Changes (for automation & release notes)

Removed

  • .github/workflows/repo_settings.yml. Replaced by a documented local gh api loop.

Required configuration

  • Now read: vars.APP_CLIENT_ID, secrets.APP_PRIVATE_KEY (org level), plus the App's Variables read/write permission.
  • No longer read by nightly-release.yml: secrets.PAT_PYAUTOLABS.

Heart readiness: YELLOW, acknowledged by the human before opening (manifest drift on one workspace checkout; PyAutoLens release validation stale — both unrelated to this change).

🤖 Generated with Claude Code

Jammy2211 and others added 2 commits October 23, 2026 15:21
…tire repo_settings.yml

nightly-release.yml drops PAT_PYAUTOLABS for a per-job, owner-wide App token
(actions write, contents read, issues read): the driver dispatches and polls
the Hands release and Heart integrate workflows and reads commits, tags and
release-blocker issues across the release-relevant repos.

repo_settings.yml needs repo Administration, which the App deliberately lacks,
so it is deleted with its test; the skills that pointed at it now give the
local gh api -X PATCH delete_branch_on_merge loop.

Refs #531

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ion, loud on failure

The nightly mint gains permission-variables: write so the driver can read and
write PyAutoBrain's NIGHTLY_LAST_WINDOW_END anchor with the App token. A failed
or malformed anchor read now pages and exits 1 (driver error) instead of
silently judging a 24h window, and a failed write after a shipped or quiet
night exits 1 instead of warning on stderr. The stale GH_TOKEN "PAT" comment
is updated.

Refs #531

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit 9483eda into main Oct 23, 2026
2 checks passed
@Jammy2211
Jammy2211 deleted the feature/github-token-p2a-readers-app branch October 23, 2026 14:38
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