Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

## [Unreleased]

### Fixed

- **Blocking sleep in LLM condition** -- Replaced `time.sleep()` with
`await asyncio.sleep()` in `LLMAssisted` retry backoff to avoid
freezing the event loop during LLM retries.

### Added

- **Description-diff alignment** -- `DescriptionDiffAlignmentCondition` uses
Expand Down
3 changes: 2 additions & 1 deletion src/rules/conditions/llm_assisted.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
opt-in and clearly documented as having LLM latency in the evaluation path.
"""

import asyncio
import logging
import time
from typing import Any
Expand Down Expand Up @@ -218,7 +219,7 @@ async def evaluate(self, context: Any) -> list[Violation]:
)

if attempt < max_attempts:
time.sleep(wait_time)
await asyncio.sleep(wait_time)
else:
# All attempts failed - gracefully degrade
logger.error("All LLM retry attempts exhausted; skipping alignment check.")
Expand Down
Loading