René's URL Explorer Experiment


Title: test(server): refactor spec_compat_hooks tests to use public API · Issue #653 · adcontextprotocol/adcp-client-python · GitHub

Open Graph Title: test(server): refactor spec_compat_hooks tests to use public API · Issue #653 · adcontextprotocol/adcp-client-python

X Title: test(server): refactor spec_compat_hooks tests to use public API · Issue #653 · adcontextprotocol/adcp-client-python

Description: Follow-up to #646 / PR #648. The tests in tests/test_spec_compat_hooks.py (added in PR #648) reach into private helpers (_hook_get_products, _infer_asset_type, _coerce_asset, _make_sync_creatives_hook) and assert on internal shapes. Per ...

Open Graph Description: Follow-up to #646 / PR #648. The tests in tests/test_spec_compat_hooks.py (added in PR #648) reach into private helpers (_hook_get_products, _infer_asset_type, _coerce_asset, _make_sync_creatives_h...

X Description: Follow-up to #646 / PR #648. The tests in tests/test_spec_compat_hooks.py (added in PR #648) reach into private helpers (_hook_get_products, _infer_asset_type, _coerce_asset, _make_sync_creatives_h...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"test(server): refactor spec_compat_hooks tests to use public API","articleBody":"Follow-up to #646 / PR #648.\n\nThe tests in `tests/test_spec_compat_hooks.py` (added in PR #648) reach into private helpers (`_hook_get_products`, `_infer_asset_type`, `_coerce_asset`, `_make_sync_creatives_hook`) and assert on internal shapes. Per CLAUDE.md the testing contract is:\n\n- **Test what you import** — call the public API, not internals.\n- **Validate with `.model_validate()`** — prove hook output is actually 4.4-schema-valid by feeding it through the generated `SyncCreativesRequest` / `GetProductsRequest` models from `adcp.types`.\n\n### Scope\n\n1. Rewrite assertions to go through `spec_compat_hooks()` + the published hook dict surface (e.g. via `create_tool_caller` with the hooks installed), not the private helpers.\n2. Add at least one test that runs the coerced `sync_creatives` payload through `SyncCreativesRequest.model_validate()` and asserts no `ValidationError`.\n3. Expand the `create_tool_caller` integration test (currently only checks the `buying_mode` default on get_products) to exercise the harder paths:\n   - `format_id` wrap (string → object)\n   - `asset_type` inference for unknown assets\n   - `image` → `url` demotion through the actual `sync_creatives` tool path\n4. Optional: emit a `warnings.warn` when `exclude=` contains a name not in the canonical set, so typos like `exclude={\"sync_creative\"}` don't silently leave the hook active.\n\n### Why not block PR #648 on this\n\nThe implementation in `src/adcp/server/spec_compat.py` is correct and matches the spec table from #646. The current tests do exercise every code path (just at the wrong level); regression coverage is real. Splitting the test refactor out keeps the feature shippable.","author":{"url":"https://github.com/bokelley","@type":"Person","name":"bokelley"},"datePublished":"2026-05-11T07:15:20Z","url":"https://github.com/adcontextprotocol/adcp-client-python/issues/653"}

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:7cc24a63-b089-6e09-6e76-c0cc57a35f77
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idEBF4:5D487:BD6E1:FDBA7:6B018483
html-safe-noncebe7e570cb90ebcfebda59fb40acdddcc93e4b1be4ad3dab444cab247444c0453
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQkY0OjVENDg3OkJENkUxOkZEQkE3OjZCMDE4NDgzIiwidmlzaXRvcl9pZCI6Ijg5MTUzNzAzODYxNDE1NzgzNzEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac3907f3485bdd642455d4040c8c4462c5773b020af3a53345bd0f8a9abb644d32
hovercard-subject-tagissue:4418818321
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/653/issue_layout
twitter:imagehttps://opengraph.githubassets.com/e7a9ac6c56aae6bb540c870e7b52c761db045316f29750e6e692c40736fedb08/adcontextprotocol/adcp-client-python/issues/653
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/e7a9ac6c56aae6bb540c870e7b52c761db045316f29750e6e692c40736fedb08/adcontextprotocol/adcp-client-python/issues/653
og:image:altFollow-up to #646 / PR #648. The tests in tests/test_spec_compat_hooks.py (added in PR #648) reach into private helpers (_hook_get_products, _infer_asset_type, _coerce_asset, _make_sync_creatives_h...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamebokelley
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
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
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/adcontextprotocol/adcp-client-python/issues/653#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fadcontextprotocol%2Fadcp-client-python%2Fissues%2F653
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%2F653
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/653
Reloadhttps://github.com/adcontextprotocol/adcp-client-python/issues/653
Reloadhttps://github.com/adcontextprotocol/adcp-client-python/issues/653
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/653
New issuehttps://github.com/login?return_to=https://github.com/adcontextprotocol/adcp-client-python/issues/653
#657https://github.com/adcontextprotocol/adcp-client-python/pull/657
test(server): refactor spec_compat_hooks tests to use public APIhttps://github.com/adcontextprotocol/adcp-client-python/issues/653#top
#657https://github.com/adcontextprotocol/adcp-client-python/pull/657
no-triageSkip the Claude triage bot — human or designated agent will handle this issuehttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22no-triage%22
https://github.com/bokelley
bokelleyhttps://github.com/bokelley
on May 11, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/653#issue-4418818321
#646https://github.com/adcontextprotocol/adcp-client-python/issues/646
#648https://github.com/adcontextprotocol/adcp-client-python/pull/648
#648https://github.com/adcontextprotocol/adcp-client-python/pull/648
#648https://github.com/adcontextprotocol/adcp-client-python/pull/648
#646https://github.com/adcontextprotocol/adcp-client-python/issues/646
bokelleyhttps://github.com/bokelley
no-triageSkip the Claude triage bot — human or designated agent will handle this issuehttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22no-triage%22
on May 11, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/653#event-25369931720
bokelleyhttps://github.com/bokelley
completedhttps://github.com/adcontextprotocol/adcp-client-python/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#657https://github.com/adcontextprotocol/adcp-client-python/pull/657
on May 11, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/653#event-25370816243
bokelleyhttps://github.com/bokelley
on May 11, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/653#event-25370816373
test(server): rewrite spec_compat tests against public API (#657)https://github.com/adcontextprotocol/adcp-client-python/commit/fcfee672dd79e2c37de78ab8157e267231ca652f
#657https://github.com/adcontextprotocol/adcp-client-python/pull/657
https://docs.github.com/articles/closing-issues-via-commit-messages
fcfee67https://github.com/adcontextprotocol/adcp-client-python/commit/fcfee672dd79e2c37de78ab8157e267231ca652f
Sign up for freehttps://github.com/signup?return_to=https://github.com/adcontextprotocol/adcp-client-python/issues/653
Sign in to commenthttps://github.com/login?return_to=https://github.com/adcontextprotocol/adcp-client-python/issues/653
no-triageSkip the Claude triage bot — human or designated agent will handle this issuehttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22no-triage%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.