fix(sync): preserve personal record tombstone snapshots#666
fix(sync): preserve personal record tombstone snapshots#6669thLevelSoftware wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 56d1c17b91
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| mapper = ::mapToPR, | ||
| ) | ||
| .executeAsOneOrNull() | ||
| val currentWeightPR = storedWeightPR?.takeIf { it.deletedAt == null } |
There was a problem hiding this comment.
Recompute stored 1RM when reviving a deleted PR
When the deleted row was an outlier that previously raised Exercise.one_rep_max_kg, this new filtering makes a later lower lift count as a new active PR, but the same method still only updates the exercise 1RM when the new estimate is greater than the stored value. In that scenario the active PR is replaced with the lower valid lift while ESTIMATED_1RM / percentage-based weight paths keep using the deleted outlier’s stale 1RM, so deleting an erroneous max still leaves generated weights too high.
Useful? React with 👍 / 👎.
Code Review Roast 🔥Verdict: No Issues Found | Recommendation: Merge Oh wait, this PR is actually clean. I had my flamethrower warmed up for the Privacy SNAFU and the tombstone-overwrite smell, and you came back with the smallest, tightest fix I've seen in a while. I'm suspicious. The tombstone-aware The privacy fix in Correctness: No findings. The LWW guard, UUID retention via Ponytail: Lean already. Ship. The diff is +64/-22 across 6 files, but almost all of it is required SQL CASE logic, tests, and one well-justified comment per site. Nothing to delete. 🏆 Best part: The test 💀 Worst part: Honestly nothing. The two-line comment at 📊 Overall: Like a re-run of a production incident postmortem — short, focused, and the tests prove the regression won't return. Merging. Fix these issues in Kilo Cloud Files Reviewed (6 files)
Reviewed by minimax-m3 · Input: 36.6K · Output: 20.7K · Cached: 852.9K |
Follow-up correction for Issue #655
Fixes #655.
The merged implementation correctly introduced Personal Record tombstone sync, but post-merge review identified two correctness defects and one privacy defect:
Regression coverage
Validation
./gradlew :shared:testAndroidHostTest --no-daemon -Pskip.supabase.check=true./gradlew :androidApp:assembleDebug --no-daemon -Pskip.supabase.check=trueorigin/mainbaseline and pass with this patch.Visual evidence
This correction does not alter the successful Personal Records interaction or layout; the existing built-app evidence from the merged implementation remains current: