7d3a3b4a83
Milestone 139 raised head_auto_apply_precision 0.97→0.98; operator confirmed the general-tag confidence was already well tuned, so revert that. The support floor (min_positives 30→50) and CCIP match confidence (0.92→0.95) stay. Migration 0081 (not yet deployed) edited to drop the precision bump. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CDgx8bQS5YrGRK76v8HUnM
44 lines
1.4 KiB
Python
44 lines
1.4 KiB
Python
"""stricter auto-apply defaults (milestone 139) — cut auto-apply misfires
|
|
|
|
head_auto_apply_min_positives 30→50 and ccip_auto_apply_threshold 0.92→0.95
|
|
(operator-asked 2026-07-06). The head graduation precision bar stays 0.97 — the
|
|
operator confirmed the general-tag confidence was already well tuned; only the
|
|
support floor + the CCIP match confidence are raised. The model defaults change
|
|
for fresh installs; here we bump the existing singleton row IFF it is still at
|
|
the previous default, so a deliberate operator change is NOT clobbered.
|
|
|
|
Revision ID: 0081
|
|
Revises: 0080
|
|
Create Date: 2026-07-06
|
|
"""
|
|
from typing import Sequence, Union
|
|
|
|
from alembic import op
|
|
|
|
revision: str = "0081"
|
|
down_revision: Union[str, None] = "0080"
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
|
depends_on: Union[str, Sequence[str], None] = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
op.execute(
|
|
"UPDATE ml_settings SET head_auto_apply_min_positives = 50 "
|
|
"WHERE head_auto_apply_min_positives = 30"
|
|
)
|
|
op.execute(
|
|
"UPDATE ml_settings SET ccip_auto_apply_threshold = 0.95 "
|
|
"WHERE ccip_auto_apply_threshold = 0.92"
|
|
)
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.execute(
|
|
"UPDATE ml_settings SET head_auto_apply_min_positives = 30 "
|
|
"WHERE head_auto_apply_min_positives = 50"
|
|
)
|
|
op.execute(
|
|
"UPDATE ml_settings SET ccip_auto_apply_threshold = 0.92 "
|
|
"WHERE ccip_auto_apply_threshold = 0.95"
|
|
)
|