feat(invariants): implement Invariant data model and database schema #8701

Merged
HAL9000 merged 4 commits from feat/v3.2.0-invariant-data-model-db-schema into master 2026-06-13 22:36:30 +00:00

4 Commits

Author SHA1 Message Date
controller-ci-rerun a5605dd7f5 chore: re-trigger CI [controller]
CI / push-validation (pull_request) Successful in 39s
CI / build (pull_request) Successful in 54s
CI / lint (pull_request) Successful in 58s
CI / helm (pull_request) Successful in 59s
CI / quality (pull_request) Successful in 1m29s
CI / typecheck (pull_request) Successful in 1m35s
CI / security (pull_request) Successful in 1m35s
CI / unit_tests (pull_request) Successful in 6m40s
CI / docker (pull_request) Successful in 2m1s
CI / integration_tests (pull_request) Successful in 11m2s
CI / coverage (pull_request) Successful in 11m49s
CI / status-check (pull_request) Successful in 4s
2026-06-13 17:42:05 -04:00
HAL9000 7da7bc830b fix(migrations): add merge migration to resolve dual Alembic heads
m3_002_merge_invariants_and_a5_006 and m9_003_plan_result_success_column
were both unmerged heads after the invariants branch was rebased onto a
master that had gained m9_003. Add a no-op merge migration
m9_004_merge_invariants_branch that points to both, restoring a single
head so create_template_db.py can run and unblock all three test gates.

ISSUES CLOSED: #8524
2026-06-13 17:42:05 -04:00
controller-ci-rerun c5f6286f01 chore: re-trigger CI [controller] 2026-06-13 17:42:05 -04:00
HAL9000 bdc2ccd6a3 feat(invariants): implement Invariant data model and database schema
This PR implements the Invariant data model and database schema for the
v3.2.0 milestone. The Invariant feature enables the system to define, store,
and manage invariant rules that can be evaluated against system state.

- Alembic migration m3_001_invariants_table creates the invariants table
  with columns: id (UUID), description (text), created_at (timestamp),
  is_active (bool, default True), with index on is_active for efficiency
- SQLAlchemy ORM InvariantModel in
  cleveragents.infrastructure.database.models.InvariantModel
- M3 merge migration to resolve Alembic head conflict
- BDD Behave scenarios (10 test cases) in features/invariant_model.feature
- Robot Framework integration tests in robot/invariant_model.robot
- Updated CHANGELOG.md and CONTRIBUTORS.md
- Restored status-check CI aggregation job

ISSUES CLOSED: #8524
2026-06-13 17:42:05 -04:00