Ran "pc-switcher sync fleksi" from p17. We are on fleksi now. It seemed the sync part of…
Rate quality
Private research annotation
Sign in to add a private research label or note.
- User
Ran "pc-switcher sync fleksi" from p17. We are on fleksi now. It seemed the sync part of the first pass was taking long time and it showed multiple GB. First pass should only sync .pcswitcher-filter files, no? Sync part of seconds pass as done in a blitz. Were ALL files synchronized in first pass? Is that the intent?
Assistant
I'll look at the folder sync implementation.
Assistant
Confirmed from the code — your reading of the label is right, but the pass does not do what its name suggests.
src/pcswitcher/jobs/folder_sync.py:743-751: the seeding pass is built withself._build_rsync_cmd(folder, dry_run=False, delete=False)— the exact same mirror command as the real pass, only without--delete. Same-aAXHS, same filter chain, same source/dest. It is not restricted to.pcswitcher-filterfiles.So yes: The second pass then re-walked the tree, found everything already in place, and only had deletions to do — hence the blitz.
- User
Currently, we show "(prep)" for the first pass and nothing for the second pass. This naming is wrong. The first pass is the full no-delete pass, the second pass is the delete-pass. Than naming should be better in code and in tui. What do you propose? Wait for my approval
Assistant
Read the code; one wrinkle drives the proposal.
The second pass is only "the delete pass" when the first pass ran. In the steady state (
_needs_seeding_passfalse, the common case) there is a single pass that both transfers and deletes. So a fixed two-name scheme mislabels the single-pass run.Proposal: three labels, not two.
Case Pass Constant TUI Single pass (steady state) - User
go
Assistant
Approved plan, executing.
Assistant
Now the docstrings and
execute.Assistant
Now
execute:Assistant
Now the tests.
Assistant
Now updating the tests.
Assistant
Now
test_folder_sync.py:Assistant
Draft PR: https://github.com/flaksit/pc-switcher/pull/201
Branch
refactor/198-folder-sync-pass-naming(branched offorigin/main— the earlierfix/198-…branch was already merged via #199).What landed:
PASS_PREP/PASS_FULL→PASS_COPY/PASS_DELETE/PASS_MIRROR;_pass_displaynow leaves onlyPASS_MIRRORunqualified.executehoists the split decision into a local and picksPASS_DELETE if split else PASS_MIRROR; localsseed_files/seed_bytes→copy_files/copy_bytes._needs_seeding_pass→_needs_copy_pass; "seeding" retired across docstrings, tests and ADR-018's one reference.execute's docstring now says plainly that the copy pass is the full transfer, not just filter files.