fix(guizang-product-video-skill): 按旁白答案条件上报 EASYROUTER_API_KEY - #36
Merged
hwj123hwj merged 1 commit intoSep 21, 2026
Merged
Conversation
… actually needed The environment check never mentioned EASYROUTER_API_KEY, and the only place that told the agent to ask for it sat in references/onboarding.md — which the flow gates behind "load it only for reported gaps". A gap that is never reported is never read about, so a narrated film kept discovering the missing key at the mixing step, after the entire picture had been built. - check_environment.py: add `--voiceover yes|no|undecided`. Only `yes` (the step-1 answer) reports the key, in a separate `prereqs` list so a missing credential is not read as a broken toolchain and does not skip the browser launch; `undecided` warns instead. The answer is deliberately not read from plan.json — at that point the plan is still the starter sample and its voiceoverRequired is stale, which would silently suppress the reminder. - SKILL.md: resolve the key the moment the user says yes (it blocks mixing, not rendering); pass the answer to the check. - audio-sourcing.md: give the narration pace positively — use the voice's natural pace, measured on this film's own copy (typically 4–6 chars/s), and adjust by changing the voice or shortening the line. The existing 6–9 chars/s figure is a *reading* line, not a narration target, and budgeting copy to it overruns the shots. - onboarding.md: Homebrew python3 for the gateway (system 3.9 + LibreSSL fails TLS) and the transient first-request disconnect. - tests: two regressions for the gating, plus one asserting the key value never reaches the report or evidence/environment.json.
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.
问题
环境检查脚本从不提
EASYROUTER_API_KEY,而唯一叫 agent 去索取它的地方写在references/onboarding.md里——按流程,这份文档只在检查报出缺项时才读。于是形成一个自锁:永远报不出来的缺项,永远读不到它的说明。实际后果是一次完整走完的旁白制作:画面全部做完、混音前才发现没有 key,用户白等一整轮。
按
--voiceover的答案条件化上报,而不是一律要求 key——多数片子不要旁白,那时不该多出任何提示。改动
scripts/check_environment.py--voiceover yes|no|undecided,默认no。yes时把 key 报成prereqs(不是missing):凭据是用户给的,不是环境坏了,也不该让引擎检查(浏览器启动)被跳过。undecided只给一条告警。plan.json:第 2 步时 plan 还是起步工程的技术样片,voiceoverRequired是过期值,读它会得到错误答案、并静默压掉提示。这个决定只存在于对话里,所以必须用参数传。next现在把两类缺项都说出来,不互相遮蔽。voiceover字段只含requested/keyResolved/keySource,不含 key 明文,也进了指纹,所以 key 状态变化会触发重新上报。SKILL.md:选「要旁白」的那一刻就解析并索取 key(它挡混音不挡渲染);检查时把答案传进去;写稿前先量本片真实语速。references/audio-sourcing.md:两处修正,都来自实测。speed在 Gemini 后端被静默忽略、在gpt-4o-mini-tts上精确生效;atempo只是兜底。另外记下语速不能跨句外推(同一音色在探测句 5.56、在本片正式稿 4.21 字/秒)。references/onboarding.md:两个实测过的环境问题——macOS 系统python3(3.9 + LibreSSL)访问网关 TLS 失败、/audio/speech偶发首次请求被对端断开(应重试,不是 key 或配额问题)。tests/test_regressions.py:两个新回归——四种决策组合下的上报行为,以及 key 值不进入报告或evidence/environment.json。验证
ruby scripts/validate_skills.rb→Skill gate passed: 32 skill(s), 32 unique name(s)python3 -m unittest discover -s tests→ 21 tests OK(原 19)no静默 /yes无 key →prereqs+ready:false/undecided→ 仅告警 /yes+.env→ 从.env解析evidence/environment.json里只有keySource,无明文版本 1.1.0 → 1.1.1(
marketplace.json的 version 与packageKey同步)。