Repository navigation
Description
Follow-up to #4839 / PR #4840 — the crawler now writes per-child rows to the legacy agent_publisher_authorizations table for publisher_properties[].publisher_domains[] fan-outs (managed-network shape, e.g. cafemedia's 6,800 represented publishers). Catalog-only consumers don't see them.
The gap
The federated-index reader (getDomainsForAgent, getPublishersForAgentDetail) unions both arms:
FROM agent_publisher_authorizations -- legacy arm (fan-out lands here)
UNION ALL
SELECT ... FROM v_effective_agent_authorizations -- catalog armSo the directory endpoint (/v1/agents/{agent_url}/publishers) and most read endpoints see the 6,800 child rows.
But the partner sync endpoints read only from the catalog:
GET /registry/authorizations?agent_url=...(registry-api.ts:7592) —authSnapshotDb.getNarrowqueriesv_effective_agent_authorizationsGET /registry/authorizations/snapshot(registry-api.ts:7642) — same backing source
Catalog-only consumers (DSPs syncing the full authorization graph for sales-agent routing) get cafemedia.com as a single row with no children. That's exactly the wrong answer at managed-network scale.
Why this matters
The /registry/authorizations/snapshot endpoint is the partner sync surface — the one a downstream platform uses to ingest the entire (agent_url, publisher_domain) graph and join it against their bid stream. Without fan-out projection, those platforms miss 6,800 of the 6,801 represented publishers for any managed network they ingest.
Options
A. Crawler writes to both arms (parallel write).
Extend recordAgentFromAdagentsJson (the call site for fan-out at crawler.ts:1054) to also project a row into catalog_agent_authorizations with evidence='adagents_json', created_by='system:fanout' so the catalog view picks it up. Cleanest semantically — fan-out is canonical, both arms reflect it.
B. Catalog view consumes legacy fan-out rows.
Amend v_effective_agent_authorizations (or the writer that produces it) to UNION-include legacy agent_publisher_authorizations rows whose source='adagents_json' and whose publisher_domain has a publishers row with discovery_method='adagents_authoritative'. Less invasive — no new writes — but couples the catalog view to a legacy-table fact.
C. Defer until the #3177 catalog cutover lands.
The catalog migration is in progress (the dual-read pattern in getDomainsForAgent mentions "after PR 5 the legacy arm is removed"). If the cutover plan already accounts for fan-out rows, this might resolve itself. Worth a check with whoever owns #3177 before committing to A or B.
Recommendation: C first, then A if the cutover doesn't address it. Don't double-write or couple the view if the cutover work is already going to subsume this.
Acceptance
- Decision recorded: which option (or confirmation that Unify property registry: retire discovered_properties, single source of truth in catalog #3177 catalog cutover covers it)
- If A or B: catalog query for
agent_url=https://interchange.ioreturns ~6,800 rows after the next cafemedia crawl -
/registry/authorizations/snapshotndjson stream includes the 6,800 children - Integration test asserting parity between
getDomainsForAgent(read-side, sees both) andauthSnapshotDb(catalog-only) on a managed-network fixture
References
- Fan-out write path: PR #4840 →
crawler.ts:fanOutPublisherPropertiesAuthorizations - Directory endpoint that reads both arms: PR #4838
- Inline resolution spec rule: PR #4827 (feat(adagents): clarify publisher_properties resolution — managed-network pattern needs inlined-properties path #4825)
- Catalog migration epic: Unify property registry: retire discovered_properties, single source of truth in catalog #3177
Activity
bokelley commentedon May 20, 2026
Triage
Classification: Bug (catalog-only sync surface returns wrong count — missing 6,800 fan-out rows)
Bucket(s): registry / discovery (no
registrylabel in repo — noted in run summary)Status: deferred
Blocked-on: #4840 — resurfaces on merge
Note: #3177 (catalog cutover) closed as completed on 2026-05-17, so Option C is resolved. #3177's cutover plan explicitly included retiring
agent_publisher_authorizations, which meanscatalog_agent_authorizationsshould now exist. Option A (extendfanOutPublisherPropertiesAuthorizationsto also project intocatalog_agent_authorizationswithevidence='adagents_json') is the natural fold into #4840 before that PR merges — the catalog table is the write target the cutover established.Triaged by Claude Code. Session: https://claude.ai/code/cse_01Mq1uXQswA3Zo6ptaPGKsEN
Generated by Claude Code
bokelley commentedon May 20, 2026
Investigation update — defer impl, file follow-up after design call
Looked at this in detail; the implementation is more involved than the "Option A vs B vs C" framing suggested. Here's what I found.
#3177 cutover state
#3177 is closed; the writer cutover (step 2) landed and
publisher-db.ts:upsertAdagentsCacheprojectscatalog_agent_authorizationsrows in parallel with the legacyagent_publisher_authorizationswrite. So Option C ("wait for #3177") is not the answer — the cutover happened before fan-out existed, and the projection has a deliberate guard against the exact shape fan-out introduces.The guard
publisher-db.ts:968-982inupsertAdagentsCache:```
if (selPubSingular !== publisherDomain && !selPubInList) {
// Cross-publisher third-party-sales claim. Refused per spec — the
// writer cannot land an authoritative row for another publisher's
// properties without out-of-band corroboration.
log.warn({ ... }, 'Skipping auth projection: publisher_properties claims a different publisher (cross-publisher refused)');
continue;
}
```
When cafemedia.com is the publisher being projected, the selector lists 6,800 child publisher_domains. None equal "cafemedia.com" — so the guard refuses to project. In production logs I confirmed:
```
{"publisherDomain":"cafemedia.com","agentUrl":"https://interchange.io","selPub":null,"selPubsCount":6800,"msg":"Skipping auth projection: publisher_properties claims a different publisher (cross-publisher refused)"}
```
This guard is load-bearing for catalog trust — it's what prevents a hostile manager file from projecting
catalog_agent_authorizationsrows for publishers that didn't authorize anything. It can't simply be lifted.What Option A (parallel writes from fan-out) would actually require
catalog_agent_authorizations(migration 440's CHECK is currently{ adagents_json, agent_claim, community }). Addadagents_authoritative(ormanager_asserted) with documented lower trust thanadagents_json.publisher_domains[]AND the parent file'sproperties[]carrying matchingpublisher_domain(the inline-resolution rule from feat(adagents): clarify publisher_properties resolution — managed-network pattern needs inlined-properties path #4825). Purepublisher_propertieswithout inline anchoring stays refused.recordChildPublisherFromManager) with the new evidence value. Each row asserts "the manager file at `manager_domain` claims agent X is authorized for publisher Y".v_effective_agent_authorizationsif needed so consumers see the new evidence value through the effective view.What Option B (catalog view consumes legacy fan-out rows) would actually require
Less invasive but more coupling. Amend
v_effective_agent_authorizationsto UNION in legacyagent_publisher_authorizationsrows whose publisher hasdiscovery_method='adagents_authoritative'. No new writes, no schema change. But: now the catalog view depends on a legacy-table fact for correctness, which makes the eventual "drop old tables" step (step 5 of #3177) more dangerous.Recommendation
Defer until a design call decides the evidence-model question. The two open sub-questions are:
Does
adagents_authoritativedeserve a distinct evidence value, or is it "weak adagents_json"? Spec PR feat(adagents): endorse parent-file inline resolution of publisher_properties (#4825) #4827 carries the "low-medium trust" framing — that argues for a distinct value so consumers can filter. The cost is wider CHECK + adapter logic in callers readingevidence.What's the acceptance threshold for cross-publisher projection? Today: exact match. Proposed: exact match OR (selector lists this publisher AND parent file inlines a property with matching publisher_domain). The second condition is the inline-resolution rule's structural check; codifying it in the writer is the load-bearing trust change.
Both questions are spec/security adjacent. Filing as a tracked follow-up rather than landing impl unilaterally.
Operational impact in the meantime
/registry/authorizations/snapshotconsumers (DSPs syncing the full authorization graph) miss the ~6,800 cafemedia children today. This is real but currently nobody-actively-suffering — the directory inverse-lookup (#4823) which IS consumer-facing uses the UNION of both arms and sees the fan-out rows correctly.The
/registry/authorizations(single-agent) endpoint also returns the auth-snapshot view, so the same gap applies there.Proposed next step
Open a small design doc in
docs/internals/(or as a tracked sub-issue) covering the two open questions above. Once that lands, the impl is straightforward — a single migration to widen the CHECK + a 50-ish line writer change inpublisher-db.ts+ a backfill query. Filed as not-blocking-this-quarter unless a partner explicitly asks.Closing this comment by tagging the related landed work for context:
bokelley commentedon May 20, 2026
Triage
Classification: Bug (catalog sync gap — 6,800 managed-network children missing from
/registry/authorizationssnapshot surface)Bucket(s): registry / discovery
Status: ready-for-human
What the experts said:
minorchangeset; no RFC. IAB sellers.json §4.3 is direct prior art for the corroboration model.federated-index-db.ts:195-232for directory endpoints — the coupling you flagged exists there already. Recommends UNION patch in the snapshot query as a near-term close (no guard change, no evidence-tier decision, no spec PR). Full Option A deferred to 3.1.x.My take: @bokelley, the experts diverge from your Option B coupling concern — that coupling is already present in the directory arm. The decision is whether to extend the existing UNION precedent to the snapshot path now, or hold until Q2 spec work lands.
Option B — UNION patch in snapshot query (near-term, no guard change or spec PR needed):
Closes snapshot gap now. Coupling precedent already set at
federated-index-db.ts:195. Risk: #3177 step 5 (drop legacy tables) must account for snapshot dependency — but that step was already blocked by the same arm in the directory query.Option A — full defer (design call + WG spec PR first):
WG must ratify this before
publisher-db.ts:968-982guard relaxation ships. Snapshot gap persists until spec PR + migration both land.@bokelley, your call: Option B (near-term UNION patch, closes snapshot gap now) or Option A / defer (design call first, WG spec PR for corroboration rule)?
Triaged by Claude Code. Session: https://claude.ai/code/cse_01CFyah45Ygqfdv74XimgPoD
Generated by Claude Code
fix(catalog): allow adagents_authoritative as evidence= filter value (#…
feat(catalog): project publisher_properties fan-out into catalog_agen…