Skip to content

[claude] Ignore blank values in JSON patch adds to rich multi-strings - #3004

Merged
myieye merged 1 commit into
developfrom
claude/blank-richstring-patch-add
Nov 19, 2026
Merged

myieye merged 1 commit into
developfrom
claude/blank-richstring-patch-add

Conversation

@myieye

@myieye myieye commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

[Claude, autonomous]

A legacy patch like {"op":"add","path":"/Sentence/en","value":" "} made RichMultiString.Add throw (the converter reads a blank string as null), which breaks snapshot regeneration after a model version bump: fatal in FwHeadless (ThrowOnModelVersionReconcileFailure), logged on every open in FW Lite. Add now treats null like the indexer already does. Verified against a copy of an affected production project: it fails to open without the fix and regenerates all ~18k commits with it.

🤖 Generated with Claude Code

Older commits store RichMultiString values as plain strings, and the
RichString converter reads a blank one as null. The indexer already treats
null as removing the writing system; the typed Add, which JSON patch "add"
ops use, threw a NullReferenceException instead. That broke snapshot
regeneration after a model version bump for any project holding such a
commit: fatal in FwHeadless, logged on every open in FW Lite.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the 🔩 FW Lite Core Shared MiniLcm, CRDT and sync libraries that ship in both FW Lite and FwHeadless label Nov 18, 2026
@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

RichMultiString.Add now removes the specified key and returns when the supplied value is null. New JSON Patch tests cover empty and space-only additions at /fr and /Sentence/en, checking the resulting RichMultiString and ExampleSentence values.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

Suggested reviewers: hahn-kev

Merge Risk: Minimal · up to 7c649

Blank strings in legacy patches no longer cause an exception when RichMultiString values are added, so snapshot regeneration and project opening should succeed. No concrete merge-blocking risk was established.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: blank values in JSON Patch add operations to rich multi-strings are now ignored. The changeset adds a null check in RichMultiString.Add and tests for blank adds at /fr…
Description check Passed The description states the problem: a legacy patch with a blank value made RichMultiString.Add throw, which broke snapshot regeneration after a model version bump. It states the fix: Add now treats nu…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: blank values in JSON Patch add operations to rich multi-strings are now ignored. The changeset adds a null check in RichMultiString.Add and tests for blank adds at /fr and /Sentence/en, so the title matches the code change.

Full details: Description check

Explanation

The description states the problem: a legacy patch with a blank value made RichMultiString.Add throw, which broke snapshot regeneration after a model version bump. It states the fix: Add now treats null like the indexer. This matches the null check added in RichMultiString.cs and the new tests.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

A rabbit checks each patch with care
A blank value leaves no trace there
The French key steps aside
The sentence stays empty inside
Soft paws approve the tests tonight

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4905010d-9393-40e1-8fb3-9e0572f4dd67
Commits

Reviewing files that changed from the base of the PR and between e82558e and 7c649d9.

Files selected for processing: 2

  • backend/FwLite/MiniLcm.Tests/RichMultiStringTests.cs
  • backend/FwLite/MiniLcm/Models/RichMultiString.cs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@myieye
myieye merged commit 0ccdaa5 into develop Nov 19, 2026
24 checks passed
@myieye
myieye deleted the claude/blank-richstring-patch-add branch November 19, 2026 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔩 FW Lite Core Shared MiniLcm, CRDT and sync libraries that ship in both FW Lite and FwHeadless

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants