chore(damn): detekt, build, tests, formatting

fixed detekt issues where possible.
fixed disttar failing build because tools is added twice in the server module.
added workflowId where required.
fixed some tests not being recognized because of runBlocking without explicit return type.
formatting + imports.
This commit is contained in:
2026-05-22 00:10:05 +04:00
parent 2c459da009
commit f827685ed0
185 changed files with 1134 additions and 832 deletions
@@ -50,4 +50,4 @@ object EventFixtures {
)
}
}
}
@@ -11,7 +11,6 @@ import com.correx.core.events.types.InferenceRequestId
import com.correx.core.events.types.ProviderId
import com.correx.core.events.types.SessionId
import com.correx.core.events.types.StageId
import com.correx.core.utils.TypeId
import com.correx.core.inference.FinishReason
import com.correx.core.inference.GenerationConfig
import com.correx.core.inference.InferenceProvider
@@ -20,6 +19,7 @@ import com.correx.core.inference.InferenceResponse
import com.correx.core.inference.InferenceRouter
import com.correx.core.inference.ModelCapability
import com.correx.core.inference.TokenUsage
import com.correx.core.utils.TypeId
import com.correx.testing.fixtures.inference.MockInferenceProvider
import kotlinx.datetime.Clock
import java.util.*
@@ -20,6 +20,7 @@ object WorkflowFixtures {
)
return WorkflowGraph(
id = "workflow-test",
stages = mapOf(a to StageConfig(), b to StageConfig()),
transitions = setOf(t1),
start = a
@@ -69,4 +69,4 @@ class MockInferenceProvider(
override fun capabilities(): Set<CapabilityScore> = declaredCapabilities
}
class InferenceProviderException(message: String) : Exception(message)
class InferenceProviderException(message: String) : Exception(message)
@@ -14,4 +14,4 @@ class MockTokenizer : Tokenizer {
override suspend fun countTokens(text: String): Int =
(text.length + 3) / 4
}
}
@@ -32,12 +32,13 @@ object TransitionFixtures {
val c = StageId("C")
return WorkflowGraph(
id = "workflow-test",
stages = mapOf(a to StageConfig(), b to StageConfig(), c to StageConfig()),
transitions = setOf(
TransitionEdge(id = TransitionId("t1"), from = a, to = b, condition = { true }),
TransitionEdge(id = TransitionId("t2"), from = b, to = c, condition = { true }),
),
start = a
start = a,
)
}