"""retrieval_logs records the cue-swap gate: its bar and how many lines passed Revision ID: 0131 Revises: 0130 Create Date: 2026-11-23 A gated surface shows a line found by resemblance only when its score beats most of the user's own recent cues on that surface. Each call row keeps the bar it was held to and how many lines reached it, so how often a surface speaks can be read back, per surface, as the store grows. """ import sqlalchemy as sa from alembic import op revision = "0131" down_revision = "0130" branch_labels = None depends_on = None def upgrade() -> None: op.add_column("retrieval_logs", sa.Column("gate_bar", sa.Float(), nullable=True)) op.add_column("retrieval_logs", sa.Column("gate_kept", sa.Integer(), nullable=True)) def downgrade() -> None: op.drop_column("retrieval_logs", "gate_kept") op.drop_column("retrieval_logs", "gate_bar")