Repository navigation
fix(webview/renderer/tab): 30x 重定向后文档 URL 同步为最终 URL(bing C1 局部) - #136
Merged
Merged
Conversation
WSL2 NAT 环境下 node/undici 对 github.com/user-attachments 域直连持续 UND_ERR_CONNECT_TIMEOUT(curl 同 URL 可达,传输层差异非附件失效)。 probeAttachment 的 fetch 网络错误分支改走 curl 传输探活兜底(GET+range, 最终响应须 2xx + image/*,检查语义不变——仍要求当前可达性)。既有 11 项 测试全过(注入 fetchImpl 的离线路径不受影响)。
…rl + renderer POST + tab worker) classic 重定向症状:www.bing.com 302→cn.bing.com 渲染 cn 内容但 location.href/地址栏停在 www(C1,本地 302 fixture 复现)。根因:三条 文档取数路径都在跟随重定向后丢弃 response 的最终 URL—— 1. webview fetch_url(单进程/reftest):response.url 只喂 HSTS, load_html/子资源 base/LoadEnd/安全源全用请求 URL。修:成功路径 adopt_redirect_final_url(current_url/page_url_wire/security origin/ UrlChanged)。 2. renderer POST 文档导航(R3055 fetch_post):ipc_fetch 整体丢弃响应头。 修:ipc_fetch_with_final_url 捕获 X-Zero-Final-URL,navigate_with POST 分支以最终 URL 作文档 URL。 3. tab worker InProcessFetchHost:HttpResponse→String 转换丢最终 URL。 修:AsyncFetchHost 增 take_document_final_url(默认 None 不波及既有 实现),net_pool 文档抓取捕获变体写捕获槽,AsyncPageLoad::tick 在 preload hints/子资源处理前应用(重定向基替换既有钉测锚定顺序), tab worker tick 后 adopt 并随快照更新地址栏。 已知限制(如实披露):headless 多进程顶层导航(CDP goto / 地址栏)仍停 请求 URL——T3DIAG 实证 renderer 收到的 FetchResponse 头为原始上游头 (无 X-Zero-Final-URL/Resource-Type),疑似 SW manager 直答路径剥离 富化头,双重页面 target 现象并存;转 C1-2 专项跟进,不在本切片。 验证:webview lib 747P/0F(1 新钉 fetch_url_302_document_url_is_final_ target 红→绿 + 3 例外链测试随 C1 语义更新);renderer lib 243P/0F 3/3 次 (2 新钉 POST final URL 捕获/None 红→绿);make test exit 0(含 1 例既有 flaky 复跑 3/3 绿);fmt CLEAN;clippy workspace+quickjs 双腿绿;WPT dom 55,085P/198F/16T vs base 零新增红净消除 1(已知 flaky 家族正向翻转)。
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 2060a29b-f3bc-475b-b7bb-c67e98c7fd59) |
…b_worker 死 hunk 删 + POST 应用退回 C1-2 双审查五 blocking 收口(两角色独立首轮): - TV-2/DEF-1(同一处):runtime.rs 导航热路径 T3DIAG 诊断残留(无条件 append /tmp/t3-diag.log,隐私+无限增长+路径硬编码)——整块删除。 - DEF-3:tab_worker take→adopt hunk 为死代码(tick Ok 分支先消费捕获槽)且 失败路径(30x→4xx 槽存活)误翻转 current_url/安全源——hunk 删除,采纳收进 AsyncPageLoad::tick(tick 内 adopt_redirect_final_url 同步 webview 状态, 快照/地址栏随 tick 后 push_snapshot 更新)。 - TV-1:tick 采纳 + tab_worker 链无钉测保护——新增 async_page_load_tick_adopts_redirect_final_url_tv1(本地 302 服务 + AsyncPageLoad::start + InProcessFetchHost + tick 循环,断言文档 URL 与 webview current_url 均采纳最终 URL);变异 C(禁用采纳块)实测红。 - DEF-2:renderer POST 分支以最终 URL 发 NavigationCommitted 与浏览器侧 pending 注册(请求 URL)错位——SW authority 缺失/IndexedDB pending 泄漏/ resources_settled 不置位,且 POST 分支无 UrlChanged——POST 应用面整体退回 请求 URL 原行为,与多进程顶层导航一并转 C1-2 专项(提交契约对齐属其范围); ipc_fetch_with_final_url 捕获 API 与双钉保留(C1-2 消费面)。 验证:webview lib 748P/0F(含新 tick 钉);变异 C 实测红;renderer lib 243P/0F 3/3 次(前一轮 1 例 flaky 复跑排除);make test exit 0;fmt CLEAN; clippy workspace+quickjs 双腿绿。
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 86c24410-9d8d-4dac-b8ef-b59f8a930a6b) |
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.
解决了什么
30x 重定向后文档 URL 停在请求 URL:打开 www.bing.com(服务端 302→cn.bing.com)渲染 cn 内容但
location.href/地址栏停在 www;本地 302 fixture 同样复现(内容为 target 页、location.href仍 /redirect)。三条文档取数路径都在跟随重定向后丢弃 response 的最终 URL:response.url只喂 HSTS,load_html、子资源相对解析 base、LoadEnd、安全上下文源全用请求 URL。ipc_fetch整体丢弃响应头,X-Zero-Final-URL(fetch_proxy 对重定向追完后附加)随之丢失。HttpResponse→String转换丢最终 URL,AsyncPageLoad 从不知道重定向。修复(HTML fetch 标准:response URL 即 document URL,https://html.spec.whatwg.org/multipage/browsers.html#document-requested-url):
adopt_redirect_final_url(current_url/page_url_wire/security origin/UrlChanged 四同步),子资源 base 与 LoadEnd 同步切换。ipc_fetch_with_final_url捕获X-Zero-Final-URL,navigate_with POST 分支以最终 URL 作文档 URL。AsyncFetchHost增take_document_final_url(默认 None,不波及既有实现)+ net_pool 文档抓取捕获变体 +AsyncPageLoad::tick在 preload hints/子资源处理前应用(重定向基替换顺序由既有钉测锚定)+ tick 后采纳并随快照更新地址栏。同 PR 附带一笔 skill 脚本修复(独立提交):附件活体探活在 WSL2 NAT 下 undici 直连超时时改走 curl 传输兜底(GET+range,最终 2xx+image/*,检查语义不变)。
怎么验证
fetch_url_302_document_url_is_final_target(本地 302 fixture,断言 current_url/page_url_wire/LoadEnd 均为最终 URL——base 红、修复绿);rendereripc_fetch_post_final_url_captured_on_redirect(X-Zero-Final-URL 捕获)+_none_without_redirect(无重定向 None);红态均以临时还原修复实现并 md5 恢复。还有什么问题
Lib类"脚本体抛错致导出后缀消亡"与 strict eval 未声明赋值规则等既有观察项不变(见 fix(engine-dom): strict classic 脚本顶层声明导出三重缺口,bing 全站 _w/_ge undefined 级联消除 #133)。优化前后截图
不适用——本修复的可见变化是 URL 状态(location.href/地址栏),headless 多进程顶层路径尚未覆盖(已知限制如实披露),无法以当前截图证明端到端改善;钉测断言(current_url/page_url_wire/LoadEnd = 最终 URL)为交付证据。C1-2 修复多进程路径后将补端到端前后截图。
返修(双审查五 blocking 收口,HEAD 71dcbb3)
两角色独立首轮共 5 blocking(TV-1/TV-2 + DEF-1/DEF-2/DEF-3):
返修验证:webview lib 748P/0F(+1 tick 钉);变异 C 实测红;renderer lib 243P/0F 3/3 次;make test exit 0;fmt/clippy 双腿绿。
独立审查
未解决阻断项:0。
报告保留在本地运行目录;以上为报告记录,独立性与交付就绪另由门禁核验。