fix(domain): enforce immutability on Plan and Action identity fields #8293

Merged
HAL9000 merged 2 commits from fix/m2/domain-model-immutability into master 2026-04-20 06:34:48 +00:00

2 Commits

Author SHA1 Message Date
HAL9000 813faa4853 fix(domain): replace type: ignore suppressions with setattr in immutability tests
CI / helm (pull_request) Successful in 31s
CI / lint (pull_request) Successful in 3m57s
CI / build (pull_request) Successful in 3m50s
CI / quality (pull_request) Successful in 4m16s
CI / typecheck (pull_request) Successful in 4m37s
CI / security (pull_request) Successful in 4m43s
CI / push-validation (pull_request) Successful in 24s
CI / integration_tests (pull_request) Successful in 7m40s
CI / e2e_tests (pull_request) Successful in 8m18s
CI / unit_tests (pull_request) Successful in 9m26s
CI / docker (pull_request) Successful in 1m44s
CI / coverage (pull_request) Successful in 15m31s
CI / benchmark-regression (push) Failing after 0s
CI / benchmark-publish (push) Failing after 0s
CI / status-check (pull_request) Successful in 3s
CI / push-validation (push) Successful in 25s
CI / helm (push) Successful in 28s
CI / lint (push) Successful in 4m2s
CI / quality (push) Successful in 4m25s
CI / build (push) Successful in 3m41s
CI / typecheck (push) Successful in 4m41s
CI / security (push) Successful in 4m48s
CI / unit_tests (push) Failing after 8m47s
CI / docker (push) Has been skipped
CI / e2e_tests (push) Successful in 8m53s
CI / integration_tests (push) Successful in 10m42s
CI / coverage (push) Successful in 14m45s
CI / status-check (push) Failing after 3s
Replace all # type: ignore[misc] reassignment checks in
features/steps/domain_model_immutability_steps.py with setattr() calls
to exercise frozen model enforcement without suppressing type errors.

Add B010 to per-file-ignores for features/steps/*.py in pyproject.toml
since setattr with constant attribute names is intentional in immutability
tests (exercises frozen Pydantic model enforcement).

Update CONTRIBUTORS.md to document HAL 9000 contributions.

ISSUES CLOSED: #7553
2026-04-20 06:08:50 +00:00
HAL9000 0125c15039 fix(domain): enforce immutability on Plan and Action identity fields
Freeze PlanIdentity (plan_id, parent_plan_id, root_plan_id) and
NamespacedName (name, namespace) using Pydantic frozen=True.
Block PlanTimestamps.created_at reassignment via __setattr__ override.
Mutable state fields (phase, processing_state, updated_at, etc.) remain
fully assignable. Add 17 Behave scenarios verifying all invariants.

ISSUES CLOSED: #7553
2026-04-20 06:08:50 +00:00