Skip to content

prototype(manifest_requirements): resolve accepted_methods without duplicating bindings and reject unconfigured binding endpoints with ProfileError #580

Closed

Description

@drk-ram

What is wrong

Contributor: Raghuvar Durga (@drk-ram)

On main (a7f0858), prototype/manifest_requirements.py (combine_requirements) has two defects when combining a verified Agent Manifest's evidence_requirements with local relying-party Requirements:

  1. Multi-method required_bindings.accepted_methods is expanded into simultaneous binding requirements instead of intersecting with local policy:

    • In combine_requirements (lines 49-58):
      bindings = {
          (b.source, b.target, b.relationship, b.method): b.model_dump() for b in local.bindings
      }
      for declared in verified.requirements.required_bindings:
          for method in declared.accepted_methods:
              key = (declared.source, declared.target, declared.relationship, method)
              bindings[key] = {
                  "source": declared.source,
                  "target": declared.target,
                  "relationship": declared.relationship,
                  "method": method,
              }
    • In Agent Manifest (evidence-requirements-experimental-v1), required_bindings[].accepted_methods is the list of relationship methods the manifest accepts for (source, target, relationship) (analogous to accepted_profiles on components).
    • However, combine_requirements loops over for method in declared.accepted_methods: and adds every method in accepted_methods as a separate required binding in Requirements.bindings!
    • Worse still:
      • If local policy already requires (source, target, "same-workload", "same-evidence-v1") and the manifest declares accepted_methods: ["same-instance-v1"], combine_requirements adds "same-instance-v1" alongside "same-evidence-v1" instead of detecting that the manifest and local policy have disjoint accepted methods (manifest_requirement_untrusted) or selecting the stricter method (same-evidence-v1 > same-instance-v1)!
      • If the manifest declares accepted_methods: ["same-instance-v1", "same-evidence-v1"], combine_requirements requires the token to carry both bindings simultaneously for the same (source, target) pair!
  2. Unconfigured binding endpoints (source / target) or invalid binding methods leak raw Pydantic ValidationError instead of ProfileError:

    • If verified.requirements.required_bindings names a source or target component that is not in local.components (or source == target, or an unsupported method / relationship), v.Requirements.model_validate(...) at line 59 raises a raw Pydantic ValidationError instead of v.ProfileError("manifest_component_unconfigured") / v.ProfileError("manifest_requirement_untrusted").

Spec section or file

  • prototype/manifest_requirements.py (combine_requirements)
  • tests/test_manifest_requirements_bridge.py

Expected behavior

  1. In combine_requirements:
    • Validate that every declared binding's source and target exist in local_by_id (and source != target), raising v.ProfileError("manifest_component_unconfigured") when a binding references an unconfigured component.
    • Validate that declared.accepted_methods contains at least one supported method ({"same-instance-v1", "same-evidence-v1"}); if a local binding already exists for (source, target, relationship) and its method is not in declared.accepted_methods, check whether tightening is possible (e.g., "same-evidence-v1" is strictly stronger than "same-instance-v1"; if the intersection/tightening is empty or incompatible, raise v.ProfileError("manifest_requirement_untrusted")), and emit at most one BindingRequirement per (source, target, relationship) choosing the strongest required method ("same-evidence-v1" over "same-instance-v1").
    • Wrap any final ValidationError as v.ProfileError.

Impact

Prevents combine_requirements from turning a manifest's accepted_methods alternatives into impossible simultaneous binding requirements or leaking unhandled Pydantic ValidationError exceptions on unconfigured binding endpoints.

Activity

  1. added a commit that references this issue on Oct 22, 2026
    4c83b1d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions