Skip to content

fix(template-sync): migrate the four consumers left on the pre-v11 use-app-token default #895

Description

@devantler

🤖 Generated by the Agentic Engineer

Evidence

template-sync's use-app-token input defaulted to true until v11.0.0, which flipped it to
false as a declared breaking change ("template-sync: default App-authored PRs off", #707).
GITHUB_TOKEN can never push workflow files — a GitHub safety restriction the reusable workflow's
own comments already document — so any consumer that relied on the old default silently lost the
ability to sync .github/workflows/** the moment it bumped past v11.

That is not hypothetical. ascoachingogvaner bumped to v11.0.4 on 2026-08-01 and its next scheduled
sync failed:

! [remote rejected] chore/template-sync_53900e1 (refusing to allow a GitHub App to create or update workflow .github/workflows/release.yaml without workflows permission)

A controlled comparison the same morning isolates the variable: wedding-app — sibling tenant of the
same template, same pinned reusable-workflow SHA, same template commit, same 3268-line diff, and
workflow files in the change set — succeeded at 07:13Z. The single difference was
use-app-token: true.

Audience and impact

Every consumer of this reusable workflow, and every repository created from an affected template.
The failure mode is bad in two ways: it is silent until the template happens to change a workflow
file
(so it can lie dormant for weeks), and when it does fire the sync stops entirely — meaning
security and CI fixes stop propagating from the template to its tenants.

Expected behaviour

A consumer bumping across a declared breaking change should end up migrated. Six consumers exist and
are all in-house; four still carry the pre-v11 assumption:

Consumer State
wedding-app migrated (explicit use-app-token: true)
ascoachingogvaner broke; hotfixed in devantler-tech/ascoachingogvaner#166
platform-tenant-template unmigrated — propagates the broken default to every new tenant
platform-template unmigrated
go-template unmigrated
dotnet-template unmigrated

The four template repos skip their own sync (if: github.repository != '<itself>'), so they show no
breakage themselves
— they hand it to each tenant created from them. That is why this stayed
invisible.

Acceptance criteria

  1. The four unmigrated consumers above explicitly set use-app-token: true, so tenants inherit a
    working sync rather than the broken default.
  2. The reusable workflow's README documents the v11 migration step for consumers that sync workflow
    files, next to the existing permissions guidance.
  3. Verified by a workflow_dispatch sync on one migrated template-derived tenant that pushes a
    workflow-file change without a rejected push.

Deliberately not proposed: reverting the v11 default. It was a considered security decision —
App-authored PRs trigger the consumer's CI on template content — and opting in per consumer is the
intended migration path, not a workaround.

Rough size: small (a two-line change per repo, plus a README note).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status
    📥 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions