Skip to content

fix(runner-updaters): stop the NOS and swm updaters racing on git pull - #291

Merged
smartwatermelon-agent[bot] merged 1 commit into
mainfrom
claude/fix-updater-pull-race-0ff2a5bc
Nov 18, 2026
Merged

smartwatermelon-agent[bot] merged 1 commit into
mainfrom
claude/fix-updater-pull-race-0ff2a5bc

Conversation

@smartwatermelon-agent

Copy link
Copy Markdown
Contributor

Both runner updaters on MIMOLETTE can update the shared dev-env clone again. Since 13:14 on 2026-11-18, every pass of both had failed.

Both LaunchAgents pull ~/.local/share/dev-env every 600 s, and launchd starts them in the same second. Two concurrent git pull --ff-only runs both fail with Cannot rebase onto multiple branches, because each fetch appends to the shared FETCH_HEAD. Reproduced on MIMOLETTE: 3 of 3 concurrent pairs failed.

  • Both updaters now run git fetch --quiet --no-write-fetch-head origin, then git merge --quiet --ff-only origin/main. Five concurrent pairs on the same clone all succeeded.
  • The log line is now git update failed; will retry. Tests cover a merge failure and assert that neither updater runs git pull.
  • Both runbooks describe the new sequence and why it is not git pull.

The code reviewer noted that origin/main is hardcoded. The clone is on main (checked on MIMOLETTE), and the runbooks say it stays there. These failures were silent. A follow-up PR adds an ntfy alert after an hour of failed updates.

Advances #252

Both updater LaunchAgents pull the shared ~/.local/share/dev-env clone
every 600 s, and launchd starts them in the same second. Two concurrent
pulls both fail with "Cannot rebase onto multiple branches", because
each fetch appends to the shared FETCH_HEAD. Reproduced on MIMOLETTE:
3 of 3 concurrent pairs failed. From 13:14 on 2026-11-18 every pass of
both updaters failed, so neither runner got new code.

Both now run `git fetch --quiet --no-write-fetch-head origin` and then
`git merge --quiet --ff-only origin/main`. Five concurrent pairs of
that sequence on the same clone all succeeded. A lost ref race on a new
commit fails one side, which retries next interval. The log line is
now "git update failed; will retry", and tests cover a merge failure
and assert that neither updater runs git pull.

Advances #252
@smartwatermelon-agent
smartwatermelon-agent Bot merged commit 74b9401 into main Nov 18, 2026
6 checks passed
@smartwatermelon-agent
smartwatermelon-agent Bot deleted the claude/fix-updater-pull-race-0ff2a5bc branch November 18, 2026 23:16
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.

0 participants