Repository navigation
Read synthetic delegation Host input as UTF-8 - #8365
2 commits merged into
Conversation
Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com> Co-authored-by: TRAE CLI <traecli@bytedance.com>
Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com> Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com> Co-authored-by: TRAE CLI <traecli@bytedance.com>
|
This pull request has merge conflicts with Choose the remote for the base repository, not an out-of-date fork. git fetch upstream
git rebase upstream/main
# Resolve each conflict, git add the resolved files, then git rebase --continue.
git push --force-with-lease origin HEADFor a same-repository clone whose Keep the DCO |
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent | gpt-6.1-sol | OpenAI | runtime_reported | reasoning_effort=max
APPROVE。已验证合成 Host 的两条恢复路径,整合时仍需处理双语 RFC 冲突。
精确 head 107c4fa
动机 / Motivation
维护原任务恢复的开发者,需要让测试 Host 先正确读到请求,再验证无效产物能否在原轮次重验。父进程通过管道发 UTF-8 JSON。若测试 Host 用 CP1252 读取,Unicode 内容会在验证前出错。显式设定 UTF-8 后,同一请求可到达产物验证。File 和 SQLite 均验证了失败分类、修复产物后接受原轮次结果,以及 Host 只执行一次。本切片覆盖合成 Host 和本地恢复验证。完整 V4、原生 Windows、拆分安装与成本仍待独立验收。目标 main 的两份 RFC 发生冲突,需保留两边的证据条目后重新验证新提交。
改动思路 / Approach
真实 generic Host 管道已明确发送 UTF-8。修复落在现有测试脚本中,避免改动生产解码和失败分类。回归先把合成子进程切成 CP1252,再送入原来的 UTF-8 请求和有意无效的产物。恢复沿用既有 validator 和缓存结果入口。
具体改动 / Changes
完整差异只有双语 RFC 与既有测试。测试 Host 在 json.load 前配置 stdin 编码。File、SQLite 用例分别断言拒绝中有 revalidate_cached_result,修复原产物后接受结果,轮次标识和 Host 调用次数不变。两份 RFC 保留原 Windows 和 Frontstage 失败,也明确了作者 source/wheel 证据的范围。
关键内容讲解
-
合成 Host 在读取 JSON 前设置 UTF-8。父进程原有的 UTF-8 编码和真实子进程边界保留。 合成 Host L43
-
双 provider 回归先制造可识别的失败,再走缓存重验。把旧 Host 字符串换回同一套测试时,两个用例均在缺少 task_failure 的断言处失败。 双 provider 回归 L104
规格映射 V4 的完整验收 deferred,Fixture-UTF8 implemented。。依据不可变版本 4e949f4。 docs/architecture/rfcs/monorepo-distribution-split-v0.md
对主干的风险 / Risks
本地 CPython 3.11.17 两套完整回归 81 passed。仅置换不可变 base 的合成 Host 时,两条新用例按预期失败。候选的测试覆盖了真正的进程传输和 File/SQLite 状态,测试没有代填 validator 结果。原生 premerge 通过。Lark 模块上限的继承 advisory 在相同 base/head 输出一致,原阈值保持。
实际合并基线为 4e949f4。对本次获取的目标 main 做 Git 三方检验,两份 RFC 均有内容冲突,测试文件无冲突。原生 Windows 和独立 wheel 资格仍属于各自验证范围。
我的整体评价 / Verdict
这个切片可独立恢复合成 Host 的测试覆盖。#8360 当前也携带相同的 Host 修复和测试,整合时应只保留一份。#8360 还包含独立的加载与浏览器中断变更。双语文档冲突属于整合门。 关联提案 #8360 长程影响判为 improved,恢复验证能覆盖原用例。用户体验不适用,既有 CLI 与页面未改。变更限于测试和证据,无页面展示改动。未验证原生 Windows、安装采用及长期成本。
English verdict: APPROVE — 107c4fa. The synthetic Host keeps UTF-8 task recovery reachable.
Goal And Delivered Outcome
The synthetic delegation Host inherits a locale decoder on Windows CPython 3.11 even though its existing parent transport sends UTF-8 JSON. Unicode input can therefore fail the Host before the independent artifact validator runs, leaving the original-task recovery cases without
task_failure.Configure only the fixture Host's stdin as UTF-8. A File/SQLite regression simulates CP1252 in that child, rejects an invalid artifact, repairs it and revalidates the cached result with the original turn key and exactly one Host invocation. Related to #8360; target
main, author baseline4e949f405528fd8087f0623526c62f890c1ce982.Author Declaration
docs/architecture/rfcs/monorepo-distribution-split-v0.md§9 V4 and the existing generic Host transport / original-task revalidation contracts at the author baseline.tests/test_local_delegation.py::HOSTtests/test_delegation_task_revalidation.pyScope And Continuation
Complete fixture correction with a durable regression and paired qualification record. The parent minimal-kernel program stays open for complete provider-first transaction, PostgreSQL host/wheel, complete costs and adoption acceptance. Retain I3 for at least one minor release and all historical/frozen failures. #8360 retains its own exact-head review/CI gates. Native Windows verification of this new head remains pending; the prior failed run is retained. This proposal does not merge or upgrade an installed Host.
Validation
a4ce613585fdb329ba3600f0ede768864214ed84; final paired-doc head:107c4fab80406a96bb0f6ccfd62b47230034d2fc.tests/test_local_delegation.pyplustests/test_delegation_task_revalidation.py, CPython 3.13.5 / Node 22.22.3, 81 cases pass using temporary File/SQLite stores and synthetic subprocess Hosts.loopx checkstill fails on unrelated registered-Goal authority errors; private diagnostic contents are excluded.loopx canary premerge --from-git-diff --git-diff-base origin/main: all five direct and 11 selected checks complete, zero blocking failures. The unchanged module-metric ceiling finding inloopx/extensions/lark/private_conversations.pyis reported as an inherited advisory. The first attempt failed because this new worktree lacked TypeScript dev dependencies;npm ci --ignore-scriptsprepared them, and the unchanged-head rerun passes. No gate was relaxed.The changed fixture is exercised through the real generic Host subprocess transport and real temporary File/SQLite providers. No model or real-agent execution, PostgreSQL host/wheel qualification, performance campaign, split installation or installed adoption is claimed. Existing recovery and failure classification remain intact.
Frontend / Visual Evidence
UI impact: none. No UI or documentation chrome changes; screenshots and preview are not applicable.
LoopX Area
Shared-authority RFC fixture impact
N/A: no TypeScript migration or shared-authority production change.
Boundary Checklist