host
da8d0c29fd
round-12: fix integration fallout (P9 gate x P1, P7 check x P2/P4 fixtures)
...
- P1 resident tests: P9's inference gate is a precondition of
_run_with_vm, so _RealExecCase.make_executor now configures a
default inference origin (CHV_INFERENCE_ORIGIN=https://xgapi.lol
+ CHV_INFERENCE_ALLOW_HOSTS=xgapi.lol) and a public fake resolver
(same setup as P9's GateTest). No assertion changed; the gate's
fail-closed behavior on missing origin stays pinned by P9's own
ask test. 9 resident tests fixed (7 errors + 2 failures).
- P2/P4 dry-run fixtures: P7's build.sh hard check requires
chv-memory.py in the repo; add it to both fixtures' copy lists.
2 failures fixed.
- No production code changed in this commit (test setup only).
2026-11-07 00:43:50 +00:00
host
c24cc0ba92
merge(chv-muse-round12): 合入 P4 浏览器完全对齐 ( 1c8fc3f)
...
冲突按并集解:build.sh 保留 P3 authd 检查/拷入/runcmd(含
start chv-authd)+ P4 三件套检查/拷入(P4 的重复 runcmd 行
删掉——同一文件写两次会盖掉 authd 启动行)+ P4 的
cdp-broker.service/tmpfiles(含 ask-queue)+ P3 叶子模块条件
拷入;buildinfo.py 两边内容项并集;chv-browser.py 取 P4 重构
版(broker 客户端);production-readiness.md P4 的 §15 顺延为
§16。P2 的 BrowserTest 改走假 CDP broker(断言不变),两路
干跑夹具补齐并集文件集。
2026-11-07 00:01:35 +00:00
host
1c8fc3f7c8
对齐 Muse P4:浏览器完全对齐(CDP broker 单元外 + a11y-tree-only + 确定性分类器)
...
- chv-guest/chv-cdp-broker.py(新):单元外 CDP broker,用户 chv-browser,
独家 chromium.launch(headless=True, args=LAUNCH_ARGS);启动参数白名单
无 --remote-debugging-port、无 devtools;导航前 URL 校验 + 拦截名单;
快照恒带 untrusted_input 与 injection_flags;高风险表单在页时 open
即 ask 入队;观测到导航 POST 自动暂停;命中拦截规则的下载取消 + 暂停
+ ask;全部回包与错误经 sanitize_error + response_leaks 检查。
- chv-guest/chv-browser.py(P2 版重构):改为 broker 客户端,不再直连
Playwright(本文件无 playwright import),保留 URL 校验 + 快照截断
作为第二层防线;暂停状态与 broker 同步。
- chv-guest/chv_browser_guard.py(新):纯 stdlib 共享规则——validate_url、
拦截名单加载/匹配、快照截断、错误消毒(去 HTML、截断 200 字符、凭据形
key=value 与 sk- 形 token 打码)、注入启发式(中英文各 6 条)、表单风险
扫描、下载扫描(可执行扩展名)、文件型 ask 队列(pending/allowed/denied,
与 P3 ApprovalQueue 同语义)、启动参数与回包泄露检查、脚本注入面
禁止清单(FORBIDDEN_PAGE_ATTRS/FORBIDDEN_OPS)。
- chv-guest/browser-blocklist.txt(新):静态拦截名单;首版只有 RFC 2606
.test 自测条目,生产条目由运维构建时填入,无在线更新。
- chv-guest/build.sh/buildinfo.py:P2 三脚本 + P4 三文件纳入镜像与
buildinfo;新增 chv-cdp-broker.service 与 /run/chv/ask-queue tmpfiles。
- docs/chv-muse-p4-gap.md(新):现状 vs Muse 官方要求差距表、改动、
诚实边界、P2 合入约定、真机待验证清单(round 12)。
- docs/chv-production-readiness.md:补 §15(P4 一节;编号合入时若与
P2 的 §15 撞,顺延)。
- cloud/tests/test_chv_muse_p4.py(新,36 项):guard 单元、AST 钉住
禁止属性、假 Playwright broker 测试、假 broker agent 测试、真 Unix
socket 联调、buildinfo/build 干跑断言;含否定测试(evaluate 被拒、
DOM 外泄被拒、DevTools 不可达、私有地址被拒、高风险表单被拦、
注入文本被标注)。
测试:P4 新测试 36/36;全量 cloud 套件 1903 项,两次连续全过
(skipped=8)。附记:第一次全量跑出 1 个失败但输出未保留、后两次
均未复现,疑为时序抖动,未追认。
真机验证未做:排队等 round-11/第三棒释放 100.65.51.33,清单见 gap
表 §5。本地提交,未推未合未部署。
2026-11-06 22:36:56 +00:00