AP2.0: Archetyp-Katalog, Method-Stubs und sichtbare Steuerung in Kontrolle.
Deploy Development / deploy (push) Successful in 46s
Test Suite / pytest-backend (push) Failing after 2m2s
Test Suite / k6 /api/health Baseline (push) Has been skipped
Test Suite / playwright-smoke (push) Has been skipped
Test Suite / lint-backend (push) Successful in 3s
Test Suite / compose-smoke (push) Has been skipped
Deploy Development / deploy (push) Successful in 46s
Test Suite / pytest-backend (push) Failing after 2m2s
Test Suite / k6 /api/health Baseline (push) Has been skipped
Test Suite / playwright-smoke (push) Has been skipped
Test Suite / lint-backend (push) Successful in 3s
Test Suite / compose-smoke (push) Has been skipped
PO-Dokumente (ADP v0.2, MVP v0.3) und Minimal Complete Slice: Registry-Methoden, Initiative/Project-Spiegel, Default-Methode bei Anlage, Lagebild mit Archetyp und Guidance. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
21d948634e
commit
3bd983297b
30 files changed
+2093
-52
No files matched your search
@@ -49,7 +49,11 @@ def test_list_entity_archetypes(client):
|
||||
)
|
||||
assert res.status_code == 200
|
||||
keys = {item["key"] for item in res.json()}
|
||||
assert keys == {"initiative.generic", "initiative.program", "initiative.product"}
|
||||
assert "initiative.generic" in keys
|
||||
assert "initiative.program" in keys
|
||||
assert "initiative.product" in keys
|
||||
assert "initiative.maturity_journey" in keys
|
||||
assert "initiative.content_project" in keys
|
||||
|
||||
|
||||
def test_invalid_archetype_rejected(client):
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
"""AP2.0 — Method registry, Archetyp defaults, Project mirror."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from auth import AUTH_HEADER
|
||||
from steering.methods.registry import list_methods
|
||||
from tests.factories import provision_user_in_tenant
|
||||
from tests.test_initiatives_actions import _auth, _create_initiative, _login
|
||||
|
||||
|
||||
def test_ap20_all_methods_registered():
|
||||
keys = {m.key for m in list_methods()}
|
||||
assert "generic_operating" in keys
|
||||
assert "product_milestone_driven" in keys
|
||||
assert "program_delivery" in keys
|
||||
assert "continuous_product" in keys
|
||||
assert "maturity_progression" in keys
|
||||
assert "chapter_based_progression" in keys
|
||||
assert "agile_iteration" in keys
|
||||
|
||||
|
||||
def test_product_initiative_gets_continuous_product_method(client):
|
||||
user = provision_user_in_tenant(tenant_role="member")
|
||||
token = _login(client, user)
|
||||
|
||||
created = _create_initiative(
|
||||
client,
|
||||
token,
|
||||
title="Kairo Product",
|
||||
archetype_key="initiative.product",
|
||||
)
|
||||
assert created.status_code == 201
|
||||
initiative_id = created.json()["id"]
|
||||
|
||||
snap = client.get(
|
||||
f"/api/initiatives/{initiative_id}/steering-snapshot",
|
||||
headers=_auth(token),
|
||||
)
|
||||
assert snap.status_code == 200
|
||||
body = snap.json()
|
||||
assert body["method_key"] == "continuous_product"
|
||||
assert body["archetype_key"] == "initiative.product"
|
||||
assert body.get("archetype_label")
|
||||
assert body.get("steering_guidance")
|
||||
|
||||
|
||||
def test_program_initiative_gets_program_delivery_method(client):
|
||||
user = provision_user_in_tenant(tenant_role="member")
|
||||
token = _login(client, user)
|
||||
|
||||
created = _create_initiative(
|
||||
client,
|
||||
token,
|
||||
title="Release Program",
|
||||
archetype_key="initiative.program",
|
||||
)
|
||||
assert created.status_code == 201
|
||||
initiative_id = created.json()["id"]
|
||||
|
||||
ctx = client.get(
|
||||
f"/api/steering/initiatives/{initiative_id}/context",
|
||||
headers=_auth(token),
|
||||
)
|
||||
assert ctx.status_code == 200
|
||||
assert ctx.json()["method_key"] == "program_delivery"
|
||||
|
||||
|
||||
def test_project_inherits_mirror_archetype(client):
|
||||
user = provision_user_in_tenant(tenant_role="member")
|
||||
token = _login(client, user)
|
||||
|
||||
created = _create_initiative(
|
||||
client,
|
||||
token,
|
||||
title="Mirror Test",
|
||||
archetype_key="initiative.product",
|
||||
)
|
||||
initiative_id = created.json()["id"]
|
||||
|
||||
project = client.post(
|
||||
f"/api/initiatives/{initiative_id}/projects",
|
||||
json={"title": "Product Stream"},
|
||||
headers=_auth(token),
|
||||
)
|
||||
assert project.status_code == 201
|
||||
assert project.json()["archetype_key"] == "project.product"
|
||||
|
||||
|
||||
def test_entity_archetypes_include_ap20_portfolio(client):
|
||||
user = provision_user_in_tenant(tenant_role="member")
|
||||
token = _login(client, user)
|
||||
|
||||
res = client.get(
|
||||
"/api/entity-archetypes?entity_type=initiative",
|
||||
headers=_auth(token),
|
||||
)
|
||||
assert res.status_code == 200
|
||||
keys = {item["key"] for item in res.json()}
|
||||
assert "initiative.maturity_journey" in keys
|
||||
assert "initiative.content_project" in keys
|
||||
assert "initiative.product" in keys
|
||||
|
||||
sample = next(i for i in res.json() if i["key"] == "initiative.product")
|
||||
assert sample.get("default_method_key") == "continuous_product"
|
||||
Reference in new issue
Block a user