René's URL Explorer Experiment


Title: bug(adagents): fetch_adagents can't resolve real MANAGERDOMAIN publishers whose ads.txt is behind a redirect, and its errors carry no HTTP status · Issue #1306 · adcontextprotocol/adcp-client-python · GitHub

Open Graph Title: bug(adagents): fetch_adagents can't resolve real MANAGERDOMAIN publishers whose ads.txt is behind a redirect, and its errors carry no HTTP status · Issue #1306 · adcontextprotocol/adcp-client-python

X Title: bug(adagents): fetch_adagents can't resolve real MANAGERDOMAIN publishers whose ads.txt is behind a redirect, and its errors carry no HTTP status · Issue #1306 · adcontextprotocol/adcp-client-python

Description: Summary On 8.0.0, fetch_adagents fails for publishers that delegate through ads.txt MANAGERDOMAIN and serve ads.txt behind a redirect, which is common on managed hosting. The fallback fetches /ads.txt with follow_redirects=False and trea...

Open Graph Description: Summary On 8.0.0, fetch_adagents fails for publishers that delegate through ads.txt MANAGERDOMAIN and serve ads.txt behind a redirect, which is common on managed hosting. The fallback fetches /ads....

X Description: Summary On 8.0.0, fetch_adagents fails for publishers that delegate through ads.txt MANAGERDOMAIN and serve ads.txt behind a redirect, which is common on managed hosting. The fallback fetches /ads....

Opengraph URL: https://github.com/adcontextprotocol/adcp-client-python/issues/1306

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bug(adagents): fetch_adagents can't resolve real MANAGERDOMAIN publishers whose ads.txt is behind a redirect, and its errors carry no HTTP status","articleBody":"## Summary\n\nOn 8.0.0, `fetch_adagents` fails for publishers that delegate through ads.txt `MANAGERDOMAIN` and serve ads.txt behind a redirect, which is common on managed hosting. The fallback fetches `/ads.txt` with `follow_redirects=False` and treats a 30x as \"no MANAGERDOMAIN found\". Separately, non-404 failures are raised as `AdagentsValidationError` with the status only in the message text. And `fetch_adagents` rejects the bare-entry files that `resolve_properties_for_agent(mode=\"permissive\")` exists to handle.\n\n## Reproduction (adcp 8.0.0)\n\nPart 1 uses the live publisher `recipetineats.com` (output captured 2026-10-02). Parts 2 and 3 use `httpx.MockTransport`.\n\n```python\nimport asyncio\n\nimport httpx\nfrom adcp import fetch_adagents\nfrom adcp.adagents import resolve_properties_for_agent\n\n\ndef first_line(exc):\n    return f\"{type(exc).__name__}: {str(exc).splitlines()[0]}\"\n\n\nasync def main():\n    # 1. Real publisher: MANAGERDOMAIN lives in an ads.txt served behind redirects.\n    try:\n        await fetch_adagents(\"recipetineats.com\")\n    except Exception as exc:\n        print(\"1.\", first_line(exc))\n    async with httpx.AsyncClient(follow_redirects=True) as client:\n        r = await client.get(\"https://recipetineats.com/ads.txt\")\n        print(\"   ads.txt chain:\", [str(h.url) for h in r.history] + [str(r.url)])\n        print(\"   directive:\", [l for l in r.text.splitlines() if l.lower().startswith(\"managerdomain\")])\n    print(\"   manager file agents:\", len((await fetch_adagents(\"cafemedia.com\"))[\"authorized_agents\"]))\n\n    # 2. Non-404 failures: no status attribute, no fallback.\n    seen = []\n\n    def outage(request):\n        seen.append(request.url.path)\n        return httpx.Response(200, text=\"managerdomain=cafemedia.com\\n\") if request.url.path == \"/ads.txt\" else httpx.Response(503)\n\n    async with httpx.AsyncClient(transport=httpx.MockTransport(outage)) as client:\n        try:\n            await fetch_adagents(\"example.com\", client=client)\n        except Exception as exc:\n            print(\"2.\", first_line(exc), \"| status_code attr:\", hasattr(exc, \"status_code\"), \"| requested:\", seen)\n\n    # 3. A file the permissive resolver handles cannot be fetched.\n    agent = \"https://sales.example-agent.com\"\n    doc = {\"authorized_agents\": [{\"url\": agent, \"authorized_for\": \"Display\"}],\n           \"properties\": [{\"property_id\": \"site\", \"property_type\": \"website\", \"name\": \"Site\",\n                           \"identifiers\": [{\"type\": \"domain\", \"value\": \"example.com\"}]}]}\n    print(\"3. permissive resolver:\", [p[\"property_id\"] for p in resolve_properties_for_agent(doc, agent, mode=\"permissive\")])\n    async with httpx.AsyncClient(transport=httpx.MockTransport(lambda r: httpx.Response(200, json=doc))) as client:\n        try:\n            await fetch_adagents(\"example.com\", client=client)\n        except Exception as exc:\n            print(\"   fetch_adagents:\", first_line(exc))\n\n\nasyncio.run(main())\n```\n\nOutput:\n\n```text\n1. AdagentsNotFoundError: adagents.json not found for domain: www.recipetineats.com\n   ads.txt chain: ['https://recipetineats.com/ads.txt', 'https://www.recipetineats.com/ads.txt', 'https://ads.adthrive.com/sites/55cb7e3b4bc841bd0c4ea577/ads.txt']\n   directive: ['managerdomain=cafemedia.com']\n   manager file agents: 1\n2. AdagentsValidationError: Failed to fetch adagents.json: HTTP 503 | status_code attr: False | requested: ['/.well-known/adagents.json']\n3. permissive resolver: ['site']\n   fetch_adagents: AdagentsValidationError: Invalid adagents.json structure: Agent authorization must have exactly one of: properties, property_ids, property_tags, publisher_properties.\n```\n\nThe publisher's own `adagents.json` is a 404 (after the apex-to-www hop, which the SDK now follows). Its ads.txt names `cafemedia.com`, and `cafemedia.com`'s file resolves. The SDK never reads the directive because ads.txt sits behind two redirects. The first stays on the publisher's root domain. The second is one hop to a third-party host. That is the redirect pattern the IAB ads.txt specification permits: redirects within the root domain, plus a single hop to a host outside it.\n\nCode: `_fetch_ads_txt_managerdomains` (`adcp/adagents.py:783-832`, `follow_redirects=False` at 813/818). The fallback runs only on `AdagentsNotFoundError` (`adagents.py:917`). Other statuses raise `AdagentsValidationError(f\"Failed to fetch adagents.json: HTTP {status_code}\")` (`adagents.py:1291`). Strict structure validation runs inside the fetch (`adagents.py:1315`).\n\n## Why an adopter hits this\n\nEmbedded Sales Agent wraps the SDK in `fetch_adagents_permissive` (`src/services/adagents_fetch.py`, 381 LOC). It:\n\n- matches the strings `\"Failed to fetch adagents.json: HTTP \"` and `\"Agent authorization must have exactly one of\"`;\n- re-implements a pinned, per-hop ads.txt redirect walk;\n- imports the private `_parse_managerdomains` and `_ensure_safe_manager_domain`.\n\nIts tests patch the private `adcp.adagents._owned_pinned_client` and `_dns_validate_host`, because SDK-owned hops can't take an injected transport. Without the wrapper, these publishers show as \"no adagents.json\", and products can't bind to them.\n\n## Ask\n\n1. In the MANAGERDOMAIN fallback, follow ads.txt redirects under the IAB rule (any number of hops within the publisher's root domain, plus at most one hop off it). Use the same per-hop gates as #947: HTTPS only, `_dns_validate_host`, a fresh pinned client per hop, and a hop cap. If you'd rather not change the default, put it behind an opt-in flag (e.g. `follow_ads_txt_redirects=True`).\n2. Raise a typed error for non-2xx responses (e.g. `AdagentsHTTPError(AdagentsValidationError)` with `status_code` and `url`).\n3. Let callers fetch without strict structure validation (e.g. `fetch_adagents(..., validate_structure=False)`), so files that `validate_adagents_structure` and the permissive resolver can process are reachable.\n4. Make `parse_managerdomains` public, and give SDK-owned hops a public transport seam (e.g. a `transport_factory=` kwarg) for tests.\n\n","author":{"url":"https://github.com/bokelley","@type":"Person","name":"bokelley"},"datePublished":"2026-10-02T16:02:20Z","url":"https://github.com/adcontextprotocol/adcp-client-python/issues/1306"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:96e68b6b-0882-2a3d-d025-2fb1409285da
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC324:25598F:C5A88F:106920E:6B00F5B3
html-safe-nonce085f5fad3fff75a3dd4a2b8893a34470d095f96c6211574b5430cfa429a95f36
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMzI0OjI1NTk4RjpDNUE4OEY6MTA2OTIwRTo2QjAwRjVCMyIsInZpc2l0b3JfaWQiOiIzODExMjk5MzkxMjMxMjkyODUxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac903232a48fceaecea380a646d1b1e92981edac64be799528c5a47f4bf184ead5
hovercard-subject-tagissue:5680002062
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/adcontextprotocol/adcp-client-python/1306/issue_layout
twitter:imagehttps://opengraph.githubassets.com/85c15b1e08c5c3e1757764a2b47f08fdca36010c4e270c39d32e5f4c0601882f/adcontextprotocol/adcp-client-python/issues/1306
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/85c15b1e08c5c3e1757764a2b47f08fdca36010c4e270c39d32e5f4c0601882f/adcontextprotocol/adcp-client-python/issues/1306
og:image:altSummary On 8.0.0, fetch_adagents fails for publishers that delegate through ads.txt MANAGERDOMAIN and serve ads.txt behind a redirect, which is common on managed hosting. The fallback fetches /ads....
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamebokelley
hostnamegithub.com
expected-hostnamegithub.com
None4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc
turbo-cache-controlno-preview
go-importgithub.com/adcontextprotocol/adcp-client-python git https://github.com/adcontextprotocol/adcp-client-python.git
octolytics-dimension-user_id221690821
octolytics-dimension-user_loginadcontextprotocol
octolytics-dimension-repository_id1090305973
octolytics-dimension-repository_nwoadcontextprotocol/adcp-client-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1090305973
octolytics-dimension-repository_network_root_nwoadcontextprotocol/adcp-client-python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release9983dd5da06943f833c971dd5b6bc988e2858be5
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/adcontextprotocol/adcp-client-python/issues/1306#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fadcontextprotocol%2Fadcp-client-python%2Fissues%2F1306
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fadcontextprotocol%2Fadcp-client-python%2Fissues%2F1306
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=adcontextprotocol%2Fadcp-client-python
Reloadhttps://github.com/adcontextprotocol/adcp-client-python/issues/1306
Reloadhttps://github.com/adcontextprotocol/adcp-client-python/issues/1306
Reloadhttps://github.com/adcontextprotocol/adcp-client-python/issues/1306
adcontextprotocolhttps://github.com/adcontextprotocol
adcp-client-pythonhttps://github.com/adcontextprotocol/adcp-client-python
Codehttps://github.com/adcontextprotocol/adcp-client-python
Issues44 (44)https://github.com/adcontextprotocol/adcp-client-python/issues
Pull requests13 (13)https://github.com/adcontextprotocol/adcp-client-python/pulls
Actionshttps://github.com/adcontextprotocol/adcp-client-python/actions
Projectshttps://github.com/adcontextprotocol/adcp-client-python/projects
Security and qualityhttps://github.com/adcontextprotocol/adcp-client-python/security
Insightshttps://github.com/adcontextprotocol/adcp-client-python/insights
https://github.com/adcontextprotocol/adcp-client-python
New issuehttps://github.com/login?return_to=https://github.com/adcontextprotocol/adcp-client-python/issues/1306
New issuehttps://github.com/login?return_to=https://github.com/adcontextprotocol/adcp-client-python/issues/1306
bug(adagents): fetch_adagents can't resolve real MANAGERDOMAIN publishers whose ads.txt is behind a redirect, and its errors carry no HTTP statushttps://github.com/adcontextprotocol/adcp-client-python/issues/1306#top
bugSomething isn't workinghttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22bug%22
claude-triagedhttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22claude-triaged%22
https://github.com/bokelley
bokelleyhttps://github.com/bokelley
on Oct 2, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/1306#issue-5680002062
adagents.json discovery: replace follow_redirects=False with same-registrable-domain following (apex→www); refuse on authoritative_location (adcp#5450) #947https://github.com/adcontextprotocol/adcp-client-python/issues/947
bokelleyhttps://github.com/bokelley
bugSomething isn't workinghttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22bug%22
claude-triagingTriage routine is actively working on this issue (1-3 min)https://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22claude-triaging%22
on Oct 2, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/1306#event-32347613603
https://github.com/bokelley
bokelleyhttps://github.com/bokelley
on Oct 2, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/1306#issuecomment-5956305527
https://claude.ai/code/session_01BnMVRqh3xCh79h21VFmy4Thttps://claude.ai/code/session_01BnMVRqh3xCh79h21VFmy4T
Claude Codehttps://claude.ai/code
bokelleyhttps://github.com/bokelley
claude-triagedhttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22claude-triaged%22
claude-triagingTriage routine is actively working on this issue (1-3 min)https://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22claude-triaging%22
on Oct 2, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/1306#event-32347895710
bokelleyhttps://github.com/bokelley
completedhttps://github.com/adcontextprotocol/adcp-client-python/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Oct 3, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/1306#event-32418264224
Sign up for freehttps://github.com/signup?return_to=https://github.com/adcontextprotocol/adcp-client-python/issues/1306
Sign in to commenthttps://github.com/login?return_to=https://github.com/adcontextprotocol/adcp-client-python/issues/1306
bugSomething isn't workinghttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22bug%22
claude-triagedhttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22claude-triaged%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.