Skip to content

refactor: 将 benchmark execution-convergence 策略移出正式运行时 #126

Closed

Description

@tt-a1i

背景

extensions/execution-convergence/ 同时承载两类职责:

  1. 普通 OpenPI 运行时需要的 workspace 删除保护;
  2. 仅由 benchmark 环境变量启用的模型提示、失败轨迹干预、active evidence 与 timeout 策略。

后者在普通安装路径中不可达,却随 npm 包一起发布并持续增加生产代码、测试与理解成本。当前审计中,OPENPI_BENCHMARK_AGENT_ROOT 和 OPENPI_BENCHMARK_EXECUTION_CONVERGENCE_PROFILE 在 tracked benchmark 文档及现存本地 harness 中没有发现消费者。

目标边界

OpenPI 正式运行时只保留可执行的安全不变量:workspace 删除保护。Benchmark 策略应由 benchmark harness 自己拥有,不进入普通用户的扩展生命周期。

建议范围

  • 保留并重新归属 workspace-provenance.ts。
  • 将 extension 收敛/改名为单一 workspace cleanup guard。
  • 从发布包删除 benchmark profile、model hint、trajectory recovery、active evidence 和 benchmark timeout 分支。
  • 如仍需复现实验,将旧策略迁移到 ignored benchmark harness 或明确的研究归档。
  • 更新对应测试和说明,避免把实验环境变量重新引入生产入口。

不做什么

  • 不削弱删除确认、路径 provenance、Trust 或 child authority。
  • 不把 benchmark 策略改造成新的通用 orchestration framework。
  • 不改变正常 Pi/Subagent/Workflow 的模型判断过程。

验收标准

  • 未设置 benchmark 环境变量时的 workspace 删除保护行为保持不变。
  • 发布的 production extension 不再包含 benchmark-only execution policy。
  • 若保留实验复现能力,其入口、固定版本和运行方式由 benchmark harness 明确记录。
  • 删除保护有独立的成功、拒绝、取消和异常回归测试。
  • bun run check、bun run test 通过。

Activity

  1. added
    enhancement
    on Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions