fix: remove unreachable suppression branch in synthesizer._build_hypothesis_block #34

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

Context

In app/services/diagnose/synthesizer.py, _build_hypothesis_block() filters to active = [rh for rh in ranked if not rh.suppress][:3]. Every rh in active therefore has rh.suppress == False. The branch below is unreachable:

similar = (
    f"Yes — suppressed, {rh.suppression_reason}"
    if rh.suppress and rh.suppression_reason   # always False
    else "No"
)

This always evaluates to "No". Remove the dead branch or restructure to surface novelty score for active (non-suppressed) hypotheses.

Found by

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

## Context In `app/services/diagnose/synthesizer.py`, `_build_hypothesis_block()` filters to `active = [rh for rh in ranked if not rh.suppress][:3]`. Every `rh` in `active` therefore has `rh.suppress == False`. The branch below is unreachable: ```python similar = ( f"Yes — suppressed, {rh.suppression_reason}" if rh.suppress and rh.suppression_reason # always False else "No" ) ``` This always evaluates to `"No"`. Remove the dead branch or restructure to surface novelty score for active (non-suppressed) hypotheses. ## 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#34
No description provided.