Skip to content

feat(release-dispatch): merge the push-mode update PR automatically - #337

Merged
jing2uo merged 1 commit into
mainfrom
feat/auto-merge-release-dispatch
Sep 10, 2026
Merged

jing2uo merged 1 commit into
mainfrom
feat/auto-merge-release-dispatch

Conversation

@jing2uo

@jing2uo jing2uo commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

An upstream release ping opened a PR and stopped there, waiting for a maintainer, while update-check.yml merged the identical pins unattended at 06:17 UTC. That gap is what upstreams see — zbcoding dropped the Notify FlatPark step from ImpastoPaint's release job because "each ping opens an update PR that only their side can merge, and nothing about their setup suggests those merges are automatic" (#336 is the ping that prompted it).

What changes

release-dispatch.yml now merges its own PR and dispatches the publish, on the daily sweep's terms:

  • Payload gate, already there: check-apply-extra.sh runs before the PR is opened (issue Add tldraw offline desktop app to the repo #130), so nothing reaches an auto-merge without unpacking the way an install does.
  • Pin-surface guard, stricter than the sweep's: push mode knows which app it asked for, so the diff must be exactly registry/<id>/<id>.yml and registry/<id>/<id>.metainfo.xml for that app — not the sweep's "some app's manifest or metainfo". Anything else leaves the PR open with a comment. Every app in the registry is laid out that way today; one that isn't just stays a PR for a human.
  • appstreamcli installed. update-pins.mjs validates upstream's release notes before writing a <release> into the metainfo, but that guard is best-effort and silently no-ops without the validator. update-check.yml installs it; this job did not, and it now merges those notes unattended.
  • Same AUTO_MERGE_PINS kill switch, not a second variable — one setting stops both modes.
  • Post-merge gh workflow run publish.yml, since a GITHUB_TOKEN push triggers no workflow. publish's own concurrency: publish queues parallel pings into successive small publishes.
  • Orphaned pr-checks run cleaned up, same as the sweep.

No per-app opt-in (it was in the original design notes): the sweep already merges every app's pins unattended, so gating push mode per app would only delay the same bytes by a day, at the cost of a rule that's hard to explain to upstreams.

Trust model

Unchanged. The ping's payload only decides which app gets recomputed — the resolver decides the version, and the Worker takes the upstream repo from our own catalog's sourceUrl, rejects a mismatched app_id, and checks the release exists. The ceiling for an abusive ping is publishing a pin the cron would have published within a day. The Worker's header comment and docs/publish-action-launch.md said "a PR a human merges"; both are corrected here.

Still to do once this lands: flatpark/publish-action's README says "opens an update PR, and after review the new version is live" — that sentence is the one upstreams read.

🤖 Generated with Claude Code

An upstream release ping opened a PR and stopped there, waiting for a
maintainer, while the daily sweep merged the identical pins unattended at
06:17 UTC. That gap is what upstreams see: zbcoding dropped the Notify
FlatPark step from ImpastoPaint's release job because "each ping opens an
update PR that only their side can merge, and nothing about their setup
suggests those merges are automatic".

Merge it here on the daily sweep's terms, with two things the sweep cannot
be as strict about:

- the diff must be exactly the pinged app's <id>.yml / <id>.metainfo.xml,
  since push mode knows which app it asked for (the sweep can only require
  "some app's manifest or metainfo");
- the payload was already unpacked with the app's own apply_extra.sh two
  steps up, before the PR was opened at all.

Also install appstreamcli: update-pins validates upstream's release notes
before writing a <release> into the metainfo, but silently skips that when
the validator is missing, and this job now merges those notes unattended.

Same AUTO_MERGE_PINS kill switch as the sweep rather than a second variable,
the same post-merge publish dispatch (a GITHUB_TOKEN push triggers no
workflow), and the same cleanup of the orphaned pr-checks run left behind by
--delete-branch.

No per-app opt-in: the sweep already merges every app's pins unattended, so
gating push mode per app would only delay the same bytes by a day.

Co-Authored-By: Claude Opus 5 <[email protected]>
@jing2uo
jing2uo merged commit 552b868 into main Sep 10, 2026
jing2uo added a commit to flatpark/publish-action that referenced this pull request Sep 10, 2026
The old wording ("opens an update PR, and after review the new version is
live") described a maintainer merging each ping by hand. That reads as work
someone else has to do for your release, and at least one upstream dropped
the step over it. flatpark/flatpark#337 made push-mode updates merge and
publish themselves, on the same terms the daily poll already used.

Say what actually gates the update — the new artifact has to unpack the way
an install does — and what happens when it doesn't.

Co-Authored-By: Claude Opus 5 <[email protected]>
@jing2uo
jing2uo deleted the feat/auto-merge-release-dispatch branch September 10, 2026 15:13
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