Files
poli0981andClaude Opus 5.5 5e689e7aca fix(pipeline): rebase and retry when a data job's push is rejected
purge-unhealthy ran for four hours on 2026-09-21 and then failed on
"push rejected (fetch first)", throwing the whole run away. The data-write
concurrency group serialises the WORKFLOWS, but main still moves under a
long job: a merged pull request, an /admin approval or override the Worker
commits, the extension's push to scripts/temp_info.jsonl.

bash/commit_push.sh does what every wrapper did - add, commit only if
something changed - and then pushes with up to five attempts, rebasing onto
origin/main between them. None of the other writers touch the shards, so
the rebase is clean; a genuine conflict still fails the job. All nine data
wrappers now call it, with their commit messages unchanged (snapshot.sh
keeps its data/snapshots/ pathspec).

Tested against a scratch remote: with main moved by another commit, the
first push is rejected, the rebase lands the job's commit on top, and the
retry succeeds; with nothing to commit it prints "No changes".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-23 22:40:23 +07:00

6 lines
210 B
Bash

#!/bin/bash
set -euo pipefail
# No pip install: snapshot.py and scripts/core/* are stdlib-only.
python scripts/snapshot.py
bash "$(dirname "$0")/commit_push.sh" "Snapshot [$(date +'%Y-%m-%d')]" data/snapshots/