修复(履约绑定): 匹配客户目标时展示 cjm 待确认角色

This commit is contained in:
yml
2026-11-26 01:40:49 +08:00
parent 473d9c7ecf
commit d62d56d98d
4 changed files with 99 additions and 21 deletions
+26 -3
View File
@@ -382,7 +382,16 @@ class BindMixin:
for info, decision in zip(candidates, decisions, strict=True):
alias = str(info.get("act_alias") or "").strip()
role_name = str(info.get("role_name") or "").strip()
if alias not in alias_set and role_name not in action_roles:
expected_matches = bool(
expected_role_name
and role_name.casefold()
== expected_role_name.strip().casefold()
)
if (
alias not in alias_set
and role_name not in action_roles
and not expected_matches
):
decision.update(
{
"confirmable": False,
@@ -714,7 +723,14 @@ class BindMixin:
if not role_name or role_name.casefold() == baseline:
continue
alias = str(info.get("act_alias") or "").strip()
if action_alias_has_role and alias not in alias_set:
expected_matches = bool(
expected and role_name.casefold() == expected
)
if (
action_alias_has_role
and alias not in alias_set
and not expected_matches
):
continue
if expected and role_name.casefold() != expected:
continue
@@ -730,7 +746,14 @@ class BindMixin:
for info in ordered:
role_name = str(info.get("role_name") or "").strip()
alias = str(info.get("act_alias") or "").strip()
if action_alias_has_role and alias not in alias_set:
expected_matches = bool(
expected and role_name.casefold() == expected
)
if (
action_alias_has_role
and alias not in alias_set
and not expected_matches
):
continue
if expected and role_name.casefold() != expected:
continue