Repository navigation
fix(xcstrings): keep conflict resolutions valid JSON - #16071
Conversation
Attach separators to the non-empty sides of per-key conflicts, including the preceding separator when a deleted key was last in its object. Pin the ours conflict skeleton and resolution behavior in the merge-driver tests. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
All contributors have signed the CLA ✍️ ✅ |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 7 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. Review configuration: ⚙️ Run configurationConfiguration used: Repository: manaflow-ai/cmux/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Reviewed this independently of the summary, by reading the diff and running it rather than trusting the report. The fix is correct. What the defect was
Why the fix holdsThe comma now travels with the content. Two things I checked because they are where this shape usually goes wrong:
The Tests
One nit, not blocking
ContextThis is the follow-up to the defect that went in with #15858, which was squash-merged at I am not touching the merge button on this one; handing that back. |
|
Re-checked at
Nothing further from me on this one. The merge button is yours. |
Keep both the reported-key coverage and unrelated-key exclusion assertions in the renamed conflict-region test. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
CI failure attributionCI passes on Written by |
…t-comma Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…t-comma Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Merge receipt for |
0906bcb fix: make main's full test suite pass again (manaflow-ai#16429) 11bfe00 Restore custom sidebar preview gallery (manaflow-ai#16535) 343dd1b web: sync all Hexclave webhooks into a validated, order-independent mirror (manaflow-ai#16339) 00547d5 ci: avoid blaming unrelated merges for compile failures (manaflow-ai#16533) b782440 fix(ci): provision Go for every iOS Release archive (manaflow-ai#16534) 3555618 Add a Jump to Bottom button to terminal panes (manaflow-ai#15382) 79febcf fix: tolerate delayed App Store Connect processing (manaflow-ai#16527) fcbf13c fix: export Foundation for remote paste policy (manaflow-ai#16525) 6d86537 Add What's New recap with an off / quiet / sheet setting (manaflow-ai#14876) 256d964 fix(xcstrings): keep conflict resolutions valid JSON (manaflow-ai#16071) 8473bdc fix: upload pasted images into private SSH directories (manaflow-ai#16523) 53c705c Show opt-in model, context %, and estimated cost next to agent status in the sidebar (manaflow-ai#14855) eba3c42 remote relay: permit scoped terminal paste (manaflow-ai#14915) e447665 fix: stop update relaunch prompts from looping (manaflow-ai#15702) 4a46320 Fix Cloud paid team limits for ID-only selected teams (manaflow-ai#16318) c266af9 test(cloud): pin the CLI tree's link error message through the bundled CLI (manaflow-ai#16515) 0059066 Calmer focus feedback: one short pulse, no flash while typing (manaflow-ai#14894) 65930fc fix(remote): preserve tmux split metadata (manaflow-ai#16398) 512817d docs: fill missing unreleased user-facing changes (manaflow-ai#16519) f204ade ci: nightly 120 Hz fling bench for the cmux-next agent pane (manaflow-ai#16511) 2be3b26 Remove generated custom sidebar preview art (manaflow-ai#16518)
Summary
Resolving a delete-versus-modify catalog conflict could leave a comma outside the selected side, producing invalid JSON. The driver now includes separators only on non-empty conflict sides. For the last key in an object, it consumes the preceding separator and places it inside those sides too.
This follows up on #15858 from main. The diff changes only
scripts/merge-xcstrings.pyand its tests. It adds resolution coverage for both sides and the last-key case, pins the ours text preference in the conflict skeleton, corrects the conflict-region assertion, and documents the deliberate line-check asymmetry. The overlap guard remains in place.I traced every refusal return in
main()with Git's arguments supplied: it writes conflict markers or attempts to blank%Aon failure. The existing warning when even blanking fails is preserved.Testing
TMPDIR=/home/leo/tmp python3 tests/test_merge_xcstrings.py: 33 tests passed on39a7ce21a02.python3 scripts/verify-local.py: 15 selected checks passed; Swift syntax was skipped with zero selected Swift files.comma = ""madetest_delete_versus_modify_resolves_to_each_side_as_valid_jsonfail. Swapping the conflict branch to prefer theirs madetest_conflicting_key_skeleton_uses_ours_textfail. Both mutations were restored, and the full runner passed afterward.tests/test_ci_catch_up_pr.pyis absent on current main, so that earlier validation command could not run on this follow-up branch.Changelog
Fixed: Resolving delete-versus-modify string catalog conflicts keeps JSON separators on the selected side.
Generated with Claude Code.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Fixes delete-versus-modify catalog conflicts in
scripts/merge-xcstrings.pyso resolving either side keeps valid JSON instead of leaving a comma outside the selected side.Written for commit f44612e. Summary will update on new commits.