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.kernel.orchestration.DefaultOrchestrationReducer
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.OrchestrationProjector
import com.correx.core.kernel.orchestration.OrchestrationRepository
@@ -240,14 +239,6 @@ fun main() {
sandboxRoot = sandboxRoot,
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(
repositories = repositories,
engines = engines,
@@ -255,7 +246,6 @@ fun main() {
artifactStore = artifactStore,
tokenizer = firstProvider.tokenizer,
decisionJournalRepository = decisionJournalRepository,
compactionService = journalCompactionService,
)
val routerConfig = correxConfig.router
val embedder = InfrastructureModule.createEmbedderFromConfig(routerConfig.embedder)
@@ -314,6 +314,10 @@ abstract class SessionOrchestrator(
val journalState = decisionJournalRepository.getJournal(sessionId)
val summaryText = journalState.summaryArtifactId?.let { id ->
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 journalEntries = if (journalText.isBlank()) emptyList() else listOf(