Repository navigation
fix(apps): run native CANNBot queries in UTF-8 mode - #708
Conversation
Agent-assisted-by: Codex (author) Signed-off-by: Dong1017 <[email protected]>
david6666666
left a comment
There was a problem hiding this comment.
Dot, acting for @david6666666 under delegated PR review.
PR review verdict — PASS on the encoding fix; non-voting draft feedback, 76/100.
Revision, verification and score
Reviewed base 7e2c4ab6fdab68da10b13e1a03d21dd6f8fd6c22 and head 72c5d9b136c0f152dca9762935cbfd1b11f12a0b. Both changed files and the worker's capture and strict decode path were checked. A local synthetic replay of the pinned workers reproduced base rejection and head success in a non-UTF-8 context; under LC_ALL=C, the base also passed because the isolated interpreter automatically entered UTF-8 mode. This was not a rerun of the official Windows index. The current head's full and installed-package checks passed.
Scope 3/3 (#707), correctness 3/3 (explicit UTF-8, existing isolation and capture retained), validation 2/3 (fixture depends on the interpreter's default mode), claim evidence N/A (bugfix only; no model/campaign claim), simplicity 0/3 (the new explanatory source comment triggers the repository's scoring rule). Highest-priority follow-up: make the regression detect removal of the explicit UTF-8 flag regardless of host locale, and move the explanatory comment to docs if it is needed.
zengchuang-hw
left a comment
There was a problem hiding this comment.
PASS
dot, acting for zengchuang-hw.
首审:base 7e2c4ab6fdab68da10b13e1a03d21dd6f8fd6c22 → head 72c5d9b136c0f152dca9762935cbfd1b11f12a0b。本提交满足 #707 编码修复范围:在 native worker 启动同一 Python 时保留 -I -B,增加 -X utf8,未削弱严格 JSON 解析、输出上限或超时。新增回归从正常 search 入口读取非 ASCII 标题。
验证和边界
独立运行:提取 base 与 head 的原始 _run / _strict,用真实隔离 Python 子进程和临时合成中文 JSON 对照。base 在 GBK 输出时拒绝;head 保持隔离和禁用字节码,正确返回中文标题。测试以标准库 subprocess 替代管道采集,未跑全套或在本机复跑 Windows/官方索引。另核对 同一 Windows 索引与 75 秒预算的作者记录:旧提交拒绝,新提交返回 5 条外部命中,首条 pin 回读校验一致。这不是默认 8 秒下的性能证明。
Agent-assisted-by: Codex (author) Signed-off-by: Dong1017 <[email protected]>
david6666666
left a comment
There was a problem hiding this comment.
LGTM
Dot, acting for @david6666666 (repository admin) under delegated independent InferRSI PR review and approval.
PR review verdict — PASS. Advisory score: 100/100.
Revision, evidence and score
Reviewed base 7e2c4ab6fdab68da10b13e1a03d21dd6f8fd6c22 and head 3e006052b47acfe487a1615d836c5e73139c421a against #707. The two-file diff retains interpreter isolation and strict JSON decoding, expressly sets the child UTF-8 option, and checks both the real child argument pair and the returned Chinese title. My local isolated worker replay under LC_ALL=C rejected the base without the option and accepted the exact head with it. This resolves my earlier locale-dependent regression finding. Both Linux full checks and installed-package checks passed on the current head (CI). The linked Windows official-index replay is author evidence on the previous revision; I did not replay that external index, and the production worker change is unchanged from the tested revision.
Scope 3/3 (#707 boundary); correctness 3/3 (UTF-8 plus isolation and unchanged strict decode); validation 3/3 (current-head CI and independent local control); claim evidence N/A (no model or campaign claim); simplicity 3/3 (single focused flag and regression; earlier explanatory code comment removed). No blocking follow-up. This review does not accept or close #707.
amy-why-3459
left a comment
There was a problem hiding this comment.
LGTM
Dot, acting for @amy-why-3459.
Reviewed both files at 3e006052 against 7e2c4ab6 and the #707 encoding scope. The child explicitly enables UTF-8 while keeping -I -B, the existing capture limit and timeout, and the strict JSON decode. The synthetic search test checks the actual interpreter options and the returned Chinese title, so a host that defaults to UTF-8 cannot mask removal of the explicit flag. sys.orig_argv is within the supported Python range. All eight Ready jobs and the knowledge-policy check are green for this head.
I did not rerun the Windows official index; the linked 75-second paired run is author evidence from the preceding revision, with the same production worker change. It is not evidence about the default timeout.
|
回应这条 PTAL:我已在 |
Governing Issue and delivery slice
Refs #707
Anchors touched: none
Dong1017 delegated a Windows encoding fix for the native CANNBot adapter in #707.
Knowledge authorship declaration
Changed artifacts and evidence
The native CANNBot Python subprocess now starts with
-X utf8. Isolated mode ignores the parent'sPYTHONUTF8, and InferRSI validates the resulting JSON as UTF-8. The regression test checks the real child interpreter arguments for explicit-X utf8, verifies isolated UTF-8 mode, and reads a synthetic Chinese title through the project search entry point.On Windows with CPython 3.12.14, the base
7e2c4ab6used GBK for the native pipe and rejected the official index'sCeilDivisionoutput as malformed JSON. The same CANNBot source revision9a779e8c9fc2289dc5c089e791efd8d88bb4a7a6, v3 index,ascend/a2, hit cap of 5 and 75-second budget returned 5 external hits on72c5d9b1. An independent Codex CLI agent followed the first hit's pinnedopenand the local reader verified 2,197 bytes, the revision and the card SHA-256. The agent received the read receipt and the source text stayed local. Agent call trace and paired replay in #388Checks and dependencies
ruff check src tests toolspassed on3e006052.3e006052had 45 passed and 7 skipped. Five acceptance skips require an approved upstream checkout. The official-index replay above used a temporary project grant.-X utf8made the updated regression fail. A control launch using-X utf8=1enabled UTF-8 and passed the original test. The updated regression failed because the required-X utf8argument pair was absent. Review thread3e006052, Windowspytest -xstopped after 288 passed and 6 skipped attest_all_actual_revision_bytes_retained_before_checks, which compares CRLF fixture bytes to LF. The named test failed with the same assertion on base7e2c4ab6.72c5d9b1. GitHub's Windows and macOS host compatibility jobs passed. CI runRemaining work and Issue closure
Ready for independent review. Dong1017 owns acceptance of #707.