Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix lint errors
  • Loading branch information
o-love committed Apr 8, 2026
commit bc00c86315fb4df220b254bb3466a5c8e8df12cf
Original file line number Diff line number Diff line change
Expand Up @@ -1014,19 +1014,17 @@ async def mock_context_length_error(*args, **kwargs):
await ingestion_service._process_single_set("user-context-overflow")

assert (
await _collect(
semantic_storage.get_history_messages(
set_ids=["user-context-overflow"],
is_ingested=False,
)
await _collect_history_messages(
semantic_storage,
set_ids=["user-context-overflow"],
is_ingested=False,
)
== []
)
assert await _collect(
semantic_storage.get_history_messages(
set_ids=["user-context-overflow"],
is_ingested=True,
)
assert await _collect_history_messages(
semantic_storage,
set_ids=["user-context-overflow"],
is_ingested=True,
) == [message_id]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ async def process_semantic_type(
]

message_content = self._format_cluster_messages(cluster_messages)
citation_ids = [m.uid for m in cluster_messages if m.uid is not None]

try:
commands = await llm_feature_update(
Expand All @@ -364,12 +365,11 @@ async def process_semantic_type(
except Exception as err:
if _is_context_length_exceeded_error(err):
logger.warning(
"Skipping message %s for semantic type %s due to non-retryable context length error",
message.uid,
"Skipping cluster %s for semantic type %s due to non-retryable context length error",
cluster_id,
semantic_category.name,
)
if message.uid not in mark_messages:
mark_messages.append(message.uid)
mark_messages.update(citation_ids)
continue

logger.exception(
Expand All @@ -382,8 +382,6 @@ async def process_semantic_type(

continue

citation_ids = [m.uid for m in cluster_messages if m.uid is not None]

await self._apply_commands(
commands=commands,
set_id=set_id,
Expand Down
Loading