Repository navigation
LLM 产出按 language 生成中英文,生成层缓存按语言判定(i18n C3) - #268
Merged
Merged
Conversation
C3 先用测试锁死 prompts/__init__.py 与中文 builder 产出,避免后续英文路径改写中文正文。 Agent-Executor: grok-pi Agent-Model: grok-4.6 Agent-Effort: high Dispatch-Id: dlg-20261019-123838-df4d56 Task-Id: VideoTranscriptAPI-20261019-05
中文 prompt 模块保持不动;总结/笔记/章节走 localized 访问函数。英文预算系数 1.8。 Agent-Executor: grok-pi Agent-Model: grok-4.6 Agent-Effort: high Dispatch-Id: dlg-20261019-123838-df4d56 Task-Id: VideoTranscriptAPI-20261019-05
zh-CN 保持说话人N,en 输出 Speaker N;复合推测名沿用该前缀。 Agent-Executor: grok-pi Agent-Model: grok-4.6 Agent-Effort: high Dispatch-Id: dlg-20261019-123838-df4d56 Task-Id: VideoTranscriptAPI-20261019-05
不一致时 get_cache 隐藏该层,llm_ops 打 LANGUAGE-MISMATCH-REGENERATE;校对层不重跑。 Agent-Executor: grok-pi Agent-Model: grok-4.6 Agent-Effort: high Dispatch-Id: dlg-20261019-123838-df4d56 Task-Id: VideoTranscriptAPI-20261019-05
LANGUAGE-MISMATCH-REGENERATE 断言已红验;scope check 绿。 Agent-Executor: grok-pi Agent-Model: grok-4.6 Agent-Effort: high Dispatch-Id: dlg-20261019-123838-df4d56 Task-Id: VideoTranscriptAPI-20261019-05
get_cache 不再按语言隐藏生成层;transcription 与 generate_notes 共用 language_mismatched_generation_layers。 Agent-Executor: grok-pi Agent-Model: grok-4.6 Agent-Effort: high Dispatch-Id: dlg-20261019-135859-60717b Task-Id: VideoTranscriptAPI-20261019-05
分享卡无 provenance,缺字段被当成 zh-CN,会把已匹配的英文总结每次都重跑。 Agent-Executor: grok-pi Agent-Model: grok-4.6 Agent-Effort: high Dispatch-Id: dlg-20261019-142938-142def Task-Id: VideoTranscriptAPI-20261019-05
非法 JSON 仍 fail-loud;语言判定用同一份 payload,不再在准入段调用 get_cache。 Agent-Executor: grok-pi Agent-Model: grok-4.6 Agent-Effort: high Dispatch-Id: dlg-20261019-142938-142def Task-Id: VideoTranscriptAPI-20261019-05
Agent-Executor: codex-pi Agent-Model: gpt-6-luna Agent-Effort: xhigh Dispatch-Id: dlg-20261019-152921-f1ed10 Task-Id: VideoTranscriptAPI-20261019-05
Agent-Executor: codex-pi Agent-Model: gpt-6-luna Agent-Effort: xhigh Dispatch-Id: dlg-20261019-152921-f1ed10 Task-Id: VideoTranscriptAPI-20261019-05
Agent-Executor: codex-pi Agent-Model: gpt-6-luna Agent-Effort: xhigh Dispatch-Id: dlg-20261019-152921-f1ed10 Task-Id: VideoTranscriptAPI-20261019-05
Agent-Executor: codex-pi Agent-Model: gpt-6-luna Agent-Effort: xhigh Dispatch-Id: dlg-20261019-152921-f1ed10 Task-Id: VideoTranscriptAPI-20261019-05
zj1123581321
marked this pull request as ready for review
October 19, 2026 16:52
Advisory reviewOCR 复核:原始 8 条 → 实锤 4 / 驳回 0 / 未定 4(另有 0 条超预算未复核) OpenCodeReview advisory 补充评审:8 条评论,14 个文件 Findings
|
Required Gate v2 — 状态面板当前状态:pass · 可合并 当前裁决: PR 累计主审轮(影子):
Gate 历史(v1;来源为持久化
|
| Run | Attempt | Head | 状态 | PR 累计主审轮(影子) | 收件人动作 |
|---|---|---|---|---|---|
| 39273571034 | 1 | 324421e |
skipped |
— |
无需动作(主审未跑,绿≠过审) |
| 39278924004 | 1 | fd4ed0b |
fail |
— |
要修代码 |
| 39279121675 | 1 | 7f33df5 |
fail |
— |
要修代码 |
| 39279358161 | 1 | 228f148 |
fail |
— |
要修代码 |
| 39279727544 | 1 | 4745aa8 |
skipped |
— |
无需动作(主审未跑,绿≠过审) |
| 39289217809 | 1 | 64f8898 |
fail |
— |
要修代码 |
| 39289243767 | 1 | 64f8898 |
pass |
1/5 · collecting |
可合并 |
历史行按 run_id + run_attempt 去重并只增不删;删除本评论后可由 gate_terminal 制品重建。
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.
概要
C3:LLM 产出(总结 / 笔记 / 章节)按全局
language生成中英文,生成层缓存按语言判定。设计依据docs/sessions/vta-i18n-261019/design.md「方案要点」3、4、5 与「关键不变式」1、4、5。llm/prompts/en.py,llm/prompts/localized.py按get_language()选择。min_summary_threshold);英文章节标题至多 12 词、本地截断 48 字符。artifact_provenance生成层记录language(缺字段视为 zh-CN)。语言不一致的判定只有一个计算点cache_manager.language_mismatched_generation_layers,只用于「是否复用」:transcription 分层补层、llm_ops、generate_notes 准入。get_cache不过滤,结果页在重生成前照常展示旧语言产物。LANGUAGE-MISMATCH-REGENERATE layer=… old=… new=…WARNING。说话人N不变,enSpeaker N。验证
uv run --frozen pytest -q tests/unit/i18n_llm tests/llm tests/unit/test_cache_manager.py tests/unit/test_view_token_resolver.py …(主脑在合入当前 main 后复跑全绿)708352f6上为断言失败make test(执行器报告退出码 0;CI 复核)已知限制
审查处置
独立审查(Codex,verdict
docs/sessions/vta-i18n-261019/reviews/C3-llm-output-verdict.md,见提交 b338095):api/services/llm_ops.py中总结每次重新生成都先删除旧llm_share_card.json、再按新总结写新卡,分享卡语言恒等于总结语言;总结层的语言判定已覆盖分享卡,单独为分享卡记 provenance 会再引入一个与总结层重复的判定点。🤖 Generated with Claude Code