fix(acms): resolve remaining AmbiguousStep conflicts, NameError bugs, and function name duplicates

Fix two critical issues identified by HAL9001 review #8271:

1. Rename literal step 'policy{1,2} has priority_weight' in loader
   steps to 'loader policy{1,2} has priority_weight' to disambiguate
   from parameterised 'policy(\d+) has priority_weight' in integration
   steps (fixes AmbiguousStep Conflicts 1 & 2 - root cause of CI failures).

2. Fix NameError: change undefined variable 'weight' to float(weight_str)
   in step_policy1_priority and step_policy2_priority functions.

3. Rename duplicate Python function names across step files to prevent
   namespace shadowing: step_check_view_name, step_have_multiple_policies,
   step_have_policy_config, step_policy_not_applied → suffixed with _loader
   or _integration.

ISSUES CLOSED: #9584
This commit is contained in:
2026-05-09 10:33:07 +00:00
committed by Forgejo
parent a8cfee5b37
commit 8280bd5ee2
3 changed files with 13 additions and 13 deletions
+2 -2
View File
@@ -90,8 +90,8 @@ Feature: ACMS Context Policy Configuration Loader
Scenario: Apply per-view policy with priority weights
Given I have a context policy configuration with multiple policies
And policy1 has priority_weight 1.0
And policy2 has priority_weight 2.0
And loader policy1 has priority_weight 1.0
And loader policy2 has priority_weight 2.0
When I assemble context with both policies
Then policy2 should be applied before policy1