Skip to content

[claude] Validate CreateEntry and compile-enforce the validation wrapper's writes - #2519

Draft
myieye wants to merge 1 commit into
identifiable-dry-run-recordsfrom
claude/validation-wrapper-submit-methods-8e34de
Draft

[claude] Validate CreateEntry and compile-enforce the validation wrapper's writes#2519
myieye wants to merge 1 commit into
identifiable-dry-run-recordsfrom
claude/validation-wrapper-submit-methods-8e34de

Conversation

@myieye

@myieye myieye commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

[Claude, autonomous]

Stacked on #2514 (base branch identifiable-dry-run-records).

Consolidates #2359 and #2362 (same underlying bug) and acts on the decision from #2359: turn on the entry validation that signature-drift silently removed.

What changed

⚠️ Risk — why this is a draft

Sync wraps both sides with this same validation wrapper (CrdtFwdataProjectSyncService), and EntrySync creates entries through it. FwData reads deliberately preserve empty MultiString values (FromLcmMultiString maps empty TsStrings back to "" for round-tripping), and EntryValidator.NoEmptyValues now rejects those on create. So turning CreateEntry validation on can make sync of legitimate FLEx data throw.

Note: user-facing JSON/REST/JS creates are safe — MultiStringConverter.Read strips empty values on deserialization. The gap is the in-process fwdata↔crdt sync path.

Sync_CreatingEntryWithEmptyFlexValue_ShouldNotBeRejected (in EntrySyncTests) fails on purpose to keep this gap visible until we decide how to handle it (user-facing-only validation, a sync-specific profile, stripping empties on import, or reconsidering NoEmptyValues).

Tests

  • MiniLcmApiValidationWrapperTests (new, unit): pins that CreateEntry validates and forwards options, that UpdateEntry/CreateSense validate, and that CreateMorphType deliberately doesn't. Passing.
  • Sync_CreatingEntryWithEmptyFlexValue_ShouldNotBeRejected: deliberately failing, flags the fwdata→crdt gap above.

Closes #2359 (#2362 was consolidated into it).

🤖 Generated with Claude Code

The validation wrapper auto-implemented the whole IMiniLcmApi via BeaKona, so
a drifted or missing write override became a silent unvalidated forwarder
instead of a compile error. That's how CreateEntry's validation went missing:
its 1-arg override no longer matched the 2-arg interface member, and every
caller bound to the generated forwarder (#2359 / #2362).

- BeaKona now forwards only IMiniLcmReadApi; every write method is hand-written,
  so a missing write is a compile error. Submit* have no interface defaults
  after the base PR, so they're implemented here too (forwarding to the inner
  Submit* to keep CRDT delete-wins).
- CreateEntry now validates and forwards its options. Other methods keep their
  current validate/pass-through behavior; where a write deliberately doesn't
  validate (CreateMorphType, bulk import) that's now explicit.

Risk (why this is a draft): sync wraps both sides with this wrapper, and FwData
reads preserve empty MultiString values, which EntryValidator.NoEmptyValues now
rejects on create. A deliberately-failing sync test flags that gap.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions github-actions Bot added the 💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related label Jul 30, 2026
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 446f36d2-17fb-4fe4-840c-fdb262f8bf55

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant