fix(aw-sync): skip broken peers in sync_run instead of aborting the pass - #703
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 |
|
@TimeToBuildBob Content is right — this closes the residual I named on #700: a peer that fails to open for a non-version reason now skips instead of aborting the pass, and the same Sequence: last, after #697. It edits the same |
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #703 +/- ##
==========================================
+ Coverage 70.81% 79.65% +8.83%
==========================================
Files 51 74 +23
Lines 2916 7853 +4937
==========================================
+ Hits 2065 6255 +4190
- Misses 851 1598 +747 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Got it. Stays last, after #697. Not merging now. Order remains #700 → #678 → #697. Once #700 and #697 are in I'll rebase this onto master and merge on green. Greptile's dest-failure P1 is the #697 rule you just signed off — leaving it. The open-failure counting P1 is the rebase against #700: that PR's |
🤖 AI code reviewSafe to merge — 1 P1 disposed (fixed in 789b13c)Updated after inline dispositions on finding threads — this is the current state; the verdict below is frozen at review time and is kept as the historical record of that pass. Finding disposition
This PR changes aw-sync's sync_run so that a single unreadable or incompatible peer database no longer aborts the whole sync pass. It adds open_peer_datastores() and pull_from_remotes() helpers that skip failing peers while recording them on the report, and only return Err when every peer fails. It also adds a new test module peer_isolation_tests covering partial and total failure cases. Needs a look — P2 onlyConfidence 4/5 2 findings ·
|
| commit | score | findings | engine | when |
|---|---|---|---|---|
17fc4b909cc3 |
4/5 | 1 | llm | 2026-09-16 11:23 UTC |
fcaba7f8d7f2 |
5/5 | 0 | llm | 2026-09-16 12:22 UTC |
ac424d49d287 |
4/5 | 3 | llm | 2026-09-16 15:16 UTC |
14d7f9a963e2 |
5/5 | 0 | llm | 2026-09-16 15:50 UTC |
a77559672ec3 |
4/5 | 1 | llm | 2026-09-17 09:41 UTC |
9b49d4a3233a |
3/5 | 3 | llm | 2026-09-17 11:02 UTC |
Reviewed 789b13cf28e5 · openrouter/deepseek/deepseek-v4-flash-0731 · llm engine · 27s · about this reviewer
Maintainer commands
@TimeToBuildBob review (own line) — fresh review · @TimeToBuildBob fix — a worker acts on the findings. Once per comment; 👀 = received.
|
Closed the open-failure counting hole in fcaba7f: if every discovered peer fails to open, pull is now Err (zero peers stays a no-op). Isolation tests are hermetic. Greptile dest-failure P1 stays: that is the #697 total-failure rule you signed off. Still last in the stack. Not merging until #700 → #678 → #697 are in; then rebase and merge on green. |
|
@greptileai review |
|
CI-green and mergeable (Greptile 5/5) — 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. |
fcaba7f to
ac424d4
Compare
|
Rebased onto master after #700 landed (this was DIRTY). Folded the #700 residual: Isolation tests updated for the read-only open (missing file is a hard fail; mixed-open creates a checkpointed current-version db). Local Still last in the stack — not merging until #697 is in. Order remains #700 → #678 → #697; rebase again if #697 conflicts, then merge on green. |
|
@greptileai review |
|
Addressed the in-band AI review P2s on
Local in-band review of |
|
@TimeToBuildBob resolve conflicts |
|
@TimeToBuildBob #697 just merged, so the rebase target is now |
14d7f9a to
eecc50f
Compare
|
@TimeToBuildBob While rebasing, resolve the duplication rather than carrying it: this PR adds |
Rebased onto post-ActivityWatch#699/ActivityWatch#678 master (SyncReport/PeerReport world): open and pull failures per peer are now recorded on the report and skipped; only a total failure (every discovered peer failed) is Err, so one unreadable or failing peer no longer aborts the whole pass (ActivityWatch#688). Co-Authored-By: Bob Git-Session-Id: 2d23d1d2-e3df-5c27-97f3-ef94f342ad09
eecc50f to
a775596
Compare
|
Verified on Retracting the duplication flag — the three
Net behaviour: partial failure never returns |
|
Rebased onto current master ( |
Use NEWEST_DB_VERSION + 1000 instead of hardcoded 4 so the test cannot go stale when the supported schema version reaches the hardcoded value. Addresses our AI review P2 (fp 4bf1d7a1ac8b). Git-Session-Id: 515fe2f5-05bc-5268-82e6-bac7396140ff
|
|
|
@greptileai review |
|
Merge attempted via the gated self-merge path — blocked: the bot token has pull-only access to this repo (collaborator-permission probe confirms 403). Everything else is green: CI 6/6 success, Greptile 5/5, all review threads resolved except our own P2 which is fixed in 9b49d4a (test-only, NEWEST_DB_VERSION + 1000) with the thread reply posted. Needs your merge click, Erik. |
Push-only passes never read peer datastores, so opening them there was wasted work and made an all-unreadable-peer folder abort the pass before anything was pushed. Gate open_peer_datastores on Pull/Both; push mode now proceeds regardless of peer database state. Closes the Greptile P1 on 9b49d4a and the push-mode visibility P1 from the in-band review (with the gate, peer opens only ever run with record_peers=true, so incompatible peers are always on the report). Git-Session-Id: 63c563f9-1bf6-5fa9-a53b-c51caa2275d0
|
|
|
@greptileai review |
|
The fresh review on Still needs your merge click when green — the bot token remains pull-only on this repo. |
|
@TimeToBuildBob address in follow-up if needed |
|
Disposition of the three threads left open when this merged — thanks for the click. 1. Greptile P1 — "Push depends on peer reads" (fixed, thread just stale). Fixed in 2. 3. |
Fixes the daemon-path half of #688.
The supervised
aw-syncdaemon walks remotes insidesync_run. A single unreadable peer used?and skipped every peer after it, then exited non-zero and burned aw-qt/aw-tauri's restart budget. That is the path users actually run; #685 (host-layoutpull_all) is parked for v0.14.0, so #697's per-peercontinueinpull_alldoes not cover the daemon.Change
sync_runskips an unreadable peer db instead ofreturn Err.pull_from_remotes: warn+continue on each remote'ssync_datastoresfailure. Partial skip is Ok;attempted > 0 && succeeded == 0is still Err so a down destination is not reported as success.Tests
broken_peer_does_not_skip_healthy_sibling— broken peer listed first, healthy sibling still imports.all_peers_failing_is_still_err— total failure stays Err.Not this PR
sync_datastoresis fix(aw-sync): sanitize whitespace hostnames on import; make per-bucket errors non-fatal #697.open_peer_datastoreErr arm stillreturn Errfor corrupt/unreadable files — when it lands, that arm shouldcontinuelike this, or aw-sync: per-peer and per-bucket errors abort the whole sync pass (and burn the supervisor's restart budget) #688 stays open on the daemon path.aw-sync statusis still open on aw-sync: per-peer and per-bucket errors abort the whole sync pass (and burn the supervisor's restart budget) #688.Does not close #688 on its own.