Ray's Knowledge Base
Unlock

Serialize workflow pushes to a shared repo: artifact + separate notes job + retry loop

DecisionVerified 2 Oct 2026Holds anywhere
Decision. The context, the choice, why, and the options that were turned down.

Context#

rsrobo's review workflow pushed review notes to a shared repo from concurrent PR runs, and one lost a push, which broke assess finish with "no saved review".

Decision#

The review job no longer pushes review notes. It uploads the new or changed files in its notes checkout as one artifact, notes-changes. A separate notes job then fetches the notes repo fresh, unpacks the artifact, commits, and pushes in a loop of up to 5 tries with git pull --rebase between them. This job runs under the concurrency group notes-write with no cancellation, so runs on different PRs queue instead of racing. Artifacts (notes-changes, review-json) are deleted only under success() of the write step, so a failed push leaves the files downloadable for a manual add.

Why#

A per-PR concurrency group does not serialize runs on different PRs.

Rejected options#

A push with retry inside the review job, because it still races and a cancelled run could leave half-written notes.

Also found by searching

  • ! [rejected] trunk -> trunk (fetch first) in a workflow push
  • serialize workflow pushes to one repo with a concurrency group and rebase loop
  • per-PR concurrency group does not serialize runs on different PRs
  • delete artifacts only under success() so a failed push stays downloadable