Align native CLI execution with approved T03 targets and authority
Assistant: codex Assistant-Model: gpt-6-astra Assistant-Session: 01a09cbb-87c6-7900-a145-4ce53ba9f1a6
This commit is contained in:
parent
09422db079
commit
25a7d71cf5
8 changed files with 90 additions and 8 deletions
|
|
@ -65,6 +65,11 @@ class AuthorizedAction:
|
|||
decision_id: str
|
||||
expires_at: str
|
||||
|
||||
@property
|
||||
def id(self) -> str:
|
||||
"""The actual PDP decision id for shared CLI evidence/plan callers."""
|
||||
return self.decision_id
|
||||
|
||||
def as_evidence(self) -> dict[str, object]:
|
||||
return {
|
||||
"authorization_decision_id": self.decision_id,
|
||||
|
|
|
|||
|
|
@ -126,7 +126,9 @@ def _require_lane_approval(
|
|||
# unreachable-engine residue inapplicable. Absent configuration returns
|
||||
# None and production stays closed exactly as before.
|
||||
authorization = authorize_action(
|
||||
cfg, entry, action or "unknown", None, fields=fields
|
||||
cfg, entry, action or "unknown", None, fields=fields,
|
||||
policy_targets=(entry.policy_name,) if entry.has_delivery_auth else (),
|
||||
auth_targets=(entry.role_name,) if entry.has_delivery_auth else (),
|
||||
)
|
||||
stance = apply_unreachable_engine_stance(
|
||||
cfg, entry, action or "unknown", authorized=authorization is not None
|
||||
|
|
@ -135,8 +137,11 @@ def _require_lane_approval(
|
|||
evidence.mark_stance(stance)
|
||||
if authorization is not None:
|
||||
evidence.detail.update(authorization.as_evidence())
|
||||
decision = None
|
||||
if entry.approval_required():
|
||||
# A served claim/PDP decision is the native authority. The CCR reference
|
||||
# remains provenance; the hub/fixture path is only the legacy fallback.
|
||||
# Neither path can discharge the required native CAS below.
|
||||
decision = authorization
|
||||
if authorization is None and entry.approval_required():
|
||||
decision = resolve_decision(
|
||||
hub_url=cfg.hub_url,
|
||||
repo_root=repo_root(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue