test(extractors): make the live smoke check see a video outage - #18
Merged
Conversation
The daily health job stayed green through a total outage of Facebook video extraction, and could not have done otherwise. Both Facebook cases are galleries asserting `qualities.length >= 2`. When Facebook began answering 400 to the page request -- the only strategy that yields video -- the mobile strategy still returned one Open Graph image, which sent the post to the external gallery service, which returned the whole set. Two media, assertion satisfied, green. Facebook's own page fetch was dead the entire time. Two holes, both closed here. `minimumVideos` per case, asserted: counting media alone let a case named for video pass on photographs, so even adding a reel case would have protected little on its own. Every existing case is pinned to what its name claims -- 0 for the galleries and slideshows, 1 for the videos. A YouTube case, which had no live coverage at all despite being a primary platform. Verified through the real extractor before being added: one video stream and one audio stream come back. Facebook video itself gets a transport check rather than a post URL. Anonymous clients are served no video listing by any Facebook host, so there is no stable public reel to point at, and a URL that rots turns the daily job into noise. The three paths checked name nothing that exists, so nothing can be deleted out from under them; what is under test is whether Facebook rejects the shape of the request. A 404 passes. A 400 is the regression, and all three answered 400 before the header fix. Live run: 8/8, including the new YouTube case and the new check.
Merged
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.
Follow-up to #16 and #17. Those fixed the outage and its message; this makes the daily health job capable of noticing the next one.
The daily check stayed green through a total outage
.github/workflows/live-extractors.ymlruns every night and opens an issue on failure. It passed throughout the window in which every Facebook reel and share link was dead, and it could not have done otherwise.Both Facebook cases are galleries, asserting only
qualities.length >= 2. Measured on the share link the test itself uses:og:image=0og:image=2Strategy 3 returned one image, which sent the post to the external gallery service, which returned the whole set. Two media, assertion satisfied, green — while Facebook's own page fetch was dead the whole time.
Two holes, both closed
minimumVideosper case, asserted. Counting media alone let a case named for video pass on photographs, so simply adding a reel case would have protected little. Every existing case is now pinned to what its name claims:0for galleries and slideshows,1for videos.A YouTube case. A primary platform with no live coverage at all. Verified through the real extractor before adding it — one video stream and one audio stream come back.
Facebook video: a transport check, not a post URL
I could not find a stable public Facebook video to point at. No Facebook host serves an anonymous client a video listing —
www,mandmbasicall return a script shell with zero discoverable ids, forNASAandfacebookalike. And a URL that rots turns a nightly job into noise, which is the failure mode worth avoiding here.So the check tests the request instead of a post. The three paths it uses name nothing that exists, so no post can be deleted out from under them:
All three answered 400 before the header fix and 200 after. A 404 passes — that is a fine answer for a post that is not there. A 400 means Facebook rejected the shape of the request, which is exactly the regression, and it would have been caught on night one.
Verification
flutter test— 222 pass, 8 skipped (the live cases, gated as before)flutter analyze— No issues found🤖 Generated with Claude Code
https://claude.ai/code/session_01RjyfcAcWuaNcXTc4ZdTofM