GroveEngine/include/grove
StillHammer 31031804ba feat: Add read-only API for concurrent DataNode access & restore test_13 cross-system tests
PROBLEM: test_13 "Cross-System Integration" had concurrent DataNode reads removed because
getChild() and getDataRoot() return unique_ptr (ownership transfer), making concurrent
reads impossible - each read would create a copy or destroy the data.

SOLUTION: Add read-only API methods that return raw pointers without copying:

API Changes:
1. **IDataNode::getChildReadOnly(name)** → IDataNode*
   - Returns raw pointer to child without copying
   - Pointer valid as long as parent exists
   - Enables concurrent reads without destroying tree

2. **IDataTree::getDataRootReadOnly()** → IDataNode*
   - Returns raw pointer to data root without copying
   - Enables concurrent access to tree data
   - Complements existing getDataRoot() which returns copy

3. **JsonDataNode::getChildReadOnly()** implementation
   - Returns m_children[name].get() directly
   - Zero-overhead, no allocation

4. **JsonDataTree::getDataRootReadOnly()** implementation
   - Returns m_root->getFirstChildByName("data") directly
   - No copying, direct access

Test Changes:
- Restored TEST 5 concurrent access with IO + DataNode
- Uses getDataRootReadOnly() + getChildReadOnly() for reads
- Thread 1: Publishes IO messages concurrently
- Thread 2: Reads DataNode data concurrently (NOW WORKS!)
- Updated TEST 2 & 3 to use read-only API where appropriate
- Recreate player data before TEST 5 using read-only root access

Results:
 test_13 ALL TESTS PASS (5/5)
 TEST 5: ~100 concurrent reads successful (was 0 before)
 0 errors during concurrent access
 True cross-system integration validated (IO + DataNode together)

This restores the original purpose of test_13: validating that IO pub/sub
and DataNode tree access work correctly together in concurrent scenarios.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 14:02:06 +08:00
..
ASerializable.h feat: Implement complete IDataNode/IDataTree system with JSON backend 2025-10-28 15:36:25 +08:00
DataTreeFactory.h feat: Implement complete IDataNode/IDataTree system with JSON backend 2025-10-28 15:36:25 +08:00
DebugEngine.h feat: Add comprehensive hot-reload test suite with 3 integration scenarios 2025-11-13 22:13:07 +08:00
EngineFactory.h feat: Implement complete IDataNode/IDataTree system with JSON backend 2025-10-28 15:36:25 +08:00
ICoordinationModule.h feat: Implement complete IDataNode/IDataTree system with JSON backend 2025-10-28 15:36:25 +08:00
IDataNode.h feat: Add read-only API for concurrent DataNode access & restore test_13 cross-system tests 2025-11-20 14:02:06 +08:00
IDataTree.h feat: Add read-only API for concurrent DataNode access & restore test_13 cross-system tests 2025-11-20 14:02:06 +08:00
IDataValue.h feat: Implement complete IDataNode/IDataTree system with JSON backend 2025-10-28 15:36:25 +08:00
IEngine.h feat: Implement complete IDataNode/IDataTree system with JSON backend 2025-10-28 15:36:25 +08:00
IIO.h feat: Implement complete IDataNode/IDataTree system with JSON backend 2025-10-28 15:36:25 +08:00
ImGuiUI.h feat: Implement complete IDataNode/IDataTree system with JSON backend 2025-10-28 15:36:25 +08:00
IModule.h feat: Add integration tests 8-10 & fix CTest configuration 2025-11-19 07:34:15 +08:00
IModuleSystem.h feat: Add comprehensive hot-reload test suite with 3 integration scenarios 2025-11-13 22:13:07 +08:00
IntraIO.h feat: Complete migration from json to IDataNode API 2025-10-30 07:17:06 +08:00
IntraIOManager.h feat: Add StillHammer Logger & IntraIO batching (WIP) 2025-11-20 03:01:09 +08:00
IOFactory.h feat: Complete migration from json to IDataNode API 2025-10-30 07:17:06 +08:00
IRegion.h feat: Implement complete IDataNode/IDataTree system with JSON backend 2025-10-28 15:36:25 +08:00
ISerializable.h feat: Implement complete IDataNode/IDataTree system with JSON backend 2025-10-28 15:36:25 +08:00
ITaskScheduler.h feat: Implement complete IDataNode/IDataTree system with JSON backend 2025-10-28 15:36:25 +08:00
IUI_Enums.h feat: Implement complete IDataNode/IDataTree system with JSON backend 2025-10-28 15:36:25 +08:00
IUI.h feat: Implement complete IDataNode/IDataTree system with JSON backend 2025-10-28 15:36:25 +08:00
JsonDataNode.h feat: Add read-only API for concurrent DataNode access & restore test_13 cross-system tests 2025-11-20 14:02:06 +08:00
JsonDataTree.h feat: Add read-only API for concurrent DataNode access & restore test_13 cross-system tests 2025-11-20 14:02:06 +08:00
JsonDataValue.h feat: Implement complete IDataNode/IDataTree system with JSON backend 2025-10-28 15:36:25 +08:00
ModuleFactory.h feat: Implement complete IDataNode/IDataTree system with JSON backend 2025-10-28 15:36:25 +08:00
ModuleLoader.h feat: Add comprehensive hot-reload test suite with 3 integration scenarios 2025-11-13 22:13:07 +08:00
ModuleSystemFactory.h feat: Implement complete IDataNode/IDataTree system with JSON backend 2025-10-28 15:36:25 +08:00
RandomGenerator.h feat: Implement complete IDataNode/IDataTree system with JSON backend 2025-10-28 15:36:25 +08:00
Resource.h feat: Implement complete IDataNode/IDataTree system with JSON backend 2025-10-28 15:36:25 +08:00
ResourceRegistry.h feat: Implement complete IDataNode/IDataTree system with JSON backend 2025-10-28 15:36:25 +08:00
SequentialModuleSystem.h feat: Add comprehensive hot-reload test suite with 3 integration scenarios 2025-11-13 22:13:07 +08:00
SerializationRegistry.h feat: Implement complete IDataNode/IDataTree system with JSON backend 2025-10-28 15:36:25 +08:00