refactor(lite): remove dead backend artifact-contract/resolver scaffold
lite_backend_artifact_{contract,resolver}.{cpp,h} (~1,960 lines) were
app-linked but never invoked: all 14 public entry points
(evaluateLiteBackendArtifactContract/Resolver, evaluateLiteBackendActivation-
Readiness, the resolve*/...Name helpers) had zero callers in the app, the
lite_smoke tool, build scripts, or surviving tests. The real backend load
path (LiteClientBridge::linkedSdxl) uses direct litelib_* externs, and the
DRAGONX_ENABLE_LITE_BACKEND symbol check is done in CMake against the symbols
inventory (FATAL_ERROR on a missing symbol) — not via these C++ files. The
files were saturated with churn markers (disabled / dry-dispatch / scaffold).
- Delete the four artifact files and their 8 CMakeLists references.
- Drop the orphaned test cruft in test_phase4.cpp: the contract include,
5 type aliases, and 3 never-called helpers (heapConstructPlanResult,
makeReadyLiteBackendArtifactProvenance, liteBackendArtifactContractHasIssue)
left over from the already-removed bridge-runtime tests.
- Correct the CLAUDE.md lite-wallet description (it credited these files with
backend validation that CMake actually performs) and drop the stale
lite_bridge_runtime mention.
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:
@@ -20,7 +20,6 @@
|
||||
#include "ui/windows/mining_tab_helpers.h"
|
||||
#include "util/amount_format.h"
|
||||
#include "util/payment_uri.h"
|
||||
#include "wallet/lite_backend_artifact_contract.h"
|
||||
#include "wallet/lite_owned_string.h"
|
||||
#include "wallet/lite_wallet_controller.h"
|
||||
#include "wallet/lite_wallet_gateway.h"
|
||||
@@ -98,11 +97,6 @@ void writeTestFile(const fs::path& path, const std::string& content)
|
||||
output << content;
|
||||
}
|
||||
|
||||
using LiteBackendArtifactContractInput = dragonx::wallet::LiteBackendArtifactContractInput;
|
||||
using LiteBackendArtifactContractIssue = dragonx::wallet::LiteBackendArtifactContractIssue;
|
||||
using LiteBackendArtifactContractLinkMode = dragonx::wallet::LiteBackendArtifactContractLinkMode;
|
||||
using LiteBackendArtifactContractResult = dragonx::wallet::LiteBackendArtifactContractResult;
|
||||
using LiteBackendArtifactContractStatus = dragonx::wallet::LiteBackendArtifactContractStatus;
|
||||
|
||||
|
||||
|
||||
@@ -266,42 +260,6 @@ using LiteBackendArtifactContractStatus = dragonx::wallet::LiteBackendArtifactCo
|
||||
|
||||
|
||||
|
||||
template <typename T, typename Factory>
|
||||
std::unique_ptr<T> heapConstructPlanResult(Factory&& factory)
|
||||
{
|
||||
void* storage = ::operator new(sizeof(T));
|
||||
try {
|
||||
return std::unique_ptr<T>(::new (storage) T(factory()));
|
||||
} catch (...) {
|
||||
::operator delete(storage);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
dragonx::wallet::LiteBackendArtifactProvenanceMetadata makeReadyLiteBackendArtifactProvenance()
|
||||
{
|
||||
dragonx::wallet::LiteBackendArtifactProvenanceMetadata provenance;
|
||||
provenance.ownerReady = true;
|
||||
provenance.metadataProvided = true;
|
||||
provenance.source = "test-fixture";
|
||||
provenance.builder = "phase4-tests";
|
||||
provenance.sourceRevision = "test-revision";
|
||||
provenance.artifactSetId = "phase1-contract";
|
||||
provenance.redacted = true;
|
||||
return provenance;
|
||||
}
|
||||
|
||||
|
||||
bool liteBackendArtifactContractHasIssue(
|
||||
const LiteBackendArtifactContractResult& result,
|
||||
LiteBackendArtifactContractIssue issue)
|
||||
{
|
||||
for (const auto& issueInfo : result.issues) {
|
||||
if (issueInfo.issue == issue) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
int g_liteBridgeRuntimeFakeCallCount = 0;
|
||||
int g_liteBridgeRuntimeTrackedFreeCount = 0;
|
||||
|
||||
Reference in New Issue
Block a user