refactor(A1): Progression-Lanes aus Graph statt Strang=Project
Deploy Development / deploy (push) Successful in 53s
Test Suite / pytest-backend (push) Successful in 4m52s
Test Suite / lint-backend (push) Successful in 3s
Test Suite / compose-smoke (push) Has been skipped
Test Suite / k6 /api/health Baseline (push) Successful in 18s
Test Suite / playwright-smoke (push) Successful in 31s

Ersetzt strand_project_id/Stream-Projects in der A1-Steuerung durch graph-abgeleitete Lanes (requires-Ketten + Join). Recurring bindet nur noch am Gate; Re-Abnahme-Docs und ADP dokumentieren die Korrektur.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-08-03 18:51:17 +02:00
1 parent 88a03a65f2
commit 17add13d9d
12 files changed
+396 -125

No files matched your search

+53
View File
@@ -2,10 +2,63 @@
from __future__ import annotations
from services.progression_graph import compute_progression_lanes
from tests.factories import provision_user_in_tenant
from tests.test_initiatives_actions import _auth, _create_initiative, _login
def _item(item_id: str, item_type: str = "maturity_stage", **kwargs):
return {
"id": item_id,
"item_type": item_type,
"status": kwargs.get("status", "planned"),
"title": kwargs.get("title", item_id),
"sort_order": kwargs.get("sort_order", 0),
}
def _requires(from_id: str, to_id: str) -> dict:
return {
"from_item_id": from_id,
"to_item_id": to_id,
"dependency_type": "requires",
}
def test_progression_lanes_parallel_sources_and_post_join():
items = [
_item("d1", status="active", title="Dehnung — Einstieg"),
_item("h1", status="active", title="Hüftrotation — Einstieg"),
_item("join", item_type="join_gate", title="Join"),
_item("d2", title="Dehnung — nach Join"),
_item("h2", title="Hüftrotation — nach Join"),
]
deps = [
_requires("join", "d1"),
_requires("join", "h1"),
_requires("d2", "join"),
_requires("h2", "join"),
]
lanes = compute_progression_lanes(items=items, dependencies=deps)
assert lanes["d1"].startswith("source:")
assert lanes["h1"].startswith("source:")
assert lanes["h1"] != lanes["d1"]
assert lanes["d2"] == "post-join:d2"
assert lanes["h2"] == "post-join:h2"
assert lanes["d2"] != lanes["h2"]
def test_progression_lanes_sequential_chain_shares_lane():
items = [
_item("g1", status="active"),
_item("g2"),
_item("g3"),
]
deps = [_requires("g2", "g1"), _requires("g3", "g2")]
lanes = compute_progression_lanes(items=items, dependencies=deps)
assert lanes["g1"] == lanes["g2"] == lanes["g3"]
def test_progression_join_switches_and_activates_outputs(client):
user = provision_user_in_tenant(tenant_role="admin")
token = _login(client, user)