#14063

refactor(domain): compose cleanup dependencies through analysisErrorCleanup helpers (part 1)

Openmorlutoopened 2d ago

Summary

scripts/verify/baselines/cleanup-dependency-binding.json currently tolerates 53 direct .bindCleanupDependencies(...) calls across 28 files outside src/domain/analysisErrorBase.ts and src/domain/analysisErrorCleanup.ts. Several providers repeat the exact same delegation patterns (bindCleanupDependencies([owner]).bindCleanupResourceOwner(owner) and retainSecondaryFailure(cleanup).bindCleanupDependencies([cleanup])), or hand-build ProviderCleanupError(...).bindCleanupDependencies(...) instead of using providerCleanupErrorFromFailures / withInheritedCleanupOwnership.

Proposed Change

  • Add optional remediationAction to providerCleanupErrorFromFailures, plus withDelegatedCleanupOwner and withSecondaryCleanupFailure in src/domain/analysisErrorCleanup.ts.
  • Migrate 8 files (AnalysisClientFailure.ts, ScreenJudgeProcess.ts, KunaProjectCache.ts, IdaSessionClient.ts, JebMcpConnectionOwner.ts, JebProvider.ts, HopperAnalysisProfile.ts, PcapSnapshot.ts) onto the domain helpers and lower scripts/verify/baselines/cleanup-dependency-binding.json.

Activity

0

No activity yet.