DEVX-66: fix: calibrate molecule weights from actual CI execution times
Post-merge / detect-type (push) Successful in 31s
Post-merge / validate-commit-msg (push) Successful in 45s
Post-merge / sync-wiki (push) Successful in 48s
Post-merge / vikunja (push) Successful in 49s
Post-merge / configure-repo (push) Successful in 52s
Post-merge / release (push) Successful in 1m9s
Post-merge / badges (push) Successful in 1m24s
Post-merge / publish (push) Successful in 52s

This commit was merged in pull request #106.
This commit is contained in:
2026-06-26 23:36:58 +00:00
parent cb7e9dbc7e
commit 1f2533872d
2 changed files with 82 additions and 13 deletions
+22 -3
View File
@@ -483,7 +483,7 @@ class TestCliMultiRole:
class TestScenarioWeight:
def test_known_heavy_scenario(self) -> None:
assert _scenario_weight("nextcloud") == 10
assert _scenario_weight("nextcloud") == 15
assert _scenario_weight("gitea") == 8
def test_known_light_scenario(self) -> None:
@@ -493,13 +493,32 @@ class TestScenarioWeight:
assert _scenario_weight("unknown-scenario") == 3
def test_case_insensitive(self) -> None:
assert _scenario_weight("NextCloud") == 10
assert _scenario_weight("NextCloud") == 15
assert _scenario_weight("GITEA") == 8
def test_substring_match(self) -> None:
assert _scenario_weight("nextcloud-with-redis") == 10
assert _scenario_weight("nextcloud-with-redis") == 15
assert _scenario_weight("custom-gitea-setup") == 8
def test_role_specific_weight(self) -> None:
"""Role+scenario pairs take priority over scenario-name-only weights."""
assert _scenario_weight("default", "restore") == 11
assert _scenario_weight("default", "zitadel") == 10
assert _scenario_weight("default", "docker_base") == 8
assert _scenario_weight("default", "app_hardening") == 4
assert _scenario_weight("default", "app_container") == 3
assert _scenario_weight("default", "storage") == 3
assert _scenario_weight("default", "observability") == 3
def test_role_specific_overrides_scenario_name(self) -> None:
"""vaultwarden has a scenario-name weight of 2, but role-specific is also 2."""
assert _scenario_weight("vaultwarden", "app_container") == 2
assert _scenario_weight("vaultwarden") == 2
def test_customer_apps_weight(self) -> None:
assert _scenario_weight("customer-apps", "app_container") == 11
assert _scenario_weight("customer-apps") == 11
class TestLptDistribute:
def test_equal_weights_produce_even_split(self) -> None: