Say how far each computer has got, and keep synced folders where they belong #147
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.50) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 570 lines diff across 7 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.380
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #147"
general
weight: 0.35
ethanteng
Why
Two things went wrong after adding a Mac and switching from syncing everything to syncing just Desktop:
idleand the host'slocalFiles/localBytes.~/Uncloud/uncloud-desktop-1bc24a84c811, and an empty-ish~/Uncloud/Desktopsat beside it. Pairing had synced all of the files first, at~/Uncloud, which created~/Uncloud/Desktop. When that was stopped and Desktop synced instead, Syncthing's own auto-accept found the name taken and fell back to the folder ID. The stopped "Uncloud" folder also stayed configured on the Mac over all of~/Uncloud, with 615 files it could never get.What changed
Host / web
ISyncthingApi.ProgressAsyncreads/rest/db/completionfor a folder and device.SyncService.StatusAsyncaddsComputers(state, completion, need bytes and items) to each folder for the account's own devices.SyncPanelsays "Up to date" only when every computer has all of the folder. Otherwise it says who is still getting it and how much is left, for example "Sending to Ethan's MacBook Pro: 10% there, 22.2 GB to go". A computer that hasn't accepted the folder gets "Waiting for … to accept it", and one that's away gets "… catches up when it's back online". Syncthing reports an offline device asunknownbut keeps its numbers, so a laptop asleep with everything still reads "Up to date".POST /api/sync/computers/folders(anonymous, likerelease). A computer signs a challenge with its Syncthing key and is told the place of each folder shared with it.ComputerReleases.SignedByAsyncis shared with release. The message is taggeduncloud-folders-v1, so a release signature can't be replayed for this, or the other way round.Mac app (
ComputerSync.KeepInStepAsync, run on every 5-second status check)autoAcceptFoldersoff for the host and accepts the host's offers itself, at the host's path. It asks the host only when something needs placing, caches the answer (a folder's ID is a hash of its path, so the answer never goes stale), and asks at most every 30 s. A host without the endpoint (401/404) falls back to the folder's name, as before.notSharingfor it for a whole minute while connected (StoppedFor), so a brief mismatch right after pairing doesn't restart a folder. The files stay.~/Uncloud/<its id>to its proper place: it pauses the folder, renames the directory, sets the new path, then unpauses. It only moves into a place where nothing exists yet, and moves back if setting the path fails.SetDefaultFolderPathAsyncis gone: with auto-accept off, nothing uses it.For reviewers
FakeSyncthingonly, not a real Syncthing. The/rest/db/completionshape (remoteState,completion,needBytes,needItems) was checked against the Mac app's real Syncthing.uncloud-desktop-…is renamed to~/Uncloud/Desktop(the leftover there was already removed by hand).Tests
dotnet test Homebase.slnx: 506 passed. Web:npm run test, 181 passed;tsc -bclean;npm run buildOK.StoppedForwhile connected, and its files stay; "all of the files" waits for an overlapping folder to go, then lands at~/Uncloud; a folder under its ID moves only into a free spot; an unreachable host is asked again afterAskAtMostEvery, and an old host means placement by name; the signed folders endpoint, end to end, including refusing a release signature and a stranger; status carries per-computer progress.syncProgress.test.tsxcovers each wording, including that a computer the server couldn't ask about is never shown as done.🤖 Generated with Claude Code