Test Indexer: Add utilities to read/write entities in-between processing#924
Test Indexer: Add utilities to read/write entities in-between processing#924
Conversation
- Add EntityOps type with get/set methods to TestIndexerFromConfig - Implement makeEntityGet and makeEntitySet in TestIndexer.res - Block entity operations during processing with clear error message - Only expose entity ops for user entities (not internal tables) This enables direct entity manipulation on test indexer: await indexer.Entity.get(id) // returns entity or undefined indexer.Entity.set(entity) // sync, no await needed
- Inline entity operations directly on TestIndexerFromConfig type - Remove separate TestIndexerEntities type - Add tests for Entity.get and Entity.set operations - Test error handling when called during processing
📝 WalkthroughWalkthroughA new public API exposes per-entity Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
| })->Utils.magic, | ||
| ) | ||
|
|
||
| result->Utils.magic |
There was a problem hiding this comment.
Can we add explicit types for the type casting in this function?
JonoPrest
left a comment
There was a problem hiding this comment.
Great looks good 🙏🏼
Non blocking but would prefer we always have explicit types for casting to make it easier to evolve code.
- Annotate Utils.magic with explicit input/output types in makeCreateTestIndexer - Add ReScript coding rule to AGENTS.md about typing Utils.magic calls
Summary by CodeRabbit
New Features
Tests
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.