Only agent-cycle.sh authenticates as the forge authoring App; the review cycle, state-sync, the dashboard publisher and doctor still require GH_TOKEN
Id: TD-PPagop-26082834 · Status: resolved · Filed: 2026-08-28 · Resolved: 2026-09-28 · Ref: https://github.com/Pullwright/agent-ops/pull/1899
What. D25’s forge authoring App identity (lib/author-token.sh,
lib/forge-auth.sh) is reached through exactly one seam:
forge_auth_effective_gh_token, called from run_standdown_checks
(lib/standdown.sh), which only agent-cycle.sh calls. Every other
GitHub-touching entry point the node image launches still authenticates with
whatever ambient GH_TOKEN the container’s environment holds:
review-cycle.sh— clones a target repository, pushes, opens issues and pull requests. It sources neitherlib/author-token.shnorlib/forge-auth.sh, and does not uselib/standdown.shat all.scripts/publish-dashboard.sh— reads GitHub overghand pushes the published dashboard.scripts/state-sync.sh push/fetch— pushes and fetches this node’s own state branch over https.scripts/doctor.sh --unattended— the hourly cron pass; reads GitHub throughout, and reports the App’s presence without ever authenticating as it for anything else.
All four are cron lines in deploy/docker/crontab.tmpl.
Why it matters. Issue #607’s own “done when” puts the forge identity —
“the organisation App of decision 1” — behind every authoring act, and the
review cycle opens pull requests and issues, which is authoring by any
reading. As landed, a node provisioned the way this item intends — the App’s
three values set, no GH_TOKEN PAT at all — has a working implementation
cycle and four broken cron jobs: the review cycle cannot clone, state-sync
cannot push, the dashboard publisher cannot read, and doctor reports GitHub
as unreachable.
deploy/docker/entrypoint.sh’s new startup mint does not cover them, and it
is easy to read as if it does. gh auth setup-git writes only
credential.https://github.com.helper = !gh auth git-credential into the
git config; it stores no token. gh auth git-credential resolves GH_TOKEN
from its own environment when it is invoked, and the entrypoint’s mint is a
one-invocation GH_TOKEN="$entrypoint_gh_token" gh auth setup-git prefix —
nothing of it survives into a later cron job’s environment.
The practical consequence today is that GH_TOKEN is not merely the degrade
path D25 describes; it remains a hard requirement on every node, for reasons
provisioning the App does not change. deploy/docker/.env.example currently
says GH_TOKEN “is never optional in practice while a node’s own App key is
not yet in place”, which will be wrong in the direction that matters — too
reassuring — as soon as the first App key is in place.
Where.
review-cycle.sh(itslib/sourcing block and itsgh/git pushcall sites),scripts/publish-dashboard.sh,scripts/state-sync.sh,scripts/doctor.sh.deploy/docker/entrypoint.sh’s credential-helper block, whose comment (“This mint is never reused past this setup step — every cycle mints … its own”) is accurate foragent-cycle.shand silently untrue for every other cron line.deploy/docker/.env.example, theGH_TOKENparagraph’s “while a node’s own App key is not yet in place” clause.docs/REVIEW-PIPELINE-SPEC.md, which says nothing about the forge authoring identity and will need to once the review cycle uses it.
Suggested fix. The cheap version is to have review-cycle.sh resolve its
own credential through forge_auth_effective_gh_token the way
run_standdown_checks does, and to note in docs/REVIEW-PIPELINE-SPEC.md
that it does. That leaves the three short-lived cron scripts, for which a git
credential helper backed by author_token_get — configured once by
deploy/docker/entrypoint.sh in place of the plain gh auth setup-git
wiring — is the shape that covers all of them at once, and is the same shape
that would close TD-PPagop-26082833. Whichever is chosen,
deploy/docker/.env.example’s GH_TOKEN paragraph should be reworded to say
plainly what remains true of it, and docs/IMPLEMENTATION-PIPELINE-SPEC.md’s
component 3 entry should stop implying the entrypoint mint reaches anything
beyond gh auth setup-git itself.
Noticed while reviewing PR #863 (issue #607, D25 — the forge authoring App).
Migrated to https://github.com/Poetic-Poems/agent-ops/issues/1022.