refactor(detekt): extract magic-number constants, wrap long lines, drop legit suppressions

Mechanical detekt cleanup across apps/core/infrastructure (behavior-preserving):
- MagicNumber 62->10: named constants + removed 'legit' MagicNumber suppressions
  (Tier level from ordinal, ReplayInferenceProvider CHARS_PER_TOKEN, ConfigLoader
  DEFAULT_* consts, capability scores, HTTP ranges, column widths, etc.)
- MaxLineLength cut to ~0 in production modules (line wraps, no logic change)
- Dropped one dead parameter (ConfigLoader.parseArray lineNum)

Structural findings (ReturnCount/LongMethod/Complexity/LargeClass) left for a
deliberate decomposition pass. Full build + detekt gate green.
This commit is contained in:
2026-07-12 23:12:28 +04:00
parent 135a34eb2f
commit aee2e67c66
70 changed files with 1034 additions and 236 deletions
@@ -84,12 +84,17 @@ object InfrastructureModule {
private val defaultArtifactsRoot: String =
"${System.getProperty("user.home")}/.config/correx/artifacts"
private const val LLAMA_CODING_SCORE = 0.7
private const val LLAMA_REASONING_SCORE = 0.6
private const val LLAMA_SUMMARIZATION_SCORE = 0.8
private const val LLAMA_TOOL_CALLING_SCORE = 0.5
private val DEFAULT_LLAMA_CAPABILITIES: Set<CapabilityScore> = setOf(
CapabilityScore(ModelCapability.General, 1.0),
CapabilityScore(ModelCapability.Coding, 0.7),
CapabilityScore(ModelCapability.Reasoning, 0.6),
CapabilityScore(ModelCapability.Summarization, 0.8),
CapabilityScore(ModelCapability.ToolCalling, 0.5),
CapabilityScore(ModelCapability.Coding, LLAMA_CODING_SCORE),
CapabilityScore(ModelCapability.Reasoning, LLAMA_REASONING_SCORE),
CapabilityScore(ModelCapability.Summarization, LLAMA_SUMMARIZATION_SCORE),
CapabilityScore(ModelCapability.ToolCalling, LLAMA_TOOL_CALLING_SCORE),
)
fun createEventStore(artifactStore: ArtifactStore, dbPath: String = defaultDbPath): EventStore {
@@ -326,6 +331,17 @@ object InfrastructureModule {
val repository = DefaultTalkieRepository(replayer)
val ideaReader = IdeaReader(eventStore)
val contextBuilder = DefaultTalkieContextBuilder(config, tokenizer, ideaProvider = { ideaReader.activeIdeas() })
return DefaultTalkieFacade(repository, contextBuilder, inferenceRouter, eventStore, config, null, embedder, l3MemoryStore, workflowSummaryProvider, sessionProfileProvider)
return DefaultTalkieFacade(
repository,
contextBuilder,
inferenceRouter,
eventStore,
config,
null,
embedder,
l3MemoryStore,
workflowSummaryProvider,
sessionProfileProvider,
)
}
}