Skip to content

fix(adagents): accept property-level publisher_domain in managerdomain scope gate#4283

Merged
bokelley merged 1 commit intomainfrom
claude/managerdomain-scope-property-level
May 9, 2026
Merged

fix(adagents): accept property-level publisher_domain in managerdomain scope gate#4283
bokelley merged 1 commit intomainfrom
claude/managerdomain-scope-property-level

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

@bokelley bokelley commented May 9, 2026

The explicit-publisher-scoping gate from #4173 only inspected per-agent paths (`authorized_agents[].publisher_properties[].publisher_domain` and `authorized_agents[].collections[].publisher_domain`). Probing real production manifests after #4251 landed showed every managed-network manager rejects under that gate — Mediavine, the only manager currently serving an `adagents.json` against a publisher with a `MANAGERDOMAIN` pointer (`homestratosphere.com → mediavine.com`), uses property-level scoping with tag-based agent references:

```json
"properties": [{
"property_id": "the_hollywood_gossip",
"publisher_domain": "thehollywoodgossip.com",
"tags": ["scope3-aee"]
}],
"authorized_agents": [{
"authorization_type": "property_tags",
"property_tags": ["scope3-aee"]
}]
```

The cross-publisher commitment IS expressly declared — just routed through the property layer rather than re-spelled per-agent.

Fix

Gate now accepts either shape:

  • Per-agent paths (unchanged): `publisher_properties[].publisher_domain` or `collections[].publisher_domain` directly names the publisher.
  • Property-level paths (new): a `properties[]` entry carries `publisher_domain` matching the source AND at least one `authorized_agents[]` entry reaches that property indirectly via `property_ids` or `property_tags`.

Cross-publisher confusion still fails closed:

  • A property belonging to a different publisher can't satisfy the gate.
  • An agent referencing a tag none of the publisher's properties carry can't satisfy it either.

Tests

  • `property_tags` + property-level `publisher_domain` (Mediavine pattern) — accepts.
  • `property_ids` + property-level `publisher_domain` — accepts.
  • Foreign-property cross-publisher rejection — fails closed.
  • No-matching-tag rejection (publisher property has tags A, agent points at tag B) — fails closed.

84/84 unit tests green.

Discussion

Sent design question to @patmmccann on #4173 (comment) about whether per-agent should remain the only normative shape, or both are equally valid. Landing the additive fix in the meantime since:

  1. The property-level shape is in deployed production manifests today (Mediavine).
  2. The cross-publisher commitment invariant holds either way — manager must positively name the publisher somewhere in the manifest.
  3. Without this, the entire managerdomain fallback feature is effectively dormant against real ecosystems.

Will update if Patrick prefers a stricter reading.

Refs #4173, #4200, #4251.

…n scope gate

The explicit-publisher-scoping gate from #4173 only inspected per-agent
paths (authorized_agents[].publisher_properties[].publisher_domain and
authorized_agents[].collections[].publisher_domain). Probing real
production manifests showed every managed-network manager rejects under
that gate — Mediavine, the only manager currently serving an
adagents.json against a publisher with a managerdomain pointer
(homestratosphere.com → mediavine.com), uses property-level scoping with
tag-based agent references.

Real shape:

  properties: [{ publisher_domain: "...", tags: ["scope3-aee"] }]
  authorized_agents: [{ authorization_type: "property_tags",
                        property_tags: ["scope3-aee"] }]

The cross-publisher commitment IS expressly declared — just routed
through the property layer rather than re-spelled per-agent.

Gate now accepts either shape. Per-agent paths unchanged; new property-
level path requires a properties[] entry with publisher_domain matching
the source AND an authorized_agents[] entry that reaches that property
via property_ids or property_tags.

Cross-publisher confusion still fails closed — foreign properties can't
satisfy the gate, and agents referencing tags none of the publisher's
properties carry can't either.

Tests: property_tags + property-level publisher_domain (Mediavine
pattern), property_ids + property-level publisher_domain, foreign-
property rejection, no-matching-tag rejection. 84/84 unit tests green.

Surfaced via real-world probe of homestratosphere.com / mediavine.com.
Sent design question to @patmmccann on #4173 about whether per-agent
should remain the only normative shape — landing additive in the
meantime since the property-level shape is in deployed production
manifests today and the cross-publisher commitment holds.
@bokelley bokelley merged commit 342a9b1 into main May 9, 2026
13 checks passed
@bokelley bokelley deleted the claude/managerdomain-scope-property-level branch May 9, 2026 08:50
bokelley added a commit that referenced this pull request May 9, 2026
Adds server/scripts/probe-managerdomain-fallback.ts — ad-hoc developer tool that hits live DNS / public web against a small fixture of known publisher-manager pairs and asserts the AdAgentsValidationResult envelope.

Not for CI; meant as a manual probe to confirm the fallback path still works against real managed-network publishers. Existed as a manual curl exercise; moving the fixture set into version control so future regressions are caught on demand. The original gap fixed in #4283 is exactly what this would have caught.

Initial run surfaced three real-world divergences (captured as TODOs in fixture rationales): craftgossip's malformed JSON, homestratosphere's fallback not reaching the scope gate (likely validator schema delta against Mediavine's agent_url field), and freestar.com not yet serving a manifest.

Refs #4173, #4200, #4283.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant