Skip to content

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

Draft
myieye wants to merge 1 commit into
developfrom
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
developfrom
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

  • MiniLcmApiValidationWrapper now auto-implements only IMiniLcmReadApi via BeaKona; every write method is hand-written. A drifted/missing write is now a compile error instead of a silently-unvalidated BeaKona forwarder (the root cause in Validation wrapper's CreateEntry override is never reached through IMiniLcmApi #2362). Submit* have no interface defaults after Standardize dry-run sync records and remove the Submit* defaults #2514, so they're implemented here too, forwarding to the inner Submit* to keep the CRDT delete-wins semantics.
  • CreateEntry now validates and forwards its options. Every other method keeps its current validate/pass-through behavior; where a write deliberately does not validate (CreateMorphType, bulk import) that's now an explicit, commented choice rather than an accident.

⚠️ 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

@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: 65a1d7f2-beb6-46b1-8c80-e8a0b62d7a43

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.

@myieye
myieye marked this pull request as ready for review August 14, 2026 09:26
@myieye
myieye force-pushed the claude/validation-wrapper-submit-methods-8e34de branch from a11a856 to 1fb0a03 Compare August 14, 2026 09:26
@argos-ci

argos-ci Bot commented Aug 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Aug 17, 2026, 11:20 AM
e2e (Inspect) ✅ No changes detected - Aug 17, 2026, 11:30 AM

@myieye
myieye marked this pull request as draft August 14, 2026 15:36
Base automatically changed from identifiable-dry-run-records to develop August 17, 2026 11:13
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>
@myieye
myieye force-pushed the claude/validation-wrapper-submit-methods-8e34de branch from 1fb0a03 to ce6938f Compare August 17, 2026 11:13
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.

MiniLcmApiValidationWrapper.CreateEntry skips entry validation

1 participant