视频号下载改走 resolver /direct 直连拼接 - #68
Merged
Merged
Conversation
Agent-Executor: cursor Agent-Model: cursor-grok-4.6-high Dispatch-Id: dlg-20260902-104254-d684c2 Task-Id: VideoTranscriptAPI-20260902-04
Required Gate v2 — 状态面板当前状态:pass · 可合并 当前裁决: Gate 历史(v1;来源为持久化
|
| Run | Attempt | Head | 状态 | 收件人动作 |
|---|---|---|---|---|
| 33629309739 | 1 | b2d67c3 |
skipped |
无需动作(主审未跑,绿≠过审) |
| 33632551707 | 1 | adf870a |
skipped |
无需动作(主审未跑,绿≠过审) |
| 33633817267 | 1 | ba9f80b |
unavailable |
修基础设施 |
| 33634300960 | 1 | ba9f80b |
fail |
要修代码 |
| 33637728206 | 1 | 5fdbead |
pass |
可合并 |
历史行按 run_id + run_attempt 去重并只增不删;删除本评论后可由 gate_terminal 制品重建。
Agent-Executor: kimi Agent-Model: kimi-code/k3-256k Agent-Effort: high Dispatch-Id: dlg-20260902-122616-64c9fb Task-Id: VideoTranscriptAPI-20260902-05
⚙️ Review ledger state(机器状态记录,非评审结论)
机器状态明细
完整数据保存在 |
Agent-Executor: grok Agent-Model: grok-4.6 Agent-Effort: unknown Dispatch-Id: dlg-20260902-125054-3011bf Task-Id: VideoTranscriptAPI-20260902-06
zj1123581321
marked this pull request as ready for review
September 2, 2026 13:11
Co-authored-by: Cursor <cursoragent@cursor.com> Agent-Executor: cursor Agent-Model: cursor-grok-4.6-high Agent-Effort: unknown Dispatch-Id: dlg-20260902-131907-98654a Task-Id: VideoTranscriptAPI-20260902-04
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.
背景
视频号联调实测:VTA 生产(n305)到 resolver(fordeal)之间走 Tailscale DERP 中继仅 ~15KB/s,经 resolver 流式端点中转 415MB 视频不可行(Fixes #67 的推荐方案落地后仍受链路速度制约)。
改动
resolver 新增
GET /api/stream/wechat_channels/{sph_code}/direct(上游 f66787d 已生产可用)返回解密文件头 + 微信 CDN 直链;本 PR 让 VTA 的视频号下载改为直连拼接:MediaResolverClient.fetch_wechat_direct:调 /direct,校验扁平 JSON(sph_code 回显、正整数字段、head_b64 长度),错误映射与 resolve() 同语义MediaResolverDownloader.download_file识别 resolver 视频号流式 URL(netloc 匹配 + path 正则)后走_download_wechat_direct:写解密头(ftyp 校验)→ CDNRange拉身子 → 断流/410 等换链续传(≤5 次,零进展放弃)→ 总字节数校验cdn_url(含时效 token)不进日志/异常/持久化;CDN 请求不带X-API-Key;每次请求前过 SSRF 校验验证
uv run pytest tests/unit:2805 passedtests/unit/test_media_resolver_wechat_direct.py等),含断流续传 Range 断言、换链、日志无 token 断言联调计划
合并部署 n305 后用
https://weixin.qq.com/sph/AHaM8SrlXX(2 小时视频)跑真实联调。Task-Id: VideoTranscriptAPI-20260902-04