Skip to content

Field report: a source PR merged from a fork never syncs — held for approval, and approving cannot help without secrets #415

Open

Description

@mmcky

Field report, 2026-11-02. A source PR merged from a fork does not sync through the pull_request path, and nothing says so. Depending on the repository's approval policy, its sync runs are either held for approval, or they run and fail because GitHub gives workflows triggered from a fork no secrets. Approving a held run cannot help, for the same reason. Today the only working route is \translate-resync on the merged PR.

What happened

Why approving the held runs would not have helped

GitHub does not pass secrets other than GITHUB_TOKEN to a workflow triggered from a fork's pull request, and the sync needs ANTHROPIC_API_KEY and QUANTECON_SERVICES_PAT. The estate already has the evidence. On 2026-08-05, two fork PRs into lecture-python.myst, QuantEcon/lecture-python.myst#706 and QuantEcon/lecture-python.myst#669, were not held. Their zh-cn sync runs started with Secret source: None and failed with "Input required and not supplied: anthropic-api-key" (runs 31046296952 and 31043405135). Those runs are of the kind #367 describes, and may be among the six it counts. I have not checked whether either change reached the zh-cn edition later.

So the outcome for a fork PR depends only on the repository's setting for approving outside contributors' workflows:

Repository Approval policy today A merged fork PR's sync
lecture-python-programming all_external_contributors Held as action_required, silently
lecture-python.myst all_external_contributors Held as action_required, silently (on 2026-08-05 these runs were not held, and failed)
lecture-python-intro first_time_contributors A first-time contributor's is held; a returning contributor's runs and fails without secrets

How this differs from the issues already open

Issue Same Different
#234 A merged PR's runs sit at action_required and nothing reports it There the head branch is an agent's branch in the same repository, so approving the runs works. For a fork, approval leads to a failed run
#282 The sync is missed with no artefact There no run was created at all
#367 Runs that die before the failure-issue step The 2026-08-05 fork runs are this class; today's were held instead

The detector proposed on #234 and #282, that every merged source PR touching docs-folder has a sync PR or a failure issue within the hour, would catch this case too.

Suggestions

  1. Say it in the shipped workflow and the docs. The sync workflows' header comment says "Comment \translate-resync on a merged PR to re-trigger sync", but nothing says that a merged fork PR always needs it. One line in the workflow template and in the user docs would make the recovery routine instead of a discovery.
  2. Consider a pull_request_target trigger for the closed event, for discussion. It runs in the base repository's context with its secrets, even for a fork. Because the job only runs once the PR is merged, and checks out the base repository rather than the fork's head, it would not run the contributor's code. It still needs a security review before anyone ships it: pull_request_target with secrets is a well-known risk when a workflow checks out the PR's head.
  3. Detection, as Sync silently does not run when a merged source PR has an agent-authored head branch #234 proposes. A held run on a merged PR should be visible without anyone looking for it.
  4. Resync soon, or not at all. #637 was resynced two minutes after it merged, so resync regenerates from the source PR's merge-time snapshot — stale content reverts newer target edits #276's stale-snapshot risk did not apply. The longer a fork merge goes unnoticed, the more likely the source has moved on and a resync reverts newer content (resync regenerates from the source PR's merge-time snapshot — stale content reverts newer target edits #276, The failure-issue template prescribes \translate-resync, which is unsafe on 9 of 12 PRs and ineffective on 13 of 15 failures #281). That is another reason detection matters.

Scope, checked 2026-11-02

  • Held sync runs now, listed with actions/runs?status=action_required on lecture-python-programming, lecture-python.myst, lecture-python-intro and lecture-python-advanced.myst: only #637's three, now superseded by the resync. The runs held in Sync silently does not run when a merged source PR has an agent-authored head branch #234's July incident no longer appear in that listing, so it may not keep held runs indefinitely.
  • Merged fork PRs since 2026-07-01: one in lecture-python-programming (#637); three in lecture-python.myst (#867 on 2026-07-07, before its zh-cn sync workflow was added on 2026-07-23, and #706 and #669 on 2026-08-05); none in lecture-python-intro.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions