fix(kernel,server): remove stub compaction + log missing summary artifact

This commit is contained in:
2026-06-08 10:22:16 +04:00
parent 2b1faeaadd
commit 7af5d602bc
2 changed files with 4 additions and 10 deletions
@@ -26,7 +26,6 @@ import com.correx.core.inference.InferenceRouter
import com.correx.core.inference.ModelCapability import com.correx.core.inference.ModelCapability
import com.correx.core.kernel.orchestration.DefaultOrchestrationReducer import com.correx.core.kernel.orchestration.DefaultOrchestrationReducer
import com.correx.core.kernel.orchestration.DefaultSessionOrchestrator import com.correx.core.kernel.orchestration.DefaultSessionOrchestrator
import com.correx.core.kernel.orchestration.JournalCompactionService
import com.correx.core.kernel.orchestration.OrchestrationConfig import com.correx.core.kernel.orchestration.OrchestrationConfig
import com.correx.core.kernel.orchestration.OrchestrationProjector import com.correx.core.kernel.orchestration.OrchestrationProjector
import com.correx.core.kernel.orchestration.OrchestrationRepository import com.correx.core.kernel.orchestration.OrchestrationRepository
@@ -240,14 +239,6 @@ fun main() {
sandboxRoot = sandboxRoot, sandboxRoot = sandboxRoot,
defaultSystemPromptPath = toolsConfig.defaultSystemPromptPath, defaultSystemPromptPath = toolsConfig.defaultSystemPromptPath,
) )
val journalCompactionService = JournalCompactionService(
artifactStore = artifactStore,
summarize = { prompt ->
// TODO: wire real LLM summarizer — returns placeholder until inference is wired here
"Compacted journal summary (${prompt.lines().size} records)"
},
tokenThreshold = defaultOrchestrationConfig.journalCompactionTokenThreshold,
)
val orchestrator = DefaultSessionOrchestrator( val orchestrator = DefaultSessionOrchestrator(
repositories = repositories, repositories = repositories,
engines = engines, engines = engines,
@@ -255,7 +246,6 @@ fun main() {
artifactStore = artifactStore, artifactStore = artifactStore,
tokenizer = firstProvider.tokenizer, tokenizer = firstProvider.tokenizer,
decisionJournalRepository = decisionJournalRepository, decisionJournalRepository = decisionJournalRepository,
compactionService = journalCompactionService,
) )
val routerConfig = correxConfig.router val routerConfig = correxConfig.router
val embedder = InfrastructureModule.createEmbedderFromConfig(routerConfig.embedder) val embedder = InfrastructureModule.createEmbedderFromConfig(routerConfig.embedder)
@@ -314,6 +314,10 @@ abstract class SessionOrchestrator(
val journalState = decisionJournalRepository.getJournal(sessionId) val journalState = decisionJournalRepository.getJournal(sessionId)
val summaryText = journalState.summaryArtifactId?.let { id -> val summaryText = journalState.summaryArtifactId?.let { id ->
artifactStore.get(id)?.toString(Charsets.UTF_8) artifactStore.get(id)?.toString(Charsets.UTF_8)
?: run {
log.warn("Journal summary artifact {} not found in store — rendering without summary", id.value)
null
}
} }
val journalText = decisionJournalRenderer.render(journalState, summaryText) val journalText = decisionJournalRenderer.render(journalState, summaryText)
val journalEntries = if (journalText.isBlank()) emptyList() else listOf( val journalEntries = if (journalText.isBlank()) emptyList() else listOf(