"""rule_moment_judgments.misfire — a mount reported as arriving where it does not apply (milestone 458 step 7b, #4955) Revision ID: 0119 Revises: 0118 Create Date: 2026-10-05 The open-after-moment signal proposes a mount; nothing proposed taking one off. This column is the evidence for that direction: each time a session says a mounted rule arrived at a moment where it did not apply, the report is counted here per distinct day, with its reason and the action that reached the moment. At the bar it becomes an unmount proposal for the operator. A column on the judgment row rather than a table of its own: a misfire is always about a (rule, moment) pair that is mounted, and that pair already has its row. Nullable and no backfill — nobody has reported a misfire yet. """ import sqlalchemy as sa from sqlalchemy.dialects import postgresql from alembic import op revision = "0119" down_revision = "0118" branch_labels = None depends_on = None def upgrade() -> None: op.add_column( "rule_moment_judgments", sa.Column("misfire", postgresql.JSONB(), nullable=True), ) def downgrade() -> None: op.drop_column("rule_moment_judgments", "misfire")