diff --git a/apps/server/src/main/kotlin/com/correx/apps/server/Main.kt b/apps/server/src/main/kotlin/com/correx/apps/server/Main.kt index 62609572..5fa683fb 100644 --- a/apps/server/src/main/kotlin/com/correx/apps/server/Main.kt +++ b/apps/server/src/main/kotlin/com/correx/apps/server/Main.kt @@ -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) diff --git a/core/kernel/src/main/kotlin/com/correx/core/kernel/orchestration/SessionOrchestrator.kt b/core/kernel/src/main/kotlin/com/correx/core/kernel/orchestration/SessionOrchestrator.kt index 14703f5d..95e5e9d5 100644 --- a/core/kernel/src/main/kotlin/com/correx/core/kernel/orchestration/SessionOrchestrator.kt +++ b/core/kernel/src/main/kotlin/com/correx/core/kernel/orchestration/SessionOrchestrator.kt @@ -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(