fix(acms): resolve AmbiguousStep regression, lint violations, and type safety issues

Resolve blocking issues identified in final review (ID 7998) for PR #9671:

1. AmbiguousStep fix: Renamed duplicate step '@then("the policy should not be applied")'
   to '@then("the policy should not be applied to the LLM context")' in
   acms_plan_execution_integration_steps.py and updated corresponding scenario in
   features/acms_plan_execution_integration.feature

2. lint fix (SIM102): Combined nested if statements into single compound condition in
   step_set_policy_priority() to remove ruff SIM102 violation

3. Type safety fix: Changed 'policy: Any' to 'policy: ContextPolicyConfig' in
   ACMSContextAssembler._apply_policy() for proper Pyright type safety, added
   ContextPolicyConfig to module imports

This resolves the unit_tests CI failure caused by AmbiguousStep and fixes
the lint CI failure introduced by commit 3457fc61.

ISSUES CLOSED: #9584
This commit is contained in:
2026-05-08 09:01:10 +00:00
committed by Forgejo
parent 24a3f6ff45
commit 9a9214dcf1
3 changed files with 16 additions and 10 deletions
@@ -59,7 +59,7 @@ Feature: Plan Execution ACMS Integration
When I prepare LLM context with file_type "python"
Then the policy should be applied
When I prepare LLM context with file_type "javascript"
Then the policy should not be applied
Then the policy should not be applied to the LLM context
Scenario: PlanExecutor accepts ACMS integration via dependency injection
Given I have a plan execution ACMS integration with a policy configuration