Skip to content

fix(document): parse text responses with consistent decoding - #740

Merged
lanyue-llk merged 3 commits into
mainfrom
codex/pr640-text-final
Sep 22, 2026
Merged

lanyue-llk merged 3 commits into
mainfrom
codex/pr640-text-final

Conversation

@lanyue-llk

@lanyue-llk lanyue-llk commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

JSON 响应被当作 HTML 解析,文本节点不符合预期;编码处理还可能损坏文本。文本响应应呈现内容,而不是触发脚本、元素或资源预加载。

Reviewer 图解入口

artifact-site:七个 PR 的职责、依赖、原 11 类与 35 题证据。建议审查顺序:734 → 735 → 736 → 737 → 738 → 739 → 740;实际依赖以指南中的有向图为准。

图解与验收证据见站点报告;精确 HEAD 与完整成功、失败记录见下文。

当前 HEAD c6d78aeb42892eeec1aa1856bd932380ff2e4bf3 已基于 main@a54ba82a7ac6462429d2f60cd0dbd0d67c589e84 或其直接父 PR 重放;ca2a8d395726 的真实任务/专项证据和新提交的补丁等价边界分别核对。当前 HEAD 的对应真实任务已在独立新环境完整单轮 1/1 通过、零重试;归档旧轮结果与本轮严格区分。动作、评分、合同、二进制和产物哈希审计见 artifact-site 报告。

修复机制

在文档构造边界依据响应类型选择文本模式,并统一设置 decoder、parser 和预加载策略。主文档与子文档使用同一语义,流式分块不会改变最终文本。

机制示意与验收证据见 artifact-site 审查报告;图片仅用于解释机制,不代表本 PR 的验收结果。

共享文本解析入口也用于子文档快照,避免先转义包装、再按纯文本解析。文本页面不生成 doctype,并显式保持标准模式;声明的 MIME 优先于 URL 后缀。回归覆盖换行跨块、NUL、实体、关闭 pre 字面文本,以及主文档/iframe 的 DOM 结构一致性。

对应验收

本分区负责 1 题:784。

回归覆盖:JSON/text MIME、编码与 BOM、流式分块、主/子 frame、伪 HTML、脚本与预加载负对照;保留新 main 的纯文本子文档语义。

历史 case 784 在 main@de1093d9c 的完整基线中失败;该历史结果作为问题来源保留。当前分支同时基于新的纯文本子文档实现,验收需覆盖 JSON 以及既有 text/plain 结构与解析副作用。

当前版本 标识与验证范围
HEAD c6d78aeb42892eeec1aa1856bd932380ff2e4bf3
直接基线 746e376f0179988d0aa6250cb055aee2baaebb4f
main 基线 a54ba82a7ac6462429d2f60cd0dbd0d67c589e84
当前 HEAD 真实任务 1/1 完整单轮通过,零重试;提交 c6d78aeb42892eeec1aa1856bd932380ff2e4bf3,二进制 SHA-256 178149355cc1b6d43c494e2a61a911d1e7b86d07f5d3b7d032b3e6757d0f050e;逐题审计与历史对照
当前版本门禁 以该 HEAD 的 Format、Clippy、Nextest 结果为准;历史结果不替代当前门禁
已测归档版本真实任务 case 784:1/1 通过,10 个冻结动作全部完成、零重试;17 项输入哈希不变,全部产物哈希有效

范围与依赖

以工程 PR #734 为直接基线;diff 展示本分区修改。

本 PR 替代 729,基于更新后的 main;旧 PR 保留讨论与 review 历史。原始 #640 也保留作为拆分来源。

整组功能范围为历史 1.1.9 的 34 个失败任务加 1.1.8 已失败的 386,共 35 题:布局 27、输入 4、网络 3、文本 1。历史 67 是传输超时,保留证据但不归因本组功能修复。逐 case 历史及当前归属;历史 11 类分组。历史 main@de109 的 90 题基线 为 55/90,其运行顺序与后续子集不同,结果差异本身不作为独立因果证明。

7 个 PR 的依赖及逐题验收索引、PR 与提交账号核验。

文本解析新增场景的红绿证据。

已测归档 HEAD ca2a8d39572644de1211e3aba30d239abf0ffb17 的 release 二进制 SHA-256 为 882f2803f5c6e5dce8532419e9286027aabc4d90d783020a60e84e66f8508e1f。784 逐题审计。独立本地 HTTP + CDP 的主文档/iframe 12 个场景全部通过,验证 MIME 后缀冲突、BOM、实体与换行、无脚本/图片副作用,并包含正常执行脚本的 HTML 对照;真实浏览器场景结果。

35 题最终逐项来源总表;布局是 v3 的 26 题加 v4 单独 547,不是单轮 27/27。

@github-actions

Copy link
Copy Markdown

Sequential Navigation Soak A/B

✅ HEAD completed the 200-navigation resilience and memory observation.

One browser process, one target, and one CDP session navigate CSDN → SegmentFault → Huaban → example.com repeatedly. This run issued 200 Page.navigate commands per binary.

Common ancestor 2e9c28529f → HEAD ca2a8d3957; benchmark order: base-first; workflow: success.

Session resilience

Metric Base HEAD
Attempted / planned 200 / 200 200 / 200
Direct observable pass 200 / 200 200 / 200
Failures / recovered 0 / 0 0 / 0
Recovery failures 0 0
Lifecycle order violations 0 0
Network order violations 0 0
Wall time 315.8 s 348.4 s

A public-page failure is reported separately from an unrecoverable session. The soak requires all navigation attempts, zero failed recovery, zero lifecycle/network ordering violations, and complete resource evidence.

Process-tree memory

Metric Base HEAD Δ
Boundary samples 200 200 0
Boundary RSS samples 200 200 0
Boundary PSS samples 200 200 0
Periodic peak RSS 235.5 MiB 223.9 MiB -11.6 MiB
Periodic peak PSS 232.0 MiB 220.6 MiB -11.4 MiB
RSS · first 10 avg 167.3 MiB 150.6 MiB -16.7 MiB
RSS · last 10 avg 169.6 MiB 168.1 MiB -1.5 MiB
RSS · last − first window +2.3 MiB +17.5 MiB +15.2 MiB
RSS · warm slope / 100 nav +2.7 MiB -0.0 MiB -2.7 MiB
PSS · first 10 avg 163.9 MiB 147.2 MiB -16.8 MiB
PSS · last 10 avg 166.1 MiB 164.6 MiB -1.4 MiB
PSS · last − first window +2.2 MiB +17.5 MiB +15.3 MiB
PSS · warm slope / 100 nav +2.7 MiB -0.1 MiB -2.8 MiB
Peak file descriptors 64 64 0
Peak threads 31 31 0

HEAD memory by 50-navigation quarter

HEAD range Avg RSS Final RSS Peak RSS Avg PSS Final PSS Peak FD
1–50 166.2 MiB 153.6 MiB 223.9 MiB 162.8 MiB 150.2 MiB 52
51–100 169.7 MiB 152.9 MiB 220.5 MiB 166.4 MiB 149.9 MiB 54
101–150 170.8 MiB 157.1 MiB 218.0 MiB 167.5 MiB 153.6 MiB 54
151–200 170.1 MiB 146.0 MiB 221.5 MiB 166.6 MiB 142.6 MiB 53

Raw reports and per-navigation boundary samples: workflow run and full sequential-navigation-soak-results artifact.

Public-site timing and memory are observational. Use the A/B deltas and trend shape as evidence, not as a deterministic performance threshold.

@github-actions

Copy link
Copy Markdown

Spider Bench A/B

⚠️ Spider Bench infrastructure failed before a comparison could be produced.

Workflow: timed_out. Inspect the workflow run for the failing build, harness, or artifact step.

No benchmark result or performance conclusion is available for this run.

@github-actions

Copy link
Copy Markdown

CI Regression Report

Source CI run · source state at render: timed_out · artifacts: 2/5

Check Status Signal
Release regression ⚪ artifact unavailable or invalid
Frontend differential ⚪ artifact unavailable or invalid
Agent episodes ✅ 8/8 Moli episodes passed; 0 failures
Runtime/CDP contracts ⚪ artifact unavailable or invalid
CDP smoke ✅ 48/48 groups passed; 535 scenarios
Release regression — ⚪ artifact unavailable or invalid

Artifact unavailable or invalid. See the source CI run for infrastructure details.

Frontend differential — ⚪ artifact unavailable or invalid

Artifact unavailable or invalid. See the source CI run for infrastructure details.

Agent episodes · Moli vs Chromium — ✅ 8/8 Moli episodes passed; 0 failures
Fast contract Episodes Passed Assertions Ready p50 Episode p50
Moli 8 8 47/47 3.62 ms 31.77 ms
Chromium 8 8 47/47 284.26 ms 119.18 ms
Operation p50 Chromium Moli Delta Delta %
navigate 42.88 ms 7.32 ms −35.56 ms −82.93%
observe 1.81 ms 1.13 ms −0.68 ms −37.59%
fill 4.79 ms 4.52 ms −0.27 ms −5.65%
click 5.25 ms 4.62 ms −0.63 ms −12.04%
Idle-resource episode Peak RSS Peak PSS Average CPU Peak CPU Peak processes Sampler
Moli 64.07 MiB 62.25 MiB 0.76% 11.99% 1 ✅
Chromium 1268.92 MiB 411.68 MiB 2.57% 76.01% 13 ⚠️ PSS partial
Runtime and CDP session contracts — ⚪ artifact unavailable or invalid

Artifact unavailable or invalid. See the source CI run for infrastructure details.

CDP smoke — ✅ 48/48 groups passed; 535 scenarios

Workers: 4 · cumulative group time: 148.76 s · failed groups: 0

Slowest group Scenarios Duration Status
target-lifecycle 24 16.57 s ✅
multi-page 45 11.21 s ✅
chromium-cdp 56 11.08 s ✅
dom-input 27 10.77 s ✅
layout-screenshot 5 7.55 s ✅

All artifact fields are parsed by the trusted default-branch renderer; missing or invalid inputs remain visible as unavailable.

@lanyue-llk
lanyue-llk force-pushed the codex/pr640-reliability-final branch from 2e9c285 to 746e376 Compare September 22, 2026 09:49
@lanyue-llk
lanyue-llk force-pushed the codex/pr640-text-final branch from ca2a8d3 to c6d78ae Compare September 22, 2026 09:59
@lanyue-llk
lanyue-llk force-pushed the codex/pr640-text-final branch from c6d78ae to 4a2cf23 Compare September 22, 2026 11:48
@lanyue-llk
lanyue-llk changed the base branch from codex/pr640-reliability-final to main September 22, 2026 11:48
@lanyue-llk
lanyue-llk merged commit cba7902 into main Sep 22, 2026
4 of 9 checks passed
ldm0 pushed a commit that referenced this pull request Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant