fix(selector): 同 host 的绝对 http 链接自动升级为 https #3633
All Vouch review confidence checks passed
Residual risk 0.13 = Change Risk (0.33) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.33 · 157 lines diff across 1 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.303
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3633"
general
weight: 0.35
wdw89
问题
部分站点页面本身是 https,但输出的详情页/选集链接是绝对 http(模板里硬编码)。浏览器会先请求 http 再被 301 跳到 https;而 web selector 引擎会直接以
http://请求。明文 80 端口在部分网络下会被直接阻断,导致整个数据源失效。实测(直连、无代理)以
agedm.io为例(搜索页为 https,详情链接却是http://www.agedm.io/detail/...):searchEpisodes抛RepositoryNetworkException,3 部番全部失败;修复
web/format层的 URL 构造统一走新的computeSelectorUrl:www.前缀差异)、且是默认端口的绝对 http URL 时,把 scheme 升级为 https;覆盖
SelectorSubjectFormat(条目详情页链接)与SelectorChannelFormat(选集链接,index-grouped 与 no-channel 两处)。验证
1. 新增单测
SelectorSameHostHttpToHttpsTest(9 个用例:同 host 升级 / www 前缀等价 / 跨 host 不变 / http base 不变 / 相对链接 / 非默认端口不变 / query+fragment 保留)。2. 真实 E2E:用包含本补丁的
datasource-test-mcp直连评测agedm.io数据源:- 修复前:3 部番全部
RepositoryNetworkException;- 修复后:13/13、10/10、8/8 条候选全部解析出视频 URL,mpv 实播正常。
3. 回归:现有源
2k动漫在打补丁的构建下解析正常(间谍过家家 2/2、迷宫饭 1/1;芙莉莲条目偶发播放器不出流,重试即恢复)。对比打补丁前后的 trace,其条目/选集 URL 逐字一致——本补丁对该源不产生任何 URL 变化,失败为站点侧播放器抖动。备注
matchVideoUrl与播放期 WebView 的嵌套播放器捕获链路不经过该函数。