Skip to content

fix(plugin): 允许同步任务返回异构结果 - #420

Closed
kachofugetsu09 wants to merge 1 commit into
codex/plugin-observe-status-combinationfrom
codex/plugin-parallel-sync-typing
Closed

fix(plugin): 允许同步任务返回异构结果#420
kachofugetsu09 wants to merge 1 commit into
codex/plugin-observe-status-combinationfrom
codex/plugin-parallel-sync-typing

Conversation

@kachofugetsu09

Copy link
Copy Markdown
Owner

依赖:#419

问题与结果

  • 解决的问题:ExecutorService.parallel_sync() 运行时支持异构返回值,但 SyncTask 的不变泛型让合法的 SyncTask[str] + SyncTask[None] 组合无法通过测试类型检查。
  • 用户可见结果:同步并发四象限能力的类型合同与既有运行行为一致;结果仍按输入顺序返回。
  • 本 PR 不处理:不改变线程池、取消、错误聚合、generation 生命周期或插件迁移行为。

Change intent

  • change_type:fix
  • semantic_delta:none
  • capability_owner:core
  • consumer_scope:Plugin API v3 ExecutorService 调用方
  • runtime_patch:none
  • runtime_patch_reason:仅把产出型泛型声明为协变,运行字节码路径不变
  • authoritative_state_owner:Core owns executor typing and lifecycle;插件拥有纯同步 task
  • client_only_alternative:不适用
  • 关联不变量:结果顺序、错误聚合、取消排空、worker 不得取得 Context/Fiber
  • protected_state:正式 workspace、plugin-data、线程池行为、事件顺序和晋升语义
  • 允许的副作用:测试与临时 Gate 容器
  • 禁止的副作用:持久状态写入、插件安装/晋升、外部消息/API

改动范围

  • 主要文件:agent/plugin_composition/executor.py,仅一行 TypeVar(..., covariant=True)
  • 配置或迁移影响:无
  • 已知 schema lineage 与最终 schema identity:不适用
  • 协议 source、runtime、provider 与 scenario 的不可变 revision:Core 34eb644b14de394e641f986aa15556ede5f1ef05
  • 回滚方式:revert 本 PR,或回到 backup/plugin-parallel-sync-typing-before-20260815

验证

  • tests/test_plugin_composition_executor.py:7 passed。
  • 修改范围 basedpyright:0 errors / 0 warnings。
  • 全量 tests pyright:0 errors / 0 warnings。
  • python docker/debug/gate.py run --base 8e7b160a5aaf164707c836035f2112a21972a9cd:23 checks passed,cleanup 0 failures。
  • sourceDigestadcf8ff4a50e5f45e0bfc6e45926e2aca086412ae05fcfb00acc97c4e4f0aa07
  • planDigestcc438b74ea39b5b8659fb2666b673df0d116ad9f761ee968ddc0109120d31f1a
  • 真实设备证据:不适用。
  • 未运行项与原因:无。

工作手册

  • 已核对 projectneed.md、插件事件 executor 合同和 NOW.md
  • 本次没有长期运行语义变化。
  • 跨仓与客户端 owner 核对不适用。
  • NOW 当前没有对应可删除事项。

@kachofugetsu09

Copy link
Copy Markdown
Owner Author

已由 pure-v3 总迁移 PR #462 及其后续收口提交完整吸收;关闭旧 stacked 审计入口,保留 main 作为唯一事实。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant