Repository navigation
Return every Meta ad field and stabilize live CI - #5
Merged
Merged
Conversation
… richer models Add MetaAdsClient.get_ad_insights() and the async twin, running the Ad Library "See ad details" GraphQL document (AdLibraryV3AdDetailsQuery). get_ad_details() and enrich_ad() attach that payload as ad_details, so enriched ads carry EU/UK/BR transparency (audience, total reach, per-country age/gender breakdown), US political demographic and regional insights, payer/beneficiary data, advertiser page info and page spend. Normalize every field the search rows currently return (page categories, impression bucket text and index, extra creative variants, watermarked media, page like count and deletion flag) and expose the detail payload through new Ad, AdCreative and PageInfo fields while keeping api_fields lossless. Share one CSV schema (meta_ads_collector.exports) across the CLI and both collectors, adding the most useful new scalar columns. Fixture, unit, enrichment, client and live tests cover the new query. Version 1.7.0 with changelog and API reference updates. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… majors The bounded live connectivity check failed on a single 20 s bootstrap timeout through the residential CI proxy. Allow three attempts with a 30 s timeout; the job stays blocking and bounded by its 5 minute limit. Pin actions/checkout, setup-python, upload-artifact and download-artifact to their current majors so runs stop forcing deprecated Node 20 actions onto Node 24. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Calling asyncio.run from sync tests leaves no current event loop, and on Python 3.9 curl_cffi's AsyncSession needs one at construction time, so later constructor tests failed in CI. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
One 20 s request stall through the residential CI proxy failed the country parameter case while the other 101 live tests passed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The residential CI proxy occasionally stalls for more than the client's whole retry budget while opening its leg to Meta, failing a random live proxy case per run. The local gateways now give each upstream attempt 14 s and retry once, keeping both attempts inside one 30 s client request. Direct tunnels are unchanged. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Three consecutive live-meta runs each failed on a different transient on the residential proxy path: one stalled GraphQL search, one async bootstrap connect timeout, and CDN CONNECT tunnels answered with 590 during media downloads. Run every actual Meta pytest invocation with pytest-rerunfailures (--reruns 2, 15 s apart) restricted by --only-rerun to transport-class errors, so data and behaviour assertions still fail on the first attempt. A contract test keeps the core and MCP allowlists identical and checks representative messages. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Meta serves the same signed media path from any *.fbcdn.net host (verified live: identical bytes from five edges). The residential CI exit repeatedly failed to reach one regional edge for a whole run, exhausting the download retries even across reruns. Odd-numbered attempts now use scontent.xx.fbcdn.net or video.xx.fbcdn.net within the existing retry budget; non-Meta URLs and expired (403) URLs behave as before. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
get_ad_insights()(sync + async), the Ad Library "See ad details" GraphQL query (AdLibraryV3AdDetailsQuery).get_ad_details()/enrich_ad()/--enrichnow attach its payload asad_details: EU/UK/BR transparency (age, gender, location audience, total reach, per-country age/gender reach breakdown), US political demographic and regional insights, payer/beneficiary data, advertiser page info (verification, category, Instagram handle, about, cover photo), page spend by disclaimer, verified-voice context and violation types.Ad,AdCreativeandPageInfofields;api_fieldsstays lossless.meta_ads_collector.exports) for the CLI and both collectors, with the most useful new scalar columns.pytest-rerunfailures(--reruns 2, 15 s apart) restricted by--only-rerunto transport-class errors (curl timeouts, upstreamCONNECT590, resets, DNS, rate limits), so data and behaviour assertions still fail on the first attempt. GitHub Actions move to their Node 24 majors. Builds on the per-family proxy session isolation fromcodex/ci-socks-diagnostics.Verification
get_ad_insightssync/async live checks and enrichment of a sparse ad.live-proxy,live-connectivity,live-meta(102 passed through the private proxy; the head run needed one rerun of a media download case) andmcp-live. Earlier runs on the branch failed on three different proxy-leg transients (a stalled search, bootstrap connect timeouts, CDNCONNECT590), which is what the gateway retry and the rerun allowlist address.🤖 Generated with Claude Code