Skip to content

Split entry API out of CrdtMiniLcmApi - #2738

Merged
hahn-kev merged 1 commit into
claude/crdt-mini-lcm-example-sentence-apifrom
claude/crdt-mini-lcm-entry-api
Oct 7, 2026
Merged

hahn-kev merged 1 commit into
claude/crdt-mini-lcm-example-sentence-apifrom
claude/crdt-mini-lcm-entry-api

Conversation

@hahn-kev-bot

Copy link
Copy Markdown
Collaborator

AI summary

Summary

Stacked on #2734. This is the last PR in the stack: it moves the entry methods into CrdtEntryApi, after which CrdtMiniLcmApi only forwards calls.

 LcmCrdt/
 ├── CrdtMiniLcmApi.cs            # 1173 → 690 lines, forwarders only
 └── MiniLcmImp/
     ├── CrdtCommentApi.cs        # #2731
     ├── CrdtCustomViewApi.cs     # #2731
     ├── CrdtMediaApi.cs          # #2731
     ├── CrdtPictureApi.cs        # #2732
     ├── CrdtSenseApi.cs          # #2733
     ├── CrdtExampleSentenceApi.cs # #2734
+    └── CrdtEntryApi.cs          # Count/Get/Search/GetEntryIndex, Create, BulkCreate, Update ×2, Delete
 CrdtMiniLcmApi(
-  HarmonyChangeWriter, MiniLcmRepositoryFactory, ILogger<CrdtMiniLcmApi>,
   CurrentProjectService,
+  CrdtEntryApi,
   …14 other sub-services,
-  EntrySearchService? = null)

Method bodies were moved unchanged. Other details:

  • IsEntryDeleted moves together with the commented-out checks in CreateEntry that reference it.
  • BulkCreateBatchSize moves to CrdtEntryApi, and BulkCreateEntriesTest now sets it on the scoped CrdtEntryApi. That is the same instance the facade uses, so the tests still exercise multi-batch flushes.
  • The optional EntrySearchService? parameter was carried over as it is. EntrySearchService is never registered in DI (only EntrySearchServiceFactory is), so the parameter is always null and the search-table regenerate after a bulk import never runs. That was already true before this PR, and a separate follow-up will investigate it.

Merge Danger

Door: two-way

This is a code move with no change in behaviour, so a revert is clean.

Blast Radius: logging

The bulk-import progress logs ("Added {Count} entries") now come from the CrdtEntryApi logger category instead of CrdtMiniLcmApi. Every other behaviour is unchanged.

Evidence

  • LcmCrdt.Tests: 246 passed. Includes BulkCreateEntriesTests, CreateEntryTests, UpdateEntryTests, QueryEntryTests, EntryIndexTests, HomographNumberTests, SortingTests, BasicApiTests, ComplexFormComponentTests, ConfigRegistrationTests.
  • FwLiteProjectSync.Tests: 61 of 62 passed across SyncTests, ImportTests, CrdtEntrySyncTests and Sena3SyncTests.
    • The one failure, ImportsANewlyCreatedWritingSystem, happens only on Windows and has nothing to do with this PR. FwData ignores the font passed to CreateWritingSystem and uses liblcm's per-language default, which is "Charis" on Windows and "Charis SIL" on Linux (see the comment in Sena3SyncTests). No PR in this stack touches writing system or FwData code.

🤖 Generated with Claude Code

Move the entry methods, including CreateEntry and BulkCreateEntries, into
CrdtEntryApi. CrdtMiniLcmApi is now a pure facade that forwards every
IMiniLcmApi member to a sub-service.

BulkCreateBatchSize moves with BulkCreateEntries, so BulkCreateEntriesTest
sets it on the scoped CrdtEntryApi instead of on the facade.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You'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 9 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 730bb348-6c24-48d7-b919-c3a2fdb42b1c
📥 Commits

Reviewing files that changed from the base of the PR and between d5158a9 and 6a51808.

📒 Files selected for processing (4)
  • backend/FwLite/LcmCrdt.Tests/BulkCreateEntriesTest.cs
  • backend/FwLite/LcmCrdt/CrdtMiniLcmApi.cs
  • backend/FwLite/LcmCrdt/LcmCrdtKernel.cs
  • backend/FwLite/LcmCrdt/MiniLcmImp/CrdtEntryApi.cs
  • Autopilot · 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

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

@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 Oct 7, 2026
@hahn-kev
hahn-kev added this pull request to stack #2735 October 7, 2026 07:43
@argos-ci

argos-ci Bot commented Oct 7, 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 - Oct 7, 2026, 7:54 AM
e2e (Inspect) ✅ No changes detected - Oct 7, 2026, 8:00 AM

@hahn-kev hahn-kev added the self-reviewed 👁️ I reviewed this myself and with AI and decided it was safe to merge without a second set of eyes label Oct 7, 2026
@hahn-kev
hahn-kev merged commit 1980ca1 into develop Oct 7, 2026
27 checks passed
@hahn-kev
hahn-kev deleted the claude/crdt-mini-lcm-entry-api branch October 7, 2026 09:45
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 self-reviewed 👁️ I reviewed this myself and with AI and decided it was safe to merge without a second set of eyes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants