Skip to content

feat(author): ask YouTube and Vimeo whether they have a hosted video - #258

Merged
alekswebnet merged 5 commits into
mainfrom
feat/hosted-video-exists
Nov 20, 2026
Merged

alekswebnet merged 5 commits into
mainfrom
feat/hosted-video-exists

Conversation

@alekswebnet

@alekswebnet alekswebnet commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Part of #218: item 4, "A YouTube or Vimeo address is checked to exist, where the network is there". Items 5 and 6 and the open question stay in #218.

What changes

  • A build asks YouTube's or Vimeo's oEmbed whether it has the video. Before, an address was held to its form only, so a made-up id built and showed a dead player.

  • What a status means is each host's own list, as seen on real videos on 2026-11-20:

    Host Status Seen for The build
    YouTube 400 an id it never had problem
    YouTube 404 a video taken down problem
    YouTube 403 a private video (two) note: its owner can open it
    YouTube 401 not seen; said to be embedding turned off note
    YouTube 200 public, and one that asks a viewer's age nothing
    Vimeo 404 no such video; per Vimeo's help centre also an unlisted one without the rest of its link problem, which says to give the whole link
    Vimeo 200 public; per the help centre also behind a password or let to some sites only nothing
    Vimeo 403 Vimeo refusing the asker's network (its help centre) nothing
  • Only the host's own answer counts. A sandbox's proxy or a school's filter answers for the host, which would otherwise refuse a build with no way round or put a note on every video. Each host sends a status that is no video in a way of its own: YouTube that status's words alone (Bad Request, Not Found, Forbidden) under its JSON type, Vimeo a page of them (404 Not Found, text/html). A status counts only when it comes so. A page of the box's own, the words under another type, or another status's words say nothing. A box that copied both the words and the type would still pass for the host; none was seen. If a host changes how it answers, the check goes quiet, not wrong.

  • A host that does not answer costs ten seconds once. After the first video with no answer, that host is not asked again in that build; the other still is. One video named twice is asked once.

  • YouTube is asked by the video's watch address. Its oEmbed answers 404 for the /embed/ and /v/ forms of a video it has.

  • Panopto and Echo360 have no public endpoint and are not asked. A read asks nothing.

  • It runs on the build page too: each endpoint sent CORS headers with a 200 and with a refusal, and the page's policy allows any connect-src.

  • The MCP server asks through publicFetch, which passes the timeout's signal on.

Privacy

A build now sends a hosted video's address to that site. The author README, the MCP README, SECURITY.md and design/author.md say so.

Tests

  • New: what is asked and how often; each problem and note; a status that means nothing for its host; a box answering for the host five ways (its own page, the bare words under text/plain, another status's words, and two for Vimeo); no network, each host asked once for four videos; and one host down with the other still refusing its missing video.
  • The suites never reach either host: a setup file (tests/helpers/oembed.ts) answers oEmbed requests for the author's Node project, and a test passes its own fetch to say otherwise.
  • Author 281 Node and 2 Chromium tests, skills 82, MCP 21, type check.
  • By hand against the live hosts: a made-up id and a removed video are refused, a private video builds with its note, vimeo.com/1 is refused, and real videos on both build with nothing said.

Self-review, 2026-11-20

The first version trusted any 400, 401, 403 or 404, called 401 and 403 "private or let to some sites only" for both hosts without having seen either, and waited ten seconds a video with no network. All three are changed above.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 8 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="design/author.md">

<violation number="1" location="design/author.md:95">
P3: The `check` bullet lists its network effects (media downloads) but omits the new oEmbed request. `build --check` now sends YouTube and Vimeo addresses to those hosts too, so add that to this bullet.</violation>
</file>

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread design/author.md Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 4 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread packages/author/lib/media.mjs Resolved
Comment thread packages/author/lib/media.mjs Resolved
Comment thread design/author.md Resolved
Comment thread packages/author/README.md Resolved
…its type, and a silent host leaves the other asked (#218)

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 4 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread design/author.md Resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant