Skip to content

fix(publish): nightly run leaves a draft Release, never uploads to YouTube - #13

Merged
duyetbot merged 2 commits into
mainfrom
fix/6656-render-only
Oct 27, 2026
Merged

duyetbot merged 2 commits into
mainfrom
fix/6656-render-only

Conversation

@duyet

@duyet duyet commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

What

The nightly render-video.yml run (cron 17 7 * * *, plus repository_dispatch) published with no owner step. It created a public GitHub Release with AI-planned copy and uploaded unlisted YouTube videos. After this PR an unattended run publishes nothing:

  • It renders, creates a draft GitHub Release (--publish --draft --no-youtube --accept), and writes one posting.anyrouter.dev draft folder per film (post.md + landscape mp4 + cover) to a posting-drafts workflow artifact. The owner pushes that folder with npx tsx scripts/posting-draft.ts <folder> in duyet/anyrouter and reviews it there.
  • The render step no longer has any YOUTUBE_* secret or YT_PRIVACY in its env, so it cannot reach YouTube.
  • regen --publish (replaces assets of a published Release) runs only on workflow_dispatch.
  • youtube.yml (owner dispatch only) is the single upload path and sets YT_PRIVACY: private literally; the repo var unlisted is no longer read.
  • lib/publish.mjs:
    • YT_PRIVACY accepts only private (default) or unlisted; anything else throws before GitHub or YouTube is called.
    • On schedule / repository_dispatch it throws unless the call is --draft --no-youtube, and refuses --replace.
    • Finds an existing draft by listing releases (the tag endpoint never returns drafts), so a re-run does not make a second draft. A draft run leaves an already-published Release untouched.
    • The ledger records published.draft: true; ledger shows it as draft.

Guard

lib/unattended.test.mjs reads every workflow as text (the test job has no YAML parser). It fails if:

  • a workflow triggered by schedule, repository_dispatch, push, pull_request or workflow_run mentions YOUTUBE_ or YT_PRIVACY;
  • any --publish line in such a workflow lacks --draft --no-youtube (unless it is gated on GITHUB_EVENT_NAME = workflow_dispatch);
  • any workflow other than youtube.yml holds YOUTUBE_REFRESH_TOKEN, or youtube.yml has a trigger other than workflow_dispatch or a privacy other than private.

Tests

  • 4eba838 adds the tests alone: 10 fail against the old code (4 workflow guards, 6 publish cases). b91bf66 makes them pass.
  • node --test: 199 pass, 0 fail. All GitHub and YouTube calls are mocked clients; nothing was published or uploaded.

Owner decisions (nothing was deleted)

  • Whether to keep, edit or delete the 72 existing public GitHub Releases and the 27 unlisted YouTube videos listed below.
  • Delete or keep the YT_PRIVACY=unlisted repo variable (no longer read by any workflow).
  • The YouTube refresh token is revoked (invalid_grant); re-authorise only when you want youtube.yml to work again.
  • The automatic import into posting needs a Cloudflare Access service token as a repo secret (follow-up P11 in duyet/anyrouter#6659). Until then the posting-drafts artifact is the hand-off.
  • To make a draft public: review it on GitHub and press Publish. Then dispatch youtube.yml for that release if you want the private upload.
27 unlisted YouTube videos (from the ledger)
changelog-009-20261019-2026-10-19-ab3b922805 landscape https://youtu.be/13bAkrcRuU8
changelog-009-20261019-2026-10-19-ab3b922805 portrait https://youtu.be/infzCjbLLRE
changelog-010-20261021-2026-10-19-a9b9979bdf landscape https://youtu.be/HNUkAFs75us
changelog-010-20261021-2026-10-19-a9b9979bdf portrait https://youtu.be/G6A0g-KM5o0
changelog-011-20261022-2026-10-22-148f6bec7b landscape https://youtu.be/ZhC8JyRgd5U
changelog-011-20261022-2026-10-22-148f6bec7b portrait https://youtu.be/TUFCJZgbSOY
changelog-012-20261023-2026-10-22-8b1f7daf91 landscape https://youtu.be/4uWLmtaaMjs
changelog-012-20261023-2026-10-22-8b1f7daf91 portrait https://youtu.be/4msbkP8_f_U
changelog-013-20261024-2026-10-24-42a58ce386 landscape https://youtu.be/AmuWFoeaNGk
changelog-013-20261024-2026-10-24-42a58ce386 portrait https://youtu.be/DNJ7j7dprxQ
changelog-014-20261025-2026-10-24-cfb3055e79 landscape https://youtu.be/bAKBJM05AOA
changelog-014-20261025-2026-10-24-cfb3055e79 portrait https://youtu.be/JkmTP-ZQank
explainer-002-20261019-v1-2591da164e landscape https://youtu.be/WTQFT9vZZTE
explainer-003-20261019-v1-ae8e0ec183 landscape https://youtu.be/vei-V14A3Ck
intro-002-20260930-v4-19e6ae2034 landscape https://youtu.be/l77rajPVRZA
model-drop-012-20261019-models-pricing-b65244dd7d landscape https://youtu.be/9ttH-vm3Wjw
model-drop-013-20261020-price-cut-ab34808bfb landscape https://youtu.be/fK4DC5sN9l8
model-drop-014-20261021-models-pricing-24d849e1a9 landscape https://youtu.be/QbGF_gKZgiE
model-drop-015-20261022-models-pricing-a12843affd landscape https://youtu.be/MhlP7VMsF0s
model-drop-016-20261023-models-pricing-922e0e04c3 landscape https://youtu.be/U8oKF2ricak
model-drop-017-20261024-models-pricing-582609bf28 landscape https://youtu.be/3xyhBYjPCjs
model-drop-018-20261025-models-pricing-7c617b51ae landscape https://youtu.be/MUd8m-agTAE
openrouter-unblock-003-20261019-v1-4cd8137dbb landscape https://youtu.be/7uR-o_h4d0g
release-001-20260930-v1.6.0-8209ec52de landscape https://youtu.be/udvbvFM-GHQ
release-001-20260930-v1.6.0-8209ec52de portrait https://youtu.be/dlZR6dgaHsA
use-case-001-20261019-claude-code-8b52221894 landscape https://youtu.be/5hHxoIGutdw
use-case-001-20261019-claude-code-8b52221894 portrait https://youtu.be/QyvhwSWPPXY
72 public GitHub Releases
model-drop-019-20261027-models-pricing-65c2c1b78c	2026-10-27	openai/gpt-6.1-terra is live on AnyRouter
changelog-015-20261027-2026-10-27-80ac36fe49	2026-10-27	GPT-6.1 Terra
model-drop-018-20261025-models-pricing-7c617b51ae	2026-10-25	nvidia/nemotron-3.5-bolt-e4b is now free on AnyRouter
changelog-014-20261025-2026-10-24-cfb3055e79	2026-10-25	4 changelog updates: Atria Dawn, Kimi K3.1 Pro +2 more
model-drop-017-20261024-models-pricing-582609bf28	2026-10-24	3 new models: atria-dawn, kimi-k3.1-pro-highspeed, kimi-k3.1-pro
changelog-013-20261024-2026-10-24-42a58ce386	2026-10-24	3 changelog updates: Atria Dawn, Kimi K3.1 Pro +1 more
model-drop-016-20261023-models-pricing-922e0e04c3	2026-10-23	3 new models: pplx-decider-flash-v1.2, nemotron-3.5-embed-1b, nemotron-3.5-embed-8b
changelog-012-20261023-2026-10-22-8b1f7daf91	2026-10-23	5 changelog updates: Recursive Flint, Elorian Glimpse +3 more
model-drop-015-20261022-models-pricing-a12843affd	2026-10-22	3 new models: flint-v1.0, mercury-3, glimpse
changelog-011-20261022-2026-10-22-148f6bec7b	2026-10-22	3 changelog updates: Recursive Flint, Elorian Glimpse +1 more
model-drop-014-20261021-models-pricing-24d849e1a9	2026-10-21	perplexity/pplx-embed-v1-4b is live on AnyRouter
changelog-010-20261021-2026-10-19-a9b9979bdf	2026-10-21	2 changelog updates: pplx-embed v1 4B added, MiniMax M3.1 Flash
model-drop-013-20261020-price-cut-ab34808bfb	2026-10-20	Price drop: deepseek-v4-flash down 100%
model-drop-012-20261019-models-pricing-b65244dd7d	2026-10-19	60 new models: minimax-m3.1-flash, deepseek-v4.1-flash-1017, muse-spark-open +57 more
changelog-009-20261019-2026-10-19-ab3b922805	2026-10-19	MiniMax M3.1 Flash
explainer-003-20261019-v1-ae8e0ec183	2026-10-19	What is AnyRouter, and how do you get its free models?
openrouter-unblock-003-20261019-v1-4cd8137dbb	2026-10-19	OpenRouter free models rate limited? Add your key to AnyRouter and share it with the pool
explainer-002-20261019-v1-2591da164e	2026-10-19	What is AnyRouter, and how do you get its free models?
use-case-029-20261019-mcp-for-agents-07317c593c	2026-10-19	Give agents MCP tools without per-client sprawl
use-case-028-20261019-mcp-gateway-425589e7e2	2026-10-19	Manage models and keys from any MCP client
use-case-027-20261019-sign-in-5e93149317	2026-10-19	Let users sign in with their AnyRouter account
use-case-026-20261019-byok-anthropic-7f711389db	2026-10-19	Bring your own Anthropic key
use-case-025-20261019-byok-697ac819bf	2026-10-19	Bring your own keys, $0 markup
use-case-024-20261019-donate-keys-f8f4641122	2026-10-19	Donate an idle key, earn credits back
use-case-023-20261019-agent-fallback-345e31f40d	2026-10-19	Keep an agent up when a provider goes down
use-case-022-20261019-model-evals-58f6f1bc5b	2026-10-19	Run one eval across many models
use-case-021-20261019-unify-api-be024f7854	2026-10-19	One API in front of every provider dialect
use-case-020-20261019-openai-sdk-4543830c36	2026-10-19	Keep the OpenAI SDK, change two fields
use-case-019-20261019-ai-sdk-8e3de26f8d	2026-10-19	One AI SDK provider for the whole catalog
use-case-018-20261019-cheapest-llm-api-d7b1c646ea	2026-10-19	Shop for the cheapest model without lock-in
use-case-017-20261019-free-chatbot-752d6061b4	2026-10-19	Build a free chatbot for a side project
use-case-016-20261019-free-llm-api-e289a727da	2026-10-19	A real free LLM API for side projects
use-case-015-20261019-go-plan-9062e5bb79	2026-10-19	Go: paid models from $2 a month
use-case-014-20261019-nvidia-free-key-0064ad0a03	2026-10-19	Route a free NVIDIA key through one URL
use-case-013-20261019-virtual-presets-f65d80ccd3	2026-10-19	Start on anyrouter/free or anyrouter/auto
use-case-012-20261019-claude-code-multiple-keys-bd03731ae0	2026-10-19	Several provider keys behind Claude Code
use-case-011-20261019-gemini-in-claude-code-78fd1ec8a3	2026-10-19	Gemini models in Claude Code
use-case-010-20261019-nvidia-nim-models-4854b01730	2026-10-19	NVIDIA NIM models through one endpoint
use-case-009-20261019-openrouter-free-in-your-tools-360ec1b62d	2026-10-19	OpenRouter free models in OpenCode and Cline
use-case-008-20261019-openrouter-free-fallback-5965ba86b5	2026-10-19	OpenRouter free models, with fallback to another free model
use-case-007-20261019-claude-code-free-models-f8e05fc0f1	2026-10-19	Run Claude Code on free models
use-case-006-20261019-claude-agent-sdk-36e0c55d8f	2026-10-19	Run the Claude Agent SDK on any model
use-case-005-20261019-hermes-agent-0db4be80c8	2026-10-19	Run Hermes Agent on AnyRouter
use-case-004-20261019-coding-agents-95d5dd8d3b	2026-10-19	Run every coding agent through one URL
use-case-003-20261019-opencode-111b3a4d8f	2026-10-19	Run OpenCode through AnyRouter
use-case-002-20261019-grokbot-a8531764e3	2026-10-19	Grok Bot + Herdr + Anyr CLI coding loop
use-case-001-20261019-claude-code-8b52221894	2026-10-19	Run Claude Code through AnyRouter
openrouter-unblock-002-20261018-v1-6b751fed35	2026-10-18	OpenRouter free models rate limited? Add your key to AnyRouter and share it with the pool
openrouter-unblock-001-20261018-v1-723148d1e2	2026-10-18	OpenRouter free models rate limited? Add your key to AnyRouter and share it with the pool
explainer-001-20261018-v1-1cbd1f149e	2026-10-18	What is AnyRouter? One key for every AI model, and free models
changelog-008-20261016-2026-10-16-c77ec7d496	2026-10-16	Amos 1 Medium disabled
changelog-007-20261014-2026-10-13-98a0cb9379	2026-10-14	Amos 1
changelog-006-20261013-2026-10-12-4d55a6f3c7	2026-10-13	Muse Spark 1.3 Contributor, Muse Wonder, GPT-6 Astra Pro and 6 more added
model-drop-011-20261009-models-pricing-5f363bbc1b	2026-10-09	2 new models: claude-haiku-5-5, step-5-preview, plus 1 -latest alias
model-drop-010-20261008-new-model-5f7d97c71d	2026-10-08	stealth/glyph-cluster is now free on AnyRouter
model-drop-009-20261006-context-change-2838560a4c	2026-10-06	Context windows updated on step-3.7-flash
model-drop-008-20261004-models-pricing-0bb5413219	2026-10-04	3 new models: laya, mistral-small-4, gemma-3n-e2b
changelog-005-20261004-2026-10-04-3549c46a3b	2026-10-04	Mistral Small 4
model-drop-007-20261003-models-pricing-d8cf029ef0	2026-10-03	3 new models: ling-3.1-flash, apodex-1.1-mini, gemma-3-4b-it
changelog-004-20261003-2026-10-03-b5635cd1ff	2026-10-03	2 changelog updates: Ling 3.1 Flash, Gemma 3 4B IT
model-drop-006-20261002-new-models-a1e0ee917c	2026-10-02	4 new models: pplx-decider-v1-27b, fledge-alpha, strands-decider-2b +1 more
changelog-003-20261002-2026-10-02-7ec44e74e7	2026-10-02	5 changelog updates: Pareto 26.10 Preview, Fledge Alpha +3 more
model-drop-005-20261001-models-pricing-92beafcc01	2026-10-01	inception/mercury-decide is now free on AnyRouter
changelog-002-20261001-2026-10-01-ce741c25d0	2026-10-01	Mercury Decide
model-drop-003-20260929-models+pricing-388c7ba751	2026-09-30	Claude Sonnet 5.5 and Step 5 Preview join AnyRouter, both with a 1M window
model-drop-002-20260928-models+pricing-b1c367a861	2026-09-30	GLM 5.3 Prime and Fugu Max join with 1M windows, plus Gemini Embedding 2
model-drop-001-20260927-models+pricing-1bc39f938b	2026-09-30	MiMo V2.6 Pro and Flash join AnyRouter with a 1.1M-token window
intro-002-20260930-v4-19e6ae2034	2026-09-30	AnyRouter in 60 seconds — one key, every model
intro-001-20260930-v3-22d9cb1e63	2026-09-30	AnyRouter in 60 seconds — one key, every model
release-001-20260930-v1.6.0-8209ec52de	2026-09-30	AnyRouter 1.6: name a model family, always get a live model
model-drop-004-20260930-models+pricing-24f646933f	2026-09-30	GPT-6.1 Sol, MiMo V2 Pro and Flash, two decision models, and -latest aliases
changelog-001-20260930-2026-09-30-7fb8483027	2026-09-30	Latest aliases, GPT-6.1 Sol, and two decision models

Fixes duyet/anyrouter#6656

🤖 Generated with Claude Code

duyet and others added 2 commits October 27, 2026 23:54
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s to YouTube

A schedule or repository_dispatch run now publishes nothing. It renders,
creates a draft GitHub Release, and writes a posting.anyrouter.dev draft
folder per film to the posting-drafts artifact. The render job holds no
YouTube credentials. youtube.yml is the only upload path, owner-dispatched
and private. publish.mjs refuses YT_PRIVACY=public everywhere, and refuses
a YouTube upload or a non-draft Release on an unattended run.

Fixes duyet/anyrouter#6656

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@duyetbot
duyetbot merged commit 1e37f16 into main Oct 27, 2026
9 checks passed
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.

2 participants