Skip to content

v0.57.3 — pipeline 命令修复与静默失败清理

Choose a tag to compare

@lza6 lza6 released this 17 Oct 22:59
· 150 commits to main since this release

概述

v0.57.2 发布后继续处理审查报告里的补充项。最要紧的一条:clawd pipeline 也是“注册成功但运行即崩”。

clawd pipeline 三处错位,运行即 TypeError

PipelineConfig(use_team=..., use_ralph=..., budget=...)   # 三个参数都不存在
PipelineOrchestrator(Path.cwd(), config)                  # 参数顺序反了
await orchestrator.execute(goal)                          # 方法不存在

重写为真实 API:

stages = [create_ralplan_stage(), create_team_exec_stage(), create_ralph_verify_stage()]
config = create_autopilot_pipeline_config(task=goal, stages=stages, cwd=cwd)
result = await PipelineOrchestrator(config, cwd=cwd).run()

--budget 在编排器上未实现,命令明确提示不生效(而不是静默忽略)。
新增 wiring 测试,断言命令体不抛错且确实把 goal 交给编排器。

锁文件损坏不再静默覆盖

LockStore.acquire() 解析失败时 except Exception: pass,随后直接覆盖写 ——
两个 owner 可能同时认为自己持锁,正是锁要防的事。
现改为 logger.error + 将损坏文件隔离为 *.corrupt-<ts> 再重建(可见且不 deadlock)。
release() 失败也不再静默吞掉。

其他

  • HookPluginDispatchResult.duration_ms 声明两次(后者把必填字段静默改成可选)→ 去重
  • sanitize_plugin_id() 用 str.replace(r"...") 做“正则清洗”,实为字面量替换,
    完全不生效 → 改为 re.sub。实测 My Plugin!@#.py → my-plugin
  • memory_server.search() 读到损坏 JSON 静默跳过 → 增加带路径的 logger.warning

验证

pytest tests/ -q                     → 3051 passed / 0 failed
pytest tests/cli tests/workflow tests/core -q → 1081 passed
ruff --select F821,F811              → All checks passed
python -m src pipeline --help        → 正常
python -m src catalog list / reload  → 正常

仍未闭合

覆盖率 ~20% · 死模块 135 · 静默吞异常 101 · CLI 启动剩余 ~20s · 验证阶段仍是桩。

🤖 Generated with Claude Code