Skip to content

v1.1.2 — Packaging fix: roles/ now ship in the wheel

Latest

Choose a tag to compare

@Protocol-zero-0 Protocol-zero-0 released this 26 May 10:09
· 5 commits to main since this release
5dfef32

Released: 2026-05-26 · hours after v1.1.1 · pip install -U evolution-kernel

TL;DR: v1.1.0 and v1.1.1 wheels shipped the runtime but not the reference role scripts — pip install evolution-kernel users had nowhere to point roles.executor at. This release fixes the packaging and adds a bundled: prefix so the same config works for pip install and git clone setups.

The bug

The wheel only contained evolution_kernel/ and evolution_kernel/templates/. The reference roles (planner.py, executor.sh, evaluator.py, goal_evaluator.py, strategist.py) lived at the repo top level, outside the package, so setuptools never bundled them. The README's ["python3", "roles/planner.py"] only resolved for users whose CWD was a fresh git-clone of the repo. Discovered while smoke-testing the v1.1.1 ship — fixed before sundown.

The fix

  1. Move roles/* → evolution_kernel/roles/* so setuptools ships them as package_data.
  2. Add a bundled:<name> prefix that the kernel resolves to the absolute path inside the installed wheel via importlib.resources. Same evolution.yml now works for both pip install users and developers running from a checkout.
  3. Update all 5 evolution-kernel init templates + examples/evolution.yml + both READMEs to use bundled: form. evolution-kernel init now writes configs that work out of the box on a pip-installed box.
roles:
  planner:   ["python3", "bundled:planner.py"]
  executor:  ["bash",    "bundled:executor.sh"]
  evaluator: ["python3", "bundled:evaluator.py"]

→ 30-second smoke test:

pip install -U evolution-kernel
evolution-kernel init     # 3 questions, drops a working evolution.yml

Backward compatibility

bundled: is opt-in. Plain argv (["python3", "myplanner.py"]) still passes through unchanged. Existing configs that hardcoded roles/X at the repo top level need updating to bundled:X — re-run evolution-kernel init for a fresh config, or do a single search-and-replace.

Verification

  • 108 tests pass (102 prior + 6 new bundled-role tests covering happy path, no-op for plain argv, path-separator rejection, missing-file errors, and end-to-end through load_config)
  • Wheel now contains all 5 role scripts under evolution_kernel/roles/
  • Fresh-venv pip install + bundled: resolution returns real site-packages paths for all 5 roles

Links


中文摘要

发版: 2026-05-26 · 距 v1.1.1 几个小时 · pip install -U evolution-kernel

一句话: v1.1.0 / v1.1.1 的 wheel 只带了 runtime,没带 5 个参考 role 脚本——pip install evolution-kernel 用户没有可以指向 roles.executor 的文件。这一版修了封装、加了 bundled: 前缀,让同一份 evolution.yml 在 pip 装和 git clone 两种环境下都直接能跑。

Bug 在哪

之前 wheel 只装了 evolution_kernel/ 包 + templates/*.yml,5 个参考 role 脚本(`planner.py` / `executor.sh` / `evaluator.py` / `goal_evaluator.py` / `strategist.py`)住在仓库顶层,不在包里,setuptools 没打进去。README 写的 `["python3", "roles/planner.py"]` 只在 cwd 是 git-clone 仓库根的用户身上能跑。这个问题是 v1.1.1 发版做 smoke test 时发现的,当天就修完。

怎么修

  1. 移动 `roles/` → `evolution_kernel/roles/`,让 setuptools 当 `package_data` 发出去
  2. 加 `bundled:` 前缀,kernel 用 `importlib.resources` 解析成 wheel 里的绝对路径;同一份 `evolution.yml`,pip 装和 git clone 都直接跑
  3. 更新 5 个 init 模板 + `examples/evolution.yml` + 中英 README,全部用 `bundled:` 写法。`evolution-kernel init` 写出来的 config 在 pip 装机器上开箱即用
roles:
  planner:   ["python3", "bundled:planner.py"]
  executor:  ["bash",    "bundled:executor.sh"]
  evaluator: ["python3", "bundled:evaluator.py"]

→ 30 秒 smoke test:

pip install -U evolution-kernel
evolution-kernel init     # 3 个问题,落一份能跑的 evolution.yml

兼容性

`bundled:` 是 opt-in。普通 argv(如 `["python3", "myplanner.py"]`)原样透传。已有 config 写死 `roles/X`(顶层路径)需要改成 `bundled:X`——重跑 `evolution-kernel init` 或一次性 search-and-replace 即可。

验证

  • 108 测试通过(102 历史 + 6 新增 bundled-role 测试,覆盖 happy path / 普通 argv 透传 / 路径分隔符拒绝 / 缺文件报错 / 端到端走 `load_config`)
  • Wheel 里现在含 5 个 role 脚本(位于 `evolution_kernel/roles/`)
  • 干净 venv `pip install` + `bundled:` resolution 对 5 个 role 都返回 site-packages 真实路径