Skip to content

feat(heart): token push check — prove pyautolabs-bot can push to the five release libraries - #316

Merged
Jammy2211 merged 3 commits into
mainfrom
feature/github-token-p1-hands-app
Oct 23, 2026
Merged

Jammy2211 merged 3 commits into
mainfrom
feature/github-token-p1-hands-app

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Summary

Adds a read-only release gate input that proves the org-owned pyautolabs-bot GitHub App can push to the five release libraries (PyAutoNerves, PyAutoFit, PyAutoArray, PyAutoGalaxy, PyAutoLens). This is the identity the PyAutoHands release path moves to in token phase 1 (PyAutoLabs/PyAutoHands#321).

  • New .github/workflows/token_push_check.yml, triggered daily at 04:30 UTC, by workflow_dispatch, and on PRs that touch the check. It mints an App token scoped to the five libraries (contents write) and runs gh auth setup-git. For each library it then runs git ls-remote and git push --dry-run … HEAD:refs/heads/token-push-check-dryrun. The dry run sends no pack and creates no ref.
  • New heart/checks/token_push.py runs the probe and writes the sidecar state/token_push.json. On schedule and dispatch the sidecar is committed with [skip ci]. PR runs only upload it as an artifact. Any refused push fails the job.
  • state.aggregate folds the committed sidecar into the snapshot as token_push. readiness grades it: a refused push is RED, and a missing, partial or >48 h old sidecar is STALE. The dashboard gets remedies for the STALE keys.

Heart YELLOW acknowledged by the human 2026-10-23 (manifest drift; PyAutoLens release validation stale).

Refs PyAutoLabs/PyAutoHands#321. This PR closes nothing; the issue closes after both PRs merge.

API Changes

None. This adds a new check module and a new readiness reason. There is no change to any public interface.
See full details below.

Test Plan

  • python -m pytest tests -q -x → 1305 passed
  • Workflow parses as YAML. actionlint 1.7.12 reports only false positives: its bundled metadata for create-github-app-token@v3 predates client-id.
  • Local plumbing run of the probe, using a human credential rather than the App: push=True on all five libraries, and no token-push-check-dryrun branch was created.
  • The Token Push Check run on this PR shows push=True for all five libraries using the real App token.
Full API Changes (for automation & release notes)

Removed

  • None

Added

  • heart.checks.token_push (probe, build, load, main): the App push-credential probe and sidecar reader.
  • Readiness reasons token_push_refused (red), token_push_unknown (stale) and token_push_stale (stale).

Migration

  • None. Until the check first runs on main, readiness shows the STALE reason "release push credential check not run".

Generated by the PyAutoLabs agent workflow.

🤖 Generated with Claude Code

Jammy2211 and others added 2 commits October 23, 2026 14:39
…tity

New scheduled/dispatchable token_push_check.yml mints a pyautolabs-bot App
token scoped to the five release libraries and runs heart/checks/token_push.py:
git ls-remote + git push --dry-run per library (no pack sent, no ref created).
The result is committed as state/token_push.json, folded into the snapshot by
state.aggregate and graded by readiness: a refused push is RED, a missing,
partial or >48 h sidecar is STALE (with dashboard remedies).

Refs PyAutoLabs/PyAutoHands#321

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds a pull_request trigger (paths: the workflow and heart/checks/token_push.py)
so the real App token is exercised before merge. PR runs probe, log, upload the
sidecar as an artifact and fail on refusal, but never commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tenant firewall rejects instance facts in organ code. token_push.py now
takes the library list from readiness.load_release_gate_names() and each
owner from config/repos.yaml (dashboard._repo_owners); the dashboard remedy
command and the tests derive names the same way. The workflow resolves the
App token's `repositories:` scope from the same list via --print-repos, so
the scope and the probe can never disagree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit cdd3816 into main Oct 23, 2026
3 checks passed
@Jammy2211
Jammy2211 deleted the feature/github-token-p1-hands-app branch October 23, 2026 13:57
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