fix(sync): #240 hold back dangling setlist changes; server refuses referenced song deletes #241
All Vouch review confidence checks passed
Residual risk 0.29 = Change Risk (0.40) × (1 − Review Confidence (0.28)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 306 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 44% · 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
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.343
Real PR Conversation Timeline
1 comments
"Review active on #241"
general
weight: 0.35
chatgpt-codex-connector[bot]
Fixes #240 with the non-destructive design agreed after review (no automatic pruning).
Client (
recordsSync.ts)holdBackMissingReferences: after a round is built, any cloud change that would leave a setlist listing a song not in the library is held back as a conflict (with a reason), and the rest of the round applies:- cloud deleted a song this device still lists → the song stays here ("Removed in the cloud, but setlist "X" on this device still lists it");
- cloud setlist lists songs missing here → this device keeps its own version, or none ("The cloud version lists songs that are not in your library").
Used in normal sync, first sync (adopt) and Replace.
resolveOnce); the resolution snapshot now also keeps the raw cloud records.Server (
songbookRecordsCore.pushRecords)NOT EXISTS … json_each(data_json,'$.songs')in the same transaction) → conflict withreason: 'referenced'.Tests (
recordsSyncClient)Full suite 1691/0 (1 pre-existing browser skip), lint, tsc, build green.
Owner recovery on DEV after deploy: on Edge (still has the 3 songs) open Sync Center → conflicts → "Keep this device" restores Stand By Me / Hotel California / Hallelujah in the cloud; or delete "Acoustic Gig Set" instead. Do not use Replace on Edge before that.
---
_Generated by Claude Code_