fix(automation): only run the pre-run git sync under the scheduler - #387
Merged
Merged
Conversation
A manual `python -m automation run ten_minute` hard-reset the checkout to origin/main. Gate sync_before_run on CRONTAB_PATH like the unknown-profile recovery, so only supercronic-driven runs sync. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #386. This commit was pushed to that branch just after it merged, so it never made it to main.
Problem
Running
python -m automation run ten_minuteby hand (not a dry run) triggerssync_before_run, which runsgit reset --hard origin/main. Any tracked local edits on the box are lost.Fix
Only run the pre-run sync when
CRONTAB_PATHis set, which only the monitoring systemd unit does. #386 already applies the same check to the unknown-profile recovery. A manual run now logsskipping pre-run git sync: not running under the schedulerand runs the tasks against the current checkout. Scheduled runs don't change.Testing
pytest: 1399 passed. ruff is clean.CRONTAB_PATHfrom fix(automation): keep syncing after profile renames and reload the crontab without a restart #386, and the next scheduled sync pulls this in.🤖 Generated with Claude Code