refactor(lite): extract owned-string core, drop dead bridge-runtime scaffold
lite_bridge_runtime.{cpp,h} was ~25k lines of dry-dispatch / dynamic-loader
scaffolding that the shipping wallet never used: 0 of its 122 public types
reached the app binary. The only live code on the bridge path was the
owned-string memory-safety helper — LiteClientBridge::linkedSdxl() already
loads the backend via direct litelib_* externs in lite_client_bridge.cpp.
- Extract LiteBridgeOwnedString + liteBridgeRuntimeTakeOwnedString into
src/wallet/lite_owned_string.{h,cpp} (the copy-before-free / free-once /
wipe / "Error:"-classify boundary), with the runtime-friend coupling removed.
- Point lite_client_bridge.cpp at the new header.
- Delete lite_bridge_runtime.{cpp,h} and the 16 runtime-only tests +
their fixtures/aliases in test_phase4.cpp; keep the 5 owned-string tests
(retargeted) and restore testGeneratedResourceBehavior, which had been
caught in the runtime-test line range.
- Swap the CMake source/header references.
Both variants build; full test suite passes; source-hygiene check clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -391,7 +391,7 @@ set(APP_SOURCES
|
||||
src/chat/chat_protocol.cpp
|
||||
src/wallet/lite_backend_artifact_contract.cpp
|
||||
src/wallet/lite_backend_artifact_resolver.cpp
|
||||
src/wallet/lite_bridge_runtime.cpp
|
||||
src/wallet/lite_owned_string.cpp
|
||||
src/wallet/lite_client_bridge.cpp
|
||||
src/wallet/lite_connection_service.cpp
|
||||
src/wallet/lite_wallet_controller.cpp
|
||||
@@ -507,7 +507,7 @@ set(APP_HEADERS
|
||||
src/wallet/wallet_backend.h
|
||||
src/wallet/lite_backend_artifact_contract.h
|
||||
src/wallet/lite_backend_artifact_resolver.h
|
||||
src/wallet/lite_bridge_runtime.h
|
||||
src/wallet/lite_owned_string.h
|
||||
src/wallet/lite_client_bridge.h
|
||||
src/wallet/lite_connection_service.h
|
||||
src/wallet/lite_result_parsers.h
|
||||
@@ -692,7 +692,7 @@ if(DRAGONX_LITE_BACKEND_READY)
|
||||
add_executable(lite_smoke
|
||||
tools/lite_smoke.cpp
|
||||
src/wallet/lite_client_bridge.cpp
|
||||
src/wallet/lite_bridge_runtime.cpp
|
||||
src/wallet/lite_owned_string.cpp
|
||||
src/wallet/lite_backend_artifact_contract.cpp
|
||||
src/wallet/lite_backend_artifact_resolver.cpp
|
||||
src/wallet/lite_connection_service.cpp
|
||||
@@ -941,7 +941,7 @@ if(BUILD_TESTING)
|
||||
src/chat/chat_protocol.cpp
|
||||
src/wallet/lite_backend_artifact_contract.cpp
|
||||
src/wallet/lite_backend_artifact_resolver.cpp
|
||||
src/wallet/lite_bridge_runtime.cpp
|
||||
src/wallet/lite_owned_string.cpp
|
||||
src/wallet/lite_client_bridge.cpp
|
||||
src/wallet/lite_connection_service.cpp
|
||||
src/wallet/lite_wallet_controller.cpp
|
||||
|
||||
Reference in New Issue
Block a user