Skip to content

LoopX v0.4.5

Choose a tag to compare

@huangruiteng huangruiteng released this 12 Aug 16:26
· 1648 commits to main since this release
8087798

LoopX v0.4.5

LoopX v0.4.5 is a security-hardening and control-plane release. It fixes five
privately reported security advisories (four fix PRs), adds caller-approved
completion validation, ships a durable-smoke review gate, and continues the
replan/evidence/settlement hardening with community contributions across 16
contributors.

Release Decision

Who should upgrade: All stable-channel users, especially operators who run
serve-status, the visible multi-agent launcher, or automation that calls
refresh-state --state-file. These surfaces receive security hardening.

What this release solves: Unauthenticated CORS reads and a goal_id path
traversal in serve-status, shell command injection in the visible launcher,
and arbitrary file writes through refresh-state --state-file are fixed.
todo complete can now run a caller-approved validation command before any
durable writeback or quota spend.

Breaking changes: Yes. The launcher now rejects worker commands containing
shell metacharacters, refresh-state --state-file overrides outside the project
root fail closed, serve-status no longer sends Access-Control-Allow-Origin: * to foreign origins, and reward/configure-goal routes reject unsafe goal ids.
No persisted state migration is required.

How to verify: Run the identity, doctor, canary, and focused security suites below.

loopx --version
loopx doctor
loopx canary premerge --from-git-diff
python3 -m pytest -q tests/test_status_server_cors.py tests/test_feedback_goal_id_validation.py tests/test_worker_command_validation.py tests/test_state_file_containment.py tests/control_plane/test_todo_completion_validation.py

Contributors: @wchwawa, @Ray0907, @liubf21, @maxliux5, @steven-kid,
@cocolord, @rootkiller6788, @joseedson18jc, @luantaraschi,
@rajashekarpatha07, @wangmian0, @NIU-123370, @Jarad-z, @YxmMyth,
@lincoo2019, @xiaods.

Security

What's New

  • Caller-approved completion validation (#3142): todo add may declare a
    validation_command; todo complete runs it before durable writeback and
    blocks quota spend when it fails, with a typed receipt.
  • PR review quality gate (#3134): example/walkthrough/smoke-only PRs now
    require durable_smoke_value evidence; low-value same-shape batches are
    rejected with an explicit contribution-restriction warning.
  • Control plane & state kernel: evidence-log read enforcement with failure
    receipts (#3135), replan novelty and evidence-log policy (#3100/#3101/#3105),
    replan watch-ACK causality (#3037/#3038/#3053), task-lease settlement
    (#3028/#3040), goal artifact lifecycle projection RFC (#3136).
  • New surfaces: global manager todos/risks (#3043/#3075), chat ACP
    endpoints and dashboard (#3052/#3073), Lark inbox reaction lifecycle
    (#3055/#3072), React homepage rebuild (#3098).

Community Contributors

Optional Capability Activation & Use

validation-command

Activation: Declare a caller-approved command when adding a todo:

loopx todo add --goal-id example-goal --text "task" --validation-command "pytest -q tests/test_x.py"

Validation: loopx todo complete --goal-id example-goal --todo-id todo_xxx runs the command before writeback; a failing command returns ok=false with a typed validation receipt and blocks quota spend.

Disable / rollback: Omit --validation-command to keep the unchanged fast path; remove the field by re-adding the todo.

Authority boundary: The command runs in the goal repository workspace with the invoking user's privileges, without shell expansion, and captures no stdout/stderr or local paths.

Docs: https://github.com/huangruiteng/loopx/blob/v0.4.5/loopx/control_plane/runtime/validation_command.py

pr-review-durable-smoke-value-gate

Activation: Automatic for example/walkthrough/smoke-only PRs; reviewers must fill durable_smoke_value evidence before approval.

Validation:

python3 -m pytest -q tests/capabilities/test_pr_review_contract.py

Disable / rollback: Not user-configurable; the gate lives in the pull-request-review capability contract.

Authority boundary: The gate grants no merge authority; it only requires real, durable value evidence before approval.

Docs: https://github.com/huangruiteng/loopx/blob/v0.4.5/skills/loopx-pr-review/SKILL.md

serve-status-cors-read-protection

Activation: Automatic when loopx serve-status runs.

Validation:

python3 -m pytest -q tests/test_status_server_cors.py

Disable / rollback: No flag; read responses no longer send Access-Control-Allow-Origin: * to foreign origins. Downgrade to v0.4.4 if a non-loopback origin flow depended on the wildcard.

Authority boundary: Loopback browser origins are still allowed to read responses; write endpoints keep their existing origin checks.

Docs: https://github.com/huangruiteng/loopx/blob/v0.4.5/loopx/status_server.py

serve-status-goal-id-validation

Activation: Automatic on reward and configure-goal routes.

Validation:

python3 -m pytest -q tests/test_feedback_goal_id_validation.py

Disable / rollback: Not configurable; invalid goal ids fail closed with HTTP 400. Downgrade to v0.4.4 to restore permissive behavior.

Authority boundary: goal_id must be a single safe path segment; no path traversal is accepted.

Docs: https://github.com/huangruiteng/loopx/blob/v0.4.5/loopx/feedback.py

launcher-worker-command-allowlist

Activation: Automatic when role specs declare worker_turn_command / worker_loop_command.

Validation:

python3 -m pytest -q tests/test_worker_command_validation.py

Disable / rollback: Commands must be a plain executable plus safe arguments; shell metacharacters are rejected. Update role specs that used shell quoting; downgrade to v0.4.4 to restore permissive parsing.

Authority boundary: The command runs through the pane worker's shell environment without shell expansion of user input.

Docs: https://github.com/huangruiteng/loopx/blob/v0.4.5/loopx/visible_multi_agent_launcher.py

refresh-state-state-file-containment

Activation: Automatic when --state-file is passed to refresh-state.

Validation:

python3 -m pytest -q tests/test_state_file_containment.py

Disable / rollback: Overrides must stay inside the project root or equal the registered state file; escapes fail closed. Downgrade to v0.4.4 to restore permissive paths.

Authority boundary: Only project-root-contained state files may be rewritten; no arbitrary file writes.

Docs: https://github.com/huangruiteng/loopx/blob/v0.4.5/loopx/state_refresh.py

中文摘要

升级决策

谁需要升级: 所有 stable 通道用户,尤其是运行 serve-status、visible multi-agent launcher 或调用 refresh-state --state-file 的自动化场景——这些面都做了安全加固。

解决了什么: 修复 serve-status 未认证 CORS 读取与 goal_id 路径穿越、launcher 的 shell 命令注入、refresh-state --state-file 任意文件写入;todo complete 支持 caller-approved 验证命令,失败则不写回、不消耗配额。

是否有破坏性变更: 有。launcher 拒绝含 shell 元字符的 worker 命令;refresh-state --state-file 越出项目根的覆盖将 fail closed;serve-status 不再对外来 Origin 返回 Access-Control-Allow-Origin: *;reward/configure-goal 路由拒绝非法 goal_id。无需持久化状态迁移。

如何验证: 运行下面的版本、doctor、canary 与聚焦安全测试套件。

loopx --version
loopx doctor
loopx canary premerge --from-git-diff
python3 -m pytest -q tests/test_status_server_cors.py tests/test_feedback_goal_id_validation.py tests/test_worker_command_validation.py tests/test_state_file_containment.py tests/control_plane/test_todo_completion_validation.py

贡献者: @wchwawa@Ray0907@liubf21@maxliux5@steven-kid@cocolord@rootkiller6788@joseedson18jc@luantaraschi@rajashekarpatha07@wangmian0@NIU-123370@Jarad-z@YxmMyth@lincoo2019@xiaods

安全

修复五份私有上报的安全公告(四个修复 PR #3137-#3140):refresh-state --state-file 路径穿越(GHSA-2225)、launcher 命令注入(GHSA-c42j)、serve-status goal_id 路径穿越(GHSA-hfmf)、serve-status CORS 读取暴露(GHSA-vx2m / GHSA-p7c9)。公告将随补丁版本更新受影响/修复范围并协调披露。

产品更新

  • Caller-approved 完成验证(#3142todo add 可声明 validation_commandtodo complete 在写回前运行并阻断失败时的配额消耗。
  • PR 评审质量门槛(#3134:示例/walkthrough/smoke 类 PR 必须证明真实持久价值,低价值同形状批量 PR 会被拒绝并给出贡献限制警告。
  • 控制面与状态内核:证据日志读取强制 + 失败回执(#3135)、replan 新颖性与证据日志策略(#3100/#3101/#3105)、watch-ACK 因果(#3037/#3038/#3053)、task-lease 结算(#3028/#3040)。
  • 新表面:global manager todos/risks(#3043/#3075)、chat ACP 与 dashboard(#3052/#3073)、Lark 收件箱反应生命周期(#3055/#3072)、React 首页重建(#3098)。

社区贡献者

可选能力启用与使用

validation-command

启用:

loopx todo add --goal-id example-goal --text "task" --validation-command "pytest -q tests/test_x.py"

验证: loopx todo complete ... 在写回前运行命令;失败返回 ok=false 与 typed validation receipt 并阻断配额消耗。

停用 / 回退: 不声明 --validation-command 即保持原快速路径;重新添加 todo 可移除该字段。

权限边界: 命令在 goal 仓库工作区以调用者权限运行,无 shell 展开,不采集 stdout/stderr 或本地路径。

文档: https://github.com/huangruiteng/loopx/blob/v0.4.5/loopx/control_plane/runtime/validation_command.py

pr-review-durable-smoke-value-gate

启用: 对示例/walkthrough/smoke 类 PR 自动生效;评审者必须先填 durable_smoke_value 证据再批准。

验证:

python3 -m pytest -q tests/capabilities/test_pr_review_contract.py

停用 / 回退: 不可配置;门槛位于 pull-request-review capability 契约中。

权限边界: 门槛不授予合并权限,只要求真实持久价值证据。

文档: https://github.com/huangruiteng/loopx/blob/v0.4.5/skills/loopx-pr-review/SKILL.md

serve-status-cors-read-protection

启用: 运行 loopx serve-status 即生效。

验证:

python3 -m pytest -q tests/test_status_server_cors.py

停用 / 回退: 无开关;外来 Origin 不再收到通配 ACAO。若依赖通配读取,回退 v0.4.4。

权限边界: loopback Origin 仍可读响应;写端点保留既有 origin 校验。

文档: https://github.com/huangruiteng/loopx/blob/v0.4.5/loopx/status_server.py

serve-status-goal-id-validation

启用: reward 与 configure-goal 路由自动生效。

验证:

python3 -m pytest -q tests/test_feedback_goal_id_validation.py

停用 / 回退: 不可配置;非法 goal_id 以 HTTP 400 fail closed;回退 v0.4.4 可恢复宽松行为。

权限边界: goal_id 必须为单一安全路径段,拒绝路径穿越。

文档: https://github.com/huangruiteng/loopx/blob/v0.4.5/loopx/feedback.py

launcher-worker-command-allowlist

启用: role spec 声明 worker_turn_command / worker_loop_command 时自动生效。

验证:

python3 -m pytest -q tests/test_worker_command_validation.py

停用 / 回退: 命令必须是可执行文件 + 安全参数;含 shell 元字符将被拒绝。需更新使用引号的 role spec;回退 v0.4.4 恢复宽松解析。

权限边界: 命令经 pane worker 的 shell 环境执行,用户输入不做 shell 展开。

文档: https://github.com/huangruiteng/loopx/blob/v0.4.5/loopx/visible_multi_agent_launcher.py

refresh-state-state-file-containment

启用:refresh-state--state-file 时自动生效。

验证:

python3 -m pytest -q tests/test_state_file_containment.py

停用 / 回退: 覆盖路径必须位于项目根内或等于注册 state file;逃逸 fail closed;回退 v0.4.4 恢复宽松路径。

权限边界: 仅允许重写项目根内的 state file,禁止任意文件写入。

文档: https://github.com/huangruiteng/loopx/blob/v0.4.5/loopx/state_refresh.py

Compatibility & Validation

  • No persisted state migration required; the security surfaces change behavior as
    documented above.
  • Focused security suites: 44 new tests across CORS, goal-id validation, worker
    command allowlist, and state-file containment; 7 completion-validation tests;
    51 todo regression tests.
  • Known baseline: test_replan_evidence_tool_behavior and
    test_actual_default_model_behavior_portfolio fail on clean main in CI
    (live-model/tool tests); tracked separately.

Update

curl -sSL https://raw.githubusercontent.com/huangruiteng/loopx/main/scripts/install-local.sh | bash
# or follow the stable update path for your platform
loopx --version  # expect v0.4.5