fix(db): resolve invariant model migration head
CI / load-versions (pull_request) Successful in 17s
CI / push-validation (pull_request) Successful in 25s
CI / lint (pull_request) Failing after 50s
CI / quality (pull_request) Successful in 57s
CI / typecheck (pull_request) Successful in 1m13s
CI / security (pull_request) Successful in 1m24s
CI / build (pull_request) Successful in 37s
CI / helm (pull_request) Successful in 43s
CI / unit_tests (pull_request) Failing after 5m40s
CI / coverage (pull_request) Has been skipped
CI / docker (pull_request) Has been skipped
CI / integration_tests (pull_request) Failing after 9m50s
CI / status-check (pull_request) Failing after 3s

This commit is contained in:
CleverAgents Bot
2026-06-17 22:25:21 -04:00
parent e9182dcaca
commit f2626d66ee
2 changed files with 2 additions and 34 deletions
@@ -8,7 +8,7 @@ separate from action-level (``action_invariants``) and plan-level
CLI invocations even when not attached to a specific action or plan.
Revision ID: m11_001_standalone_invariants
Revises: m9_003_plan_result_success_column
Revises: m9_004_merge_invariants_branch
Create Date: 2026-05-12 00:00:00
"""
@@ -18,7 +18,7 @@ from alembic import op
# revision identifiers, used by Alembic.
revision: str = "m11_001_standalone_invariants"
down_revision: str | None = "m9_003_plan_result_success_column"
down_revision: str | None = "m9_004_merge_invariants_branch"
branch_labels: str | None = None
depends_on: str | None = None
@@ -3785,35 +3785,3 @@ class IndexedFileModel(Base):
Index("ix_indexed_files_language", "language"),
)
# ---------------------------------------------------------------------------
# Invariant Models (Stage M3 - invariant management, issue #8524)
# ---------------------------------------------------------------------------
class InvariantModel(Base): # type: ignore[misc]
"""Database model for globally-scoped invariants.
Invariants are user-defined constraints that must hold true across all
planning sessions. Each row represents a single invariant rule with
its description, creation timestamp, and active status.
Table: ``invariants``
"""
__allow_unmapped__ = True
__tablename__ = "invariants"
# PK: UUID stored as a 36-character string
id = Column(String(36), primary_key=True)
# Human-readable description of the invariant constraint
description = Column(Text, nullable=False)
# Timestamp of creation (ISO-8601 string, UTC)
created_at = Column(String(30), nullable=False)
# Whether this invariant is currently active (default True)
is_active = Column(Boolean, nullable=False, default=True, server_default="1")
__table_args__ = (Index("ix_invariants_is_active", "is_active"),)