fix: move format_context_block() call inside legacy-only branch in diagnose/__init__.py #37

Closed
opened 2026-05-25 18:58:34 -07:00 by pyr0ball · 0 comments
Owner

Context

In app/services/diagnose/__init__.py, format_context_block(ctx) is called unconditionally, but context_block is only used in the legacy LLM path. When MULTI_AGENT_ENABLED=True, the call is a no-op waste.

Fix

Move the context_block = format_context_block(ctx) assignment inside the else: branch (the legacy path).

Found by

Post-implementation code review of feat/29-multi-agent-diagnose.

## Context In `app/services/diagnose/__init__.py`, `format_context_block(ctx)` is called unconditionally, but `context_block` is only used in the legacy LLM path. When `MULTI_AGENT_ENABLED=True`, the call is a no-op waste. ## Fix Move the `context_block = format_context_block(ctx)` assignment inside the `else:` branch (the legacy path). ## Found by Post-implementation code review of feat/29-multi-agent-diagnose.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Circuit-Forge/turnstone#37
No description provided.