fix(kernel,server): remove stub compaction + log missing summary artifact
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
+4
@@ -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(
|
||||||
|
|||||||
Reference in New Issue
Block a user