fix(aw-sync): skip dot-directories when walking peer databases - #702
Conversation
Review guide (auto-posted)Structured warm-up for reviewers — what changed, what to run, where to look. Key files
Suggested verification
Known risks / watch points
Suggested review focus
Generated by |
|
One |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #702 +/- ##
==========================================
+ Coverage 70.81% 79.41% +8.59%
==========================================
Files 51 74 +23
Lines 2916 7825 +4909
==========================================
+ Hits 2065 6214 +4149
- Misses 851 1611 +760 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
CI-green and mergeable — waiting only on a maintainer click. This PR is ready to merge, but the bot has pull-only access to this repo and can't self-merge — surfacing it here so it isn't lost. The monitoring loop will stop re-flagging it now that this note is posted. |
🤖 AI code reviewThis PR adds a helper Safe to merge — no P0/P1 findingsConfidence 5/5 ✅ No thread-worthy findings. Advisory notes follow; they are retained without opening review threads. 1 advisory finding (summary-only, not scored)These P2 guard, heuristic, trade-off, or documentation claims are retained for judgment without opening review threads.
This is a How this was verified: static preflight: fix-commit + touched-files scan (rule 7) Files changed (1) — the diff as I read it
Previous review passes
Reviewed Maintainer commands
|
2ecfb10 to
2b58d4a
Compare
|
@TimeToBuildBob Re-verified on But the |
2b58d4a to
72d099c
Compare
`.git`, `.stfolder`, and `.stversions` are not host folders. The 2-level and 3-level walkers used to descend into them; because they propagate I/O errors, an unreadable entry under a metadata dir aborted the whole pass. ActivityWatch#689 item 3. Git-Session-Id: 6a1c8cc0-cfa7-5a7e-a4ee-d4eea39f9844
72d099c to
d7cc1ea
Compare
|
Two follow-up pushes since the rebase comment: an intermediate head had a stray brace in the test module (caught by local |
to_str() returns None for non-UTF8 filenames, so a dot-directory with invalid UTF-8 bytes after the leading '.' was not recognized as a dot-dir and could still be walked — the exact failure mode this fix addresses (ActivityWatch#689). to_string_lossy() preserves the valid-ASCII leading byte regardless of what follows. Flagged by AI review on ActivityWatch#702. Git-Session-Id: 065f
|
AI review threads addressed: fixed the real one (non-UTF8 dot-dir names not recognized by |
|
|
|
CI green on |
|
Merge verified live — |
Fixes item 3 of #689. Independent of the parked daemon-layout switch in #685.
Problem
list_remote_dbs(3-levelpull_allwalker) andfind_remotes(2-level walker) recurse into every directory at the first (and, for 3-level, second) level with no name filter. That includes.git,.stfolder, and.stversions.No
.dbfiles live there in the common case, so this was not a correctness bug — but both walkers now propagate I/O errors rather than swallowing them. An unreadable entry under a metadata dir aborts the whole pass. Syncthing Trash Can versioning can also place a.dbat{sync}/.stversions/*.db, shallow enough for the 2-level walker to treat it as a peer.Fix
Skip
.-prefixed directories in:list_remote_dbs(host and device levels)find_remotes(first level)scan_sync_dir(soaw-sync statusdoes not walk.giteither)Not in this PR: leftover 2-level staging db cleanup, stale
-synced-from-prune, or thetest.dbrename (items 1, 2, 4 of #689). Those wait on the layout we are not switching to in v0.14.0.Tests
list_remote_dbs_skips_dot_directoriesfind_remotes_skips_dot_directoriesscan_sync_dir_skips_dot_directoriesDoes not touch the
sync_runregion rewritten in #698, so it is independent of the #700 → #678 → #697 merge order.