Skip to content

fix: Confidence scale ambiguity causes 80x inflation from Skaldleita #235

Description

@deucebucket

Bug

In `layer_audio_id.py` (~line 597), `int(float(raw_confidence) * 100)` assumes a 0-1 scale. If Skaldleita returns `raw_confidence = 80` (already a percentage), this computes `8000`. No range clamping or scale detection exists.

Impact

Downstream threshold checks (e.g., `>= 70`) always pass trivially with inflated values, and the inflated confidence can suppress legitimate corrections from other layers.

Fix

Add scale detection: if `raw_confidence > 1`, treat as already a percentage. Also clamp to 0-100.

Severity

High — inflated confidence corrupts the entire scoring system.

Found via pipeline logic audit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions