{
  "version": 1,
  "name": "Delegation chains for demand-side grants",
  "specification": "https://adcontextprotocol.org/docs/building/by-layer/L2/accounts-and-agents#grants-in-trust-records-experimental",
  "description": "Cross-SDK vectors for the delegation-chain rule in L2 Grants in trust records, which is experimental in 3.3 (adcontextprotocol/adcp#8118, P7). Each vector gives an acts-for claim and the trust records that each registrable domain publishes, and the seller's expected outcome. `input.brand` is `account.brand`. `input.parent_organization` is the parent organization that brand.json resolves, or null for a standalone brand. `input.signer.operator` is the signer's operator, and `input.signer.origin` is the signer's canonical origin. `input.trust_records` maps each registrable domain to the `grants` and `exclusive_grants` of its trust.json; a domain that is absent publishes no grants. All domains are registrable domains already, so no Public Suffix List lookup is needed, and every record is fetched. `expected.outcome` is one of `implicit`, `authorized`, `grant_absent`, or `seller_discretion`. When no delegation chain covers the claim, the outcome is `grant_absent` if the parent organization's record sets `exclusive_grants: true`, and `seller_discretion` otherwise: the seller's own onboarding records decide. `expected` holds the outcome only. Each vector tests one premise: every other premise of the claim holds, so an implementation fails a vector only when it gets that premise wrong, whatever order it checks the premises in. Look up vectors by `id`; `description` prose may change.",
  "vectors": [
    {
      "id": "parent-grants-signer-operator",
      "description": "The parent organization grants the agency, and the agency operates the account and signs with its own agent.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "pinnacle-agency.example",
        "signer": {
          "operator": "pinnacle-agency.example",
          "origin": "https://buyer.pinnacle-agency.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "authorized"
      }
    },
    {
      "id": "brand-operates-account-through-hosted-agent",
      "description": "The brand operates its account through an agent that a platform hosts. The parent organization grants the platform.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "nova-motors.example",
        "signer": {
          "operator": "orbit-platform.example",
          "origin": "https://agents.orbit-platform.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "orbit-platform.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z",
                "agents": [
                  {
                    "url": "https://agents.orbit-platform.example/mcp"
                  }
                ]
              }
            ],
            "exclusive_grants": true
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "authorized"
      }
    },
    {
      "id": "agency-works-through-platform",
      "description": "The parent organization grants the agency, and the agency grants the platform that hosts the signing agent. The narrowing is on the second grant.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "pinnacle-agency.example",
        "signer": {
          "operator": "orbit-platform.example",
          "origin": "https://agents.orbit-platform.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          },
          "pinnacle-agency.example": {
            "grants": [
              {
                "grantee": "orbit-platform.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z",
                "agents": [
                  {
                    "url": "https://agents.orbit-platform.example/mcp"
                  }
                ]
              }
            ]
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "authorized"
      }
    },
    {
      "id": "parent-record-later-grant-authorizes",
      "description": "The parent organization grants the agency twice. The first grant covers governance only, and the second covers media buying, so the second grant authorizes. Every grant in grants[] is a candidate.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "pinnacle-agency.example",
        "signer": {
          "operator": "pinnacle-agency.example",
          "origin": "https://buyer.pinnacle-agency.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:governance"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              },
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "authorized"
      }
    },
    {
      "id": "intermediary-record-later-grant-authorizes",
      "description": "The agency grants the platform twice. The first grant covers governance only, and the second covers media buying, so the delegation chain runs through the second.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "pinnacle-agency.example",
        "signer": {
          "operator": "orbit-platform.example",
          "origin": "https://agents.orbit-platform.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          },
          "pinnacle-agency.example": {
            "grants": [
              {
                "grantee": "orbit-platform.example",
                "scopes": [
                  "adcp:governance"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z",
                "agents": [
                  {
                    "url": "https://agents.orbit-platform.example/mcp"
                  }
                ]
              },
              {
                "grantee": "orbit-platform.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z",
                "agents": [
                  {
                    "url": "https://agents.orbit-platform.example/mcp"
                  }
                ]
              }
            ]
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "authorized"
      }
    },
    {
      "id": "parent-operates-account-through-hosted-agent",
      "description": "The parent organization operates the account through an agent that a platform hosts, and grants the platform directly. No grant to itself is needed.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "nova-holdings.example",
        "signer": {
          "operator": "orbit-platform.example",
          "origin": "https://agents.orbit-platform.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "orbit-platform.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z",
                "agents": [
                  {
                    "url": "https://agents.orbit-platform.example/mcp"
                  }
                ]
              }
            ],
            "exclusive_grants": true
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "authorized"
      }
    },
    {
      "id": "parent-operates-account-on-two-grant-chain",
      "description": "The parent organization operates the account, grants the agency, and the agency grants the platform. The rule admits this combination.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "nova-holdings.example",
        "signer": {
          "operator": "orbit-platform.example",
          "origin": "https://agents.orbit-platform.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          },
          "pinnacle-agency.example": {
            "grants": [
              {
                "grantee": "orbit-platform.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z",
                "agents": [
                  {
                    "url": "https://agents.orbit-platform.example/mcp"
                  }
                ]
              }
            ]
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "authorized"
      }
    },
    {
      "id": "brand-operates-account-on-two-grant-chain",
      "description": "The brand operates the account, the parent organization grants the agency, and the agency grants the platform. The rule admits this combination.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "nova-motors.example",
        "signer": {
          "operator": "orbit-platform.example",
          "origin": "https://agents.orbit-platform.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          },
          "pinnacle-agency.example": {
            "grants": [
              {
                "grantee": "orbit-platform.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z",
                "agents": [
                  {
                    "url": "https://agents.orbit-platform.example/mcp"
                  }
                ]
              }
            ]
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "authorized"
      }
    },
    {
      "id": "implicit-authority-brand",
      "description": "The brand operates the account and signs with its own agent. Authority is implicit, and the exclusive record without a grant to the brand does not matter.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "nova-motors.example",
        "signer": {
          "operator": "nova-motors.example",
          "origin": "https://buyer.nova-motors.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "implicit"
      }
    },
    {
      "id": "implicit-authority-parent",
      "description": "The parent organization operates the account and signs with its own agent. Authority is implicit.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "nova-holdings.example",
        "signer": {
          "operator": "nova-holdings.example",
          "origin": "https://buyer.nova-holdings.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "implicit"
      }
    },
    {
      "id": "implicit-authority-brand-account-parent-signer",
      "description": "The brand operates the account, and the parent organization signs with its own agent. Each is the brand or its parent organization, so authority is implicit.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "nova-motors.example",
        "signer": {
          "operator": "nova-holdings.example",
          "origin": "https://buyer.nova-holdings.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "implicit"
      }
    },
    {
      "id": "implicit-authority-parent-account-brand-signer",
      "description": "The parent organization operates the account, and the brand signs with its own agent. Each is the brand or its parent organization, so authority is implicit.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "nova-holdings.example",
        "signer": {
          "operator": "nova-motors.example",
          "origin": "https://buyer.nova-motors.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "implicit"
      }
    },
    {
      "id": "agency-account-brand-signer-denied",
      "description": "The brand signs with its own agent, but the account names the agency as its operator. Implicit authority needs the brand or the parent organization as both the account operator and the signer's operator.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "pinnacle-agency.example",
        "signer": {
          "operator": "nova-motors.example",
          "origin": "https://buyer.nova-motors.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "grant_absent"
      }
    },
    {
      "id": "standalone-brand-record-authorizes",
      "description": "A brand with no parent organization authorizes from its own record.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": null,
        "account_operator": "pinnacle-agency.example",
        "signer": {
          "operator": "pinnacle-agency.example",
          "origin": "https://buyer.pinnacle-agency.example"
        },
        "trust_records": {
          "nova-motors.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "authorized"
      }
    },
    {
      "id": "standalone-brand-exclusive-record-denied",
      "description": "A brand with no parent organization publishes an exclusive record that grants the agency governance only. The brand has no separate parent organization, so its own exclusive_grants counts and the media-buying claim is denied.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": null,
        "account_operator": "pinnacle-agency.example",
        "signer": {
          "operator": "pinnacle-agency.example",
          "origin": "https://buyer.pinnacle-agency.example"
        },
        "trust_records": {
          "nova-motors.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:governance"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "grant_absent"
      }
    },
    {
      "id": "three-grant-chain-denied",
      "description": "The platform grants a relay a third time. A delegation chain has at most two grants, so the relay's agent is not covered.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "pinnacle-agency.example",
        "signer": {
          "operator": "relay-exchange.example",
          "origin": "https://buy.relay-exchange.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          },
          "pinnacle-agency.example": {
            "grants": [
              {
                "grantee": "orbit-platform.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ]
          },
          "orbit-platform.example": {
            "grants": [
              {
                "grantee": "relay-exchange.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ]
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "grant_absent"
      }
    },
    {
      "id": "three-grant-chain-through-brand-denied",
      "description": "The parent organization grants the brand, the brand grants the agency, and the agency grants the platform. The brand operates the account. A delegation chain has at most two grants, even when the brand is a middle grantee, so the platform's agent is not covered.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "nova-motors.example",
        "signer": {
          "operator": "orbit-platform.example",
          "origin": "https://agents.orbit-platform.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "nova-motors.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          },
          "nova-motors.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ]
          },
          "pinnacle-agency.example": {
            "grants": [
              {
                "grantee": "orbit-platform.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ]
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "grant_absent"
      }
    },
    {
      "id": "account-operator-not-on-chain-denied",
      "description": "The parent organization grants the platform, but the account names an agency that is neither the brand, the parent organization, nor the first grantee.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "pinnacle-agency.example",
        "signer": {
          "operator": "orbit-platform.example",
          "origin": "https://agents.orbit-platform.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "orbit-platform.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "grant_absent"
      }
    },
    {
      "id": "account-operator-is-second-grantee-denied",
      "description": "The account names the platform, which is the grantee of the second grant. account.operator must be the brand, the parent organization, or the grantee of the first grant.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "orbit-platform.example",
        "signer": {
          "operator": "orbit-platform.example",
          "origin": "https://agents.orbit-platform.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          },
          "pinnacle-agency.example": {
            "grants": [
              {
                "grantee": "orbit-platform.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ]
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "grant_absent"
      }
    },
    {
      "id": "first-grant-scope-denied",
      "description": "The first grant covers governance only, so it does not cover the media-buying claim. The second grant covers it.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "pinnacle-agency.example",
        "signer": {
          "operator": "orbit-platform.example",
          "origin": "https://agents.orbit-platform.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:governance"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          },
          "pinnacle-agency.example": {
            "grants": [
              {
                "grantee": "orbit-platform.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z",
                "agents": [
                  {
                    "url": "https://agents.orbit-platform.example/mcp"
                  }
                ]
              }
            ]
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "grant_absent"
      }
    },
    {
      "id": "first-grant-brands-denied",
      "description": "The first grant covers a different brand the parent organization owns. The second grant covers the account's brand.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "pinnacle-agency.example",
        "signer": {
          "operator": "orbit-platform.example",
          "origin": "https://agents.orbit-platform.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_trucks"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          },
          "pinnacle-agency.example": {
            "grants": [
              {
                "grantee": "orbit-platform.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z",
                "agents": [
                  {
                    "url": "https://agents.orbit-platform.example/mcp"
                  }
                ]
              }
            ]
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "grant_absent"
      }
    },
    {
      "id": "first-grant-countries-denied",
      "description": "The first grant covers CA only, and the account's brand covers the US. The second grant is global.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "pinnacle-agency.example",
        "signer": {
          "operator": "orbit-platform.example",
          "origin": "https://agents.orbit-platform.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z",
                "countries": [
                  "CA"
                ]
              }
            ],
            "exclusive_grants": true
          },
          "pinnacle-agency.example": {
            "grants": [
              {
                "grantee": "orbit-platform.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z",
                "agents": [
                  {
                    "url": "https://agents.orbit-platform.example/mcp"
                  }
                ]
              }
            ]
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "grant_absent"
      }
    },
    {
      "id": "first-grant-valid-from-denied",
      "description": "The check time is before the first grant's valid_from. The second grant is already valid.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "pinnacle-agency.example",
        "signer": {
          "operator": "orbit-platform.example",
          "origin": "https://agents.orbit-platform.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z",
                "valid_from": "2026-11-01T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          },
          "pinnacle-agency.example": {
            "grants": [
              {
                "grantee": "orbit-platform.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z",
                "agents": [
                  {
                    "url": "https://agents.orbit-platform.example/mcp"
                  }
                ]
              }
            ]
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "grant_absent"
      }
    },
    {
      "id": "first-grant-valid-until-denied",
      "description": "The second grant is still valid, but the check time is at or after the first grant's valid_until.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "pinnacle-agency.example",
        "signer": {
          "operator": "orbit-platform.example",
          "origin": "https://agents.orbit-platform.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          },
          "pinnacle-agency.example": {
            "grants": [
              {
                "grantee": "orbit-platform.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-12-31T00:00:00Z"
              }
            ]
          }
        },
        "check_time": "2027-07-15T00:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "grant_absent"
      }
    },
    {
      "id": "first-grant-agents-denied",
      "description": "The first grant lists only the agency's own agents, so it never covers the platform's agent, even though the agency grants the platform.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "pinnacle-agency.example",
        "signer": {
          "operator": "orbit-platform.example",
          "origin": "https://agents.orbit-platform.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z",
                "agents": [
                  {
                    "url": "https://buyer.pinnacle-agency.example/mcp"
                  }
                ]
              }
            ],
            "exclusive_grants": true
          },
          "pinnacle-agency.example": {
            "grants": [
              {
                "grantee": "orbit-platform.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z",
                "agents": [
                  {
                    "url": "https://agents.orbit-platform.example/mcp"
                  }
                ]
              }
            ]
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "grant_absent"
      }
    },
    {
      "id": "second-grant-scope-denied",
      "description": "The second grant covers governance only, so it does not cover the media-buying claim. The first grant covers it.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "pinnacle-agency.example",
        "signer": {
          "operator": "orbit-platform.example",
          "origin": "https://agents.orbit-platform.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          },
          "pinnacle-agency.example": {
            "grants": [
              {
                "grantee": "orbit-platform.example",
                "scopes": [
                  "adcp:governance"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z",
                "agents": [
                  {
                    "url": "https://agents.orbit-platform.example/mcp"
                  }
                ]
              }
            ]
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "grant_absent"
      }
    },
    {
      "id": "second-grant-brands-denied",
      "description": "The second grant covers a different brand. The first grant covers the account's brand.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "pinnacle-agency.example",
        "signer": {
          "operator": "orbit-platform.example",
          "origin": "https://agents.orbit-platform.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          },
          "pinnacle-agency.example": {
            "grants": [
              {
                "grantee": "orbit-platform.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_trucks"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z",
                "agents": [
                  {
                    "url": "https://agents.orbit-platform.example/mcp"
                  }
                ]
              }
            ]
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "grant_absent"
      }
    },
    {
      "id": "second-grant-countries-denied",
      "description": "The account's brand covers GB. The second grant covers CA and the US only, so it doesn't cover the brand's countries.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "GB",
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "pinnacle-agency.example",
        "signer": {
          "operator": "orbit-platform.example",
          "origin": "https://agents.orbit-platform.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          },
          "pinnacle-agency.example": {
            "grants": [
              {
                "grantee": "orbit-platform.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z",
                "countries": [
                  "CA",
                  "US"
                ]
              }
            ]
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "grant_absent"
      }
    },
    {
      "id": "second-grant-valid-from-denied",
      "description": "The first grant is still valid, but the check time is before the second grant's valid_from.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "pinnacle-agency.example",
        "signer": {
          "operator": "orbit-platform.example",
          "origin": "https://agents.orbit-platform.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          },
          "pinnacle-agency.example": {
            "grants": [
              {
                "grantee": "orbit-platform.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-12-31T00:00:00Z",
                "valid_from": "2026-11-01T00:00:00Z"
              }
            ]
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "grant_absent"
      }
    },
    {
      "id": "second-grant-valid-until-denied",
      "description": "The check time is at or after the second grant's valid_until. The first grant is still valid.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "pinnacle-agency.example",
        "signer": {
          "operator": "orbit-platform.example",
          "origin": "https://agents.orbit-platform.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          },
          "pinnacle-agency.example": {
            "grants": [
              {
                "grantee": "orbit-platform.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2026-10-01T00:00:00Z",
                "agents": [
                  {
                    "url": "https://agents.orbit-platform.example/mcp"
                  }
                ]
              }
            ]
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "grant_absent"
      }
    },
    {
      "id": "second-grant-agents-denied",
      "description": "The second grant lists only another of the platform's agents, so the signer's canonical origin is not listed. The first grant is unnarrowed.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "pinnacle-agency.example",
        "signer": {
          "operator": "orbit-platform.example",
          "origin": "https://agents.orbit-platform.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          },
          "pinnacle-agency.example": {
            "grants": [
              {
                "grantee": "orbit-platform.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z",
                "agents": [
                  {
                    "url": "https://reporting.orbit-platform.example/mcp"
                  }
                ]
              }
            ]
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "grant_absent"
      }
    },
    {
      "id": "agents-origin-port-mismatch-denied",
      "description": "The parent organization grants the platform for an agent on port 8443. The signer's canonical origin has the default port, so it is a different origin and the grant does not cover it.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "nova-motors.example",
        "signer": {
          "operator": "orbit-platform.example",
          "origin": "https://agents.orbit-platform.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "orbit-platform.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z",
                "agents": [
                  {
                    "url": "https://agents.orbit-platform.example:8443/mcp"
                  }
                ]
              }
            ],
            "exclusive_grants": true
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "grant_absent"
      }
    },
    {
      "id": "valid-until-at-check-time-denied",
      "description": "The check time equals the grant's valid_until. A grant is inactive at or after valid_until, so it doesn't cover the claim.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "pinnacle-agency.example",
        "signer": {
          "operator": "pinnacle-agency.example",
          "origin": "https://buyer.pinnacle-agency.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2026-10-24T12:00:00Z"
              }
            ],
            "exclusive_grants": true
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "grant_absent"
      }
    },
    {
      "id": "valid-from-at-check-time-authorizes",
      "description": "The check time equals the grant's valid_from. A grant is active from valid_from on, so it covers the claim.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "pinnacle-agency.example",
        "signer": {
          "operator": "pinnacle-agency.example",
          "origin": "https://buyer.pinnacle-agency.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z",
                "valid_from": "2026-10-24T12:00:00Z"
              }
            ],
            "exclusive_grants": true
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "authorized"
      }
    },
    {
      "id": "brand-without-countries-needs-global-grant-denied",
      "description": "The account's brand lists no countries, and the grant covers the US only. A brand reference with no countries is covered only by a global grant.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors"
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "pinnacle-agency.example",
        "signer": {
          "operator": "pinnacle-agency.example",
          "origin": "https://buyer.pinnacle-agency.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z",
                "countries": [
                  "US"
                ]
              }
            ],
            "exclusive_grants": true
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "grant_absent"
      }
    },
    {
      "id": "brand-without-brand-id-denied",
      "description": "The account's brand reference has no brand_id, and the grant lists specific brands. A brand reference with no brand_id is covered only by [\"*\"] or an omitted list.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "pinnacle-agency.example",
        "signer": {
          "operator": "pinnacle-agency.example",
          "origin": "https://buyer.pinnacle-agency.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "grant_absent"
      }
    },
    {
      "id": "brand-not-covered-denied",
      "description": "The grant covers a different brand the parent organization owns.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "pinnacle-agency.example",
        "signer": {
          "operator": "pinnacle-agency.example",
          "origin": "https://buyer.pinnacle-agency.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_trucks"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "grant_absent"
      }
    },
    {
      "id": "wildcard-brands-grant-authorizes",
      "description": "The grant lists [\"*\"] as its brands, which covers every brand the parent organization owns.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "pinnacle-agency.example",
        "signer": {
          "operator": "pinnacle-agency.example",
          "origin": "https://buyer.pinnacle-agency.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "*"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "authorized"
      }
    },
    {
      "id": "scope-mismatch-denied",
      "description": "The parent organization's exclusive record grants the platform governance only. No grant covers media buying, and the record is the complete list for every scope, so the claim is denied.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "orbit-platform.example",
        "signer": {
          "operator": "orbit-platform.example",
          "origin": "https://agents.orbit-platform.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "orbit-platform.example",
                "scopes": [
                  "adcp:governance"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "grant_absent"
      }
    },
    {
      "id": "wildcard-scope-grant-authorizes",
      "description": "The grant lists [\"*\"] as its scopes. The bare token * covers every scope in every namespace, so it covers the media-buying claim.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "pinnacle-agency.example",
        "signer": {
          "operator": "pinnacle-agency.example",
          "origin": "https://buyer.pinnacle-agency.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "*"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "authorized"
      }
    },
    {
      "id": "brand-record-ignored-when-parent-denies",
      "description": "The brand's own record grants the platform, but only the parent organization's record authorizes, and it grants the agency only.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "orbit-platform.example",
        "signer": {
          "operator": "orbit-platform.example",
          "origin": "https://agents.orbit-platform.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          },
          "nova-motors.example": {
            "grants": [
              {
                "grantee": "orbit-platform.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ]
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "grant_absent"
      }
    },
    {
      "id": "brand-record-ignored-when-parent-grants",
      "description": "The brand's own record is exclusive and grants another domain, but the parent organization's record grants the platform.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "orbit-platform.example",
        "signer": {
          "operator": "orbit-platform.example",
          "origin": "https://agents.orbit-platform.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "orbit-platform.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          },
          "nova-motors.example": {
            "grants": [
              {
                "grantee": "acme-media.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "authorized"
      }
    },
    {
      "id": "brand-record-supplies-second-grant",
      "description": "The parent organization grants the brand, and the brand operates the account. The brand's own record supplies the second grant, to the platform that hosts the signing agent.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "nova-motors.example",
        "signer": {
          "operator": "orbit-platform.example",
          "origin": "https://agents.orbit-platform.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "nova-motors.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ],
            "exclusive_grants": true
          },
          "nova-motors.example": {
            "grants": [
              {
                "grantee": "orbit-platform.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z",
                "agents": [
                  {
                    "url": "https://agents.orbit-platform.example/mcp"
                  }
                ]
              }
            ]
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "authorized"
      }
    },
    {
      "id": "exclusive-no-grants-denied",
      "description": "The parent organization's exclusive record lists no grants, so no third party acts for it.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "pinnacle-agency.example",
        "signer": {
          "operator": "pinnacle-agency.example",
          "origin": "https://buyer.pinnacle-agency.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [],
            "exclusive_grants": true
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "grant_absent"
      }
    },
    {
      "id": "nonexclusive-uncovered-seller-discretion",
      "description": "The parent organization's record is not exclusive and grants the platform governance only. No delegation chain covers the platform's media-buying claim, so the seller's onboarding records decide.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "orbit-platform.example",
        "signer": {
          "operator": "orbit-platform.example",
          "origin": "https://agents.orbit-platform.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "orbit-platform.example",
                "scopes": [
                  "adcp:governance"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ]
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "seller_discretion"
      }
    },
    {
      "id": "nonexclusive-nonmatching-grant-seller-discretion",
      "description": "The parent organization's nonexclusive record grants the agency media buying for another brand it owns. The grant covers nothing for this brand and doesn't narrow the seller's discretion.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "pinnacle-agency.example",
        "signer": {
          "operator": "pinnacle-agency.example",
          "origin": "https://buyer.pinnacle-agency.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_trucks"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ]
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "seller_discretion"
      }
    },
    {
      "id": "exclusive-brand-record-seller-discretion",
      "description": "The brand's own record is exclusive and lists no grants, and the parent organization's record is not exclusive. Only the parent organization's exclusive_grants counts, so a claim that no delegation chain covers stays at the seller's discretion.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "pinnacle-agency.example",
        "signer": {
          "operator": "pinnacle-agency.example",
          "origin": "https://buyer.pinnacle-agency.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_trucks"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ]
          },
          "nova-motors.example": {
            "grants": [],
            "exclusive_grants": true
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "seller_discretion"
      }
    },
    {
      "id": "exclusive-intermediary-record-seller-discretion",
      "description": "The agency's own record is exclusive, and the parent organization's record is not. The second grant covers governance only, so no delegation chain covers the media-buying claim. Only the parent organization's exclusive_grants counts, so the claim stays at the seller's discretion.",
      "input": {
        "brand": {
          "domain": "nova-motors.example",
          "brand_id": "nova_motors",
          "countries": [
            "US"
          ]
        },
        "parent_organization": "nova-holdings.example",
        "account_operator": "pinnacle-agency.example",
        "signer": {
          "operator": "orbit-platform.example",
          "origin": "https://agents.orbit-platform.example"
        },
        "trust_records": {
          "nova-holdings.example": {
            "grants": [
              {
                "grantee": "pinnacle-agency.example",
                "scopes": [
                  "adcp:media_buying"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z"
              }
            ]
          },
          "pinnacle-agency.example": {
            "grants": [
              {
                "grantee": "orbit-platform.example",
                "scopes": [
                  "adcp:governance"
                ],
                "profiles": {
                  "adcp": {
                    "brands": [
                      "nova_motors"
                    ]
                  }
                },
                "valid_until": "2027-06-30T00:00:00Z",
                "agents": [
                  {
                    "url": "https://agents.orbit-platform.example/mcp"
                  }
                ]
              }
            ],
            "exclusive_grants": true
          }
        },
        "check_time": "2026-10-24T12:00:00Z",
        "scope": "adcp:media_buying"
      },
      "expected": {
        "outcome": "seller_discretion"
      }
    }
  ]
}
