refactor(classifier): single-pass hard-drop trigger; cleaner drop reason rendering
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -108,6 +108,12 @@ final class MessageFormatter
|
||||
if (!$reasons) return '—';
|
||||
$parts = [];
|
||||
foreach ($reasons as $r) {
|
||||
// Drop reasons use sign='×' weight=0 as a sentinel — render text only
|
||||
// to avoid the meaningless "×0 hard-rule: ..." prefix.
|
||||
if (($r['sign'] ?? '') === '×' && (int)($r['weight'] ?? 0) === 0) {
|
||||
$parts[] = (string)$r['text'];
|
||||
continue;
|
||||
}
|
||||
$parts[] = $r['sign'] . $r['weight'] . ' ' . $r['text'];
|
||||
}
|
||||
return esc_html(implode(', ', $parts));
|
||||
|
||||
Reference in New Issue
Block a user