From 0634f2048c7c9a474aab1d8104b964b3bf70a064 Mon Sep 17 00:00:00 2001 From: tanaka takashi Date: Sat, 4 Jul 2026 17:21:32 +0900 Subject: feat(P1-002): migrate offline JSONL import/export to dedicated CLI - Replace the MCP import_messages tool with standalone CLI commands: iny-convmem-mcp --data-dir --import iny-convmem-mcp --data-dir --export - Add src/cli/{import,export,cli.h} and a CTest process test (tiny-convmem-mcp.cli) covering round-trip, manifest generation, overwrite/reject policies, and include_deleted export. - Fix Debug heap corruption in iny_store_import() by deep-copying imported messages instead of taking ownership of caller-allocated records, which were later freed by the caller. - Remove the now-redundant src/mcp/tools/import_messages.c and keep the tool registry at 7 MCP tools. - Update docs/development-plan.md (P1-002 complete) and docs/implementation-status.md with CLI test coverage. --- tests/CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests/CMakeLists.txt') diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 0bc5d89..b0d86b2 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -115,6 +115,16 @@ add_test( ) set_tests_properties(tiny-convmem-mcp.lifecycle PROPERTIES TIMEOUT 15) +add_test( + NAME tiny-convmem-mcp.cli + COMMAND "${CMAKE_COMMAND}" + "-DSERVER=$" + "-DIMPORT_INPUT=${CMAKE_CURRENT_SOURCE_DIR}/fixtures/import-sample.jsonl" + "-DDATA_DIR=${CMAKE_CURRENT_BINARY_DIR}/cli-data" + -P "${CMAKE_CURRENT_SOURCE_DIR}/cli.cmake" +) +set_tests_properties(tiny-convmem-mcp.cli PROPERTIES TIMEOUT 15) + add_test(NAME tiny-convmem-mcp.requires-data-dir COMMAND $) set_tests_properties(tiny-convmem-mcp.requires-data-dir PROPERTIES WILL_FAIL TRUE) @@ -150,6 +160,7 @@ if(TINY_CONVMEM_ENABLE_ASAN AND MSVC) tiny-convmem-mcp.sys tiny-convmem-mcp.storage tiny-convmem-mcp.lifecycle + tiny-convmem-mcp.cli tiny-convmem-mcp.requires-data-dir tiny-convmem-mcp.audit APPEND PROPERTY ENVIRONMENT_MODIFICATION -- cgit v1.2.3