From 98ee55f5d2b7fea337b7f38c87dfe502ad4581a6 Mon Sep 17 00:00:00 2001 From: somew1nd Date: Tue, 1 Sep 2026 17:54:17 -0700 Subject: [PATCH] fix(memory): break transcript and flash compressor import cycle --- artemis/memory/transcript.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/artemis/memory/transcript.py b/artemis/memory/transcript.py index 7a83dcb..33f7eae 100644 --- a/artemis/memory/transcript.py +++ b/artemis/memory/transcript.py @@ -42,7 +42,6 @@ from typing import Any, Callable from langchain_core.messages import BaseMessage, HumanMessage -from artemis.agents.flash.context_compressor import ScrubEdgeCompressor from artemis.memory.step_memory import StepMemoryService from artemis.utils.logger import get_logger @@ -110,6 +109,11 @@ class TranscriptLedger: # the key out of the serialized message payload entirely. self._step_keys: dict[int, str] = {} + # Imported here, not at module level: context_compressor imports + # artemis.memory.step_memory, so a top-level import forms a cycle + # whose failure depends on which side is imported first. + from artemis.agents.flash.context_compressor import ScrubEdgeCompressor + self._compressor = ScrubEdgeCompressor( summarizer=step_memory, prune_history_xml=prune_history_xml,