chore(cleanup): remove dead Module stubs and unused imports; restore deferred files

Deletes 21 Module.kt scaffolding objects that were never wired into any DI
registry. Removes unused imports across 8 production and 3 test files.

Restores StageExecutor, CyclePolicyResolver, PolicyValidation, and
ReplayContractTest — these are deferred features, not dead code.
This commit is contained in:
2026-05-19 13:43:21 +04:00
parent 1c70511436
commit 3365208d3a
35 changed files with 77 additions and 88 deletions
@@ -1,3 +0,0 @@
package com.correx.core.agents
object Module
@@ -1,3 +0,0 @@
package com.correx.core.artifacts
object Module
@@ -1,3 +0,0 @@
package com.correx.core.config
object Module
@@ -1,8 +1,6 @@
package com.correx.core.config
import org.junit.jupiter.api.Test
import java.nio.file.Files
import java.nio.file.Paths
import kotlin.test.assertEquals
class ConfigLoaderTest {
@@ -1,3 +0,0 @@
package com.correx.core.context
object Module
@@ -1,3 +0,0 @@
package com.correx.core.observability
object Module
@@ -1,3 +0,0 @@
package com.correx.core.policies
object Module
@@ -1,3 +0,0 @@
package com.correx.core.router
object Module
@@ -1,3 +0,0 @@
package com.correx.core.stages
object Module
@@ -1,3 +0,0 @@
package com.correx.core.tools
object Module
@@ -0,0 +1,7 @@
package com.correx.core.transitions.execution
interface StageExecutor {
fun execute(
request: StageExecutionRequest
): StageExecutionResult
}
@@ -0,0 +1,12 @@
package com.correx.core.transitions.policy
class CyclePolicyResolver(
private val bindings: Set<CyclePolicyBinding>
) {
fun resolve(signature: CycleSignature): CyclePolicy? {
return bindings
.firstOrNull { it.cycle == signature }
?.policy
}
}
@@ -0,0 +1,23 @@
package com.correx.core.transitions.policy
class PolicyValidation {
fun validate(
bindings: Set<CyclePolicyBinding>,
knownCycles: Set<CycleSignature>
): List<String> {
val errors = mutableListOf<String>()
val bound = bindings.map { it.cycle }.toSet()
val unbound = knownCycles - bound
if (unbound.isNotEmpty()) {
errors += unbound.map {
"Cycle $it has no policy binding"
}
}
return errors
}
}