feat(backend): enforce campaign scheduling, add reviewer queue filter, tactic order, duplicate-test counts

- start_execution now blocks a test from starting before its campaign's
  start_date, closing a gap where the field was persisted but never
  enforced
- GET /tests gains a reviewer_id "my reviews" filter for the red_review/
  blue_review lead-gate stage, distinct from pending_validation_side
  (which only ever covered the later in_review stage and ignored
  assignment entirely)
- get_coverage_by_tactic now returns all 14 MITRE tactics in canonical
  kill-chain order instead of an alphabetical, partial list — the
  regular Dashboard and Executive Dashboard both consume this endpoint
  and previously disagreed on order/completeness
- test-template listing now includes existing_test_count per technique
  so the catalog can warn before creating a likely-duplicate test
This commit is contained in:
kitos
2026-07-08 08:46:09 +02:00
parent 21c6febd22
commit 1c8fa436ab
12 changed files with 333 additions and 3 deletions
+3
View File
@@ -102,6 +102,9 @@ class TestTemplateSummary(BaseModel):
severity: str | None = None
# Assign is_active = True
is_active: bool = True
# Number of existing Test rows for this template's technique — lets the
# catalog UI warn before creating a likely-duplicate test.
existing_test_count: int = 0
# Assign model_config = ConfigDict(from_attributes=True)
model_config = ConfigDict(from_attributes=True)