Repository navigation
fix(overlay): sync --unattended --dry-run plans the scheduled run and writes nothing - #697
Merged
Merged
Conversation
… writes nothing With --unattended the --dry-run flag was ignored: the run applied, advanced the lock pin and recorded its outcome, the same as the scheduled job. It now plans every due overlay the same way, prints "would apply" or "would hold" with what it would accept and leave pending, and writes no file, no lock and no recorded outcome. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: mboiman <mboiman@gmail.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.
Why
sync --dry-runis the documented way to preview a sync. Combined with--unattendedthe flag was ignored: the run applied, advanced the lock pin and recorded its outcome forstatus, exactly like the scheduled job. Found on 2026-11-18 while testingmaterialize.unattended_accept(#696) on a live instance: the "preview" wrote 9 files and moved the pin. A preview that writes is worse than none, because its output reads as "nothing happened yet".The cause predates #696:
cmd_syncdispatches--unattendedtocmd_sync_unattendedbefore--dry-runis looked at, and that path had no dry mode.What
sync --unattended --dry-runplans every due overlay the way the scheduled run would (interval, blockers,unattended_accept) and printsunattended <name>: would apply (...)orwould hold (...), naming what it would accept and leave pending..bridge/overlay-unattended.yaml, sostatusis unchanged. A closing line says[dry-run] no files written, nothing recorded.overlay-autosync.shnever passes--dry-run.docs/org-overlays.mddocuments the preview.Tests
Test first: new section 32 in
scripts/tests/test-overlay.sh.main(new test, old code): 435 passed, 7 failed (files written, pin moved, lock changed, outcome recorded, no "would apply").python3 scripts/check-all.py: 27 green.would apply; checksums of the lock, the unattended state and every overlay-managed file are identical before and after.🤖 Generated with Claude Code