Kairo-Jinkendo/backend/tests/test_backlog_vocabulary_unit.py
Lars a3b14d9c00
All checks were successful
Deploy Development / deploy (push) Successful in 47s
Test Suite / pytest-backend (push) Successful in 3m56s
Test Suite / lint-backend (push) Successful in 2s
Test Suite / compose-smoke (push) Has been skipped
Test Suite / k6 /api/health Baseline (push) Successful in 19s
Test Suite / playwright-smoke (push) Successful in 13s
feat(steering): Backlog-Vokabular aus Methoden-Vertrag (ADP P3)
backlog_epic_hierarchy als Steuerungselement, effektive steering_elements im Operating Context, Backend-Guards und UI ohne Slice-Ifs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-27 10:44:38 +02:00

50 lines
1.7 KiB
Python

"""Unit tests for backlog vocabulary resolution."""
from __future__ import annotations
from steering.backlog_vocabulary import resolve_backlog_vocabulary
def test_resolve_agile_from_steering_element():
vocab = resolve_backlog_vocabulary(
data_slices=["backlog", "actions", "work_cycles"],
method_key="continuous_product",
steering_elements=frozenset(
{"work_cycle_scope", "backlog_epic_hierarchy", "next_action_primary"}
),
)
assert vocab["profile_key"] == "agile_intake"
assert vocab["capabilities"]["epic_hierarchy"] is True
assert vocab["capabilities"]["sprint_commit"] is True
assert "epic" in vocab["kinds"]
def test_resolve_continuous_without_epic_element():
vocab = resolve_backlog_vocabulary(
data_slices=["backlog", "actions"],
method_key="continuous_product",
steering_elements=frozenset({"next_action_primary"}),
)
assert vocab["profile_key"] == "continuous_intake"
assert vocab["labels"]["story"] == "Idee"
assert vocab["capabilities"]["epic_hierarchy"] is False
def test_resolve_standard_for_generic_backlog():
vocab = resolve_backlog_vocabulary(
data_slices=["backlog", "actions"],
method_key="sequential_dependency",
steering_elements=frozenset({"critical_path", "next_action_primary"}),
)
assert vocab["profile_key"] == "standard_intake"
assert vocab["labels"]["story"] == "Story"
def test_resolve_empty_without_backlog_slice():
vocab = resolve_backlog_vocabulary(
data_slices=["actions", "roadmap"],
method_key="maturity_progression",
steering_elements=frozenset({"next_action_primary"}),
)
assert vocab["kinds"] == []