Bind native OpenRouter approval to custody and delivery inputs
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 5s

Assistant: codex
Assistant-Model: gpt-6-astra
Assistant-Session: 01a09cbb-87c6-7900-a145-4ce53ba9f1a6
This commit is contained in:
tegwick 2026-09-14 00:54:55 +02:00
parent 0783b50216
commit 7ba1b6223e
16 changed files with 656 additions and 7 deletions

View file

@ -6,6 +6,7 @@ policy, lifetime and approval correspondence before consumption.
"""
from __future__ import annotations
import copy
import hashlib
import json
import re
@ -102,7 +103,22 @@ def build_action_request(
"auth_targets": sorted(set(auth_targets)),
},
},
"context": {"purpose": purpose},
"context": {
"purpose": purpose,
# Bind the actual non-secret custody/delivery specification, not
# just names which can be reused for a different backend target.
# Approval identifiers are excluded: adding the newly issued
# approval must not change its own approval-free binding.
"catalog_target": copy.deepcopy({
name: getattr(entry, name)
for name in (
"kind", "org", "repo", "mount", "path", "fields",
"mount_management", "consumers", "delivery_modes",
"delivery_auth", "delivery_config", "auth_capability",
"workload_delivery",
)
}),
},
}
)
if human_control_required(entry):