Skip to content

fix(automation): only run the pre-run git sync under the scheduler - #387

Merged
spalen0 merged 1 commit into
mainfrom
fix/automation-gate-manual-sync
Sep 26, 2026
Merged

spalen0 merged 1 commit into
mainfrom
fix/automation-gate-manual-sync

Conversation

@spalen0

@spalen0 spalen0 commented Sep 26, 2026

Copy link
Copy Markdown
Collaborator

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_minute by hand (not a dry run) triggers sync_before_run, which runs git reset --hard origin/main. Any tracked local edits on the box are lost.

Fix

Only run the pre-run sync when CRONTAB_PATH is set, which only the monitoring systemd unit does. #386 already applies the same check to the unknown-profile recovery. A manual run now logs skipping pre-run git sync: not running under the scheduler and runs the tasks against the current checkout. Scheduled runs don't change.

Testing

🤖 Generated with Claude Code

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>
@spalen0
spalen0 merged commit 9be00ba into main Sep 26, 2026
3 checks passed
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.

1 participant