Repository navigation
Description
Upstream tracker stalls silently once its sync branch exists without a pull request
The daily Track upstream DS Bot workflow (.github/workflows/ds-bot-upstream-track.yml) pushes
upstream/ds-bot-<tag>, then opens the pull request. When opening the pull request fails, the run
is red once and the branch stays behind; every later run then takes the "branch already exists"
path, skips sync, suite, smoke and pull-request creation, and reports success. Nothing retries,
no pull request appears, and nothing on the issue tracker says the pin is behind.
Observed on main 2facf12ebf5a2151e17dcc497a5b3da5a674580f (tree 03576b02), 2026-11-29.
Actual
Pin on main is still v0.3.10 (d104d9ca18d69a35460f14e15dff4d553181433a, ds-bot 0.3.10, DSH
0.2.2-rc.1), while upstream Fei2411/DS-Bot has three newer releases:
| tag | commit |
|---|---|
v0.4.0 |
7963e66a74f40d23daa288a76cdca72b34e39561 |
v0.4.1 |
ca0116af3bde8888e13910df2bb9add3800f390a |
v0.4.2 |
4a31316bb5c45aa7408c7157d09fd5ad26f7ee50 |
Two sync branches exist in the repository and no pull request has ever been opened from either
(GET /repos/ThinkFlowLab/FlyBot/pulls?head=ThinkFlowLab:upstream/ds-bot-v0.4.2&state=all → [],
same for v0.4.0):
upstream/ds-bot-v0.4.0→8eb905ad1af508894c1d24cf7e88e0521d10cd2aupstream/ds-bot-v0.4.2→c422d5bef389c22726400e0d08676a15dc38d233(its pin readstag v0.4.2,
commit4a31316b…, ds-bot0.4.2, DSH0.2.2-rc.5, 12 paths, so the sync itself worked)
Run history of the workflow (/actions/workflows/ds-bot-upstream-track.yml/runs):
| run | date | sync · suite · smoke · pr | conclusion |
|---|---|---|---|
45976212422 |
11-27 | success · success · success · failure | failure |
46128184106 |
11-28 | success · success · success · failure | failure |
46244596502 |
11-29 | skipped · skipped · skipped · skipped | success |
So the pull-request step failed twice, and the third day reported green while doing nothing.
Why
In Find the target release:
if [ "$skip" = false ] && git ls-remote --exit-code --heads origin "$branch" >/dev/null; then echo "Branch $branch already exists"; skip=true; fiskip=true is the only signal that the work is done, but it is set by the branch existing, not by
a pull request existing. Push and open the pull request runs only when skip == false, so once
the branch is pushed and gh pr create fails, the workflow can never try again.
gh pr create failing twice points at repository configuration (not permitted for GITHUB_TOKEN,
and no DS_BOT_TRACK_TOKEN secret), which the step's own error message names — but the workflow
turning that into a permanent silent stall is a code problem.
Expected
- A branch that exists without an open pull request must not count as done: the run should retry
opening the pull request from the existing branch (or fail, loudly, every day). - A run that skips must not be indistinguishable from a run that opened a pull request.
Proposed slice (one PR)
.github/workflows/ds-bot-upstream-track.yml only:
- Replace the "branch exists" test with "an open pull request exists for this head"
(gh pr list --head "$branch" --state open --json number), and keep the branch name in the
output so the skip message names why. - When the branch exists but no open pull request does, still run the pull-request step for that
branch (reuse the pushed branch, no re-sync), so one failedgh pr createcannot stall the
tracker. - Keep the run red when no pull request can be opened, and print the branch name in the error.
Acceptance for review:
workflow_dispatchwithref: v0.4.2on this patch: a pull request appears for
upstream/ds-bot-v0.4.2and the run is green (or stays red with an error naming the reason if
the repository still forbids Actions-created pull requests — then the remedy is the
DS_BOT_TRACK_TOKENsecret or the repository setting, a human decision).- With an open pull request already present, a second dispatch skips and says so.
git ls-remote --headsof the branch alone no longer stops the job.
Not in this slice: actually upgrading the pin to v0.4.2 (vendor tree plus container, a separate
risk:T3 change that needs its own review), and the missing DS_BOT_TRACK_TOKEN secret.
Related #3399.
Verified cause of the failed pull-request step
Repository configuration, checked on main 2facf12e (2026-11-29):
GET /repos/ThinkFlowLab/FlyBot/actions/permissions/workflow→default_workflow_permissions: read,
can_approve_pull_request_reviews: false. The workflow grants the jobcontents: writeand
pull-requests: write, so the missing piece is the repository setting that letsGITHUB_TOKEN
create pull requests.GET /repos/ThinkFlowLab/FlyBot/actions/secrets→total_count 0, soDS_BOT_TRACK_TOKENis not
set either.
Both remedies are human decisions (enable the setting, or add the secret); the silent stall is the
code side of this issue.
Activity
Birfy commentedon Nov 29, 2026
Claimed. Branch:
dev/3448-upstream-track-stall, cut frommainat2facf12ebf5a2151e17dcc497a5b3da5a674580f.Slice (one PR, one file):
.github/workflows/ds-bot-upstream-track.yml.Input: the current
Find the target releasestep, whereskip=trueis set bygit ls-remote --headsfinding the sync branch, andPush and open the pull requestruns only whenskip == false.Output:
gh pr createcannot stall the tracker for good.Acceptance for review:
workflow_dispatchwithref: v0.4.2on the patched workflow: either a pull request appears forupstream/ds-bot-v0.4.2, or the run is red with an error naming the repository setting or the missing secret. A green run with every step skipped is not accepted.git ls-remote --headsalone no longer stops the job.runtime/ds-bot-upstream, or to any container file in this slice.Dirs touched:
.github/workflows/only.Out of scope: bumping the pin to
v0.4.2, and the repository setting /DS_BOT_TRACK_TOKENsecret (both are owner decisions recorded in this issue).Evidence to hand over with the patch: the patched workflow file at the exact head commit, a
workflow_dispatchrun id (or a dry-run transcript if dispatch is not available locally), and the step-level conclusion for the pull-request step.ci: retry the upstream tracker pull request instead of skipping on an…
runtime: track upstream DS Bot v0.4.2
runtime: track upstream DS Bot v0.4.2