merge(chv-muse-round12): 合入 P6 privsep worker + 确定性安全检查层 (81e4eaf)
唯一冲突是文档 §15 撞号:P6 一节顺延为 §17,基线说明更新 (P3 已在树里,接线走真实代码)。chv-sync.sh 自动合入正确: P6 的 worker 路径与 P3 的 authd 路径(useHttpPath)都在。 P6 测试 43 项全过(skipped=1 是 root 下 uid 否定测试)。
This commit is contained in:
commit
b0b9f5ed9d
10 files changed
+2072
No files matched your search
@@ -2446,6 +2446,7 @@ class CloudHypervisorExecutor(Executor):
|
||||
ssh_cmd = self.build_ssh_command(
|
||||
task, self._guest_host_command(*inner_args, **kwargs),
|
||||
extra_env=extra_env)
|
||||
self._audit_inference_request(task, ssh_cmd)
|
||||
result = self._call_runner(ssh_cmd, timeout=self.task_timeout)
|
||||
# 方法内 import:见模块头注释的循环导入说明。
|
||||
from cloud.sandbox import SimpleNamespaceShim, _parse_host_result
|
||||
@@ -2454,8 +2455,31 @@ class CloudHypervisorExecutor(Executor):
|
||||
parsed["executor"] = "cloud-hypervisor"
|
||||
parsed["vm"] = self.vm_name(task)
|
||||
parsed["api_socket"] = self.api_socket(task)
|
||||
self._audit_inference_response(task, parsed)
|
||||
return parsed
|
||||
|
||||
def _audit_inference_request(self, task, ssh_cmd):
|
||||
"""推理边界审计(feat-chv-muse-p6,hatch-safety 的确定性
|
||||
等价):记一次进推理的请求。只记指纹,不记值;失败
|
||||
best-effort,绝不中断任务(沿用 _emit 的既定语义)。"""
|
||||
try:
|
||||
from cloud.chv.safety import audit_inference_request
|
||||
audit_inference_request(
|
||||
str(task.get("id", "")), "dispatch",
|
||||
" ".join(str(part) for part in ssh_cmd))
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
def _audit_inference_response(self, task, parsed):
|
||||
"""推理边界审计:记一次出推理的响应(附结果状态)。"""
|
||||
try:
|
||||
from cloud.chv.safety import audit_inference_response
|
||||
audit_inference_response(
|
||||
str(task.get("id", "")), "result",
|
||||
str(parsed.get("status", "")))
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
def _goal_result(self, task_id, result):
|
||||
"""客内 host.py goal 输出解析:直接委托给三执行器共享
|
||||
的 parse_goal_result(cloud/sandbox.py,Local 的
|
||||
|
||||
Reference in new issue
Block a user