Skip to content

refactor(apps): group external adapters under integrations - #526

Closed
zengchuang-hw wants to merge 2 commits into
mainfrom
codex/apps-490-integrations-refresh
Closed

zengchuang-hw wants to merge 2 commits into
mainfrom
codex/apps-490-integrations-refresh

Conversation

@zengchuang-hw

@zengchuang-hw zengchuang-hw commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

本 PR 已由按完整可读差异拆分的 Ready #528(Cannbot)和待其合入后提交的 MindIE 切片接替;关闭不表示合入或 #490 完成。详见末尾接替记录。

Governing Issue and delivery slice

Refs #490
Refs #371

将 Cannbot 和 MindIE 的具体外部适配实现归入 apps/integrations/,同步 CLI、项目授权、MCP、上下文导出与 worker 定位,保留登记的旧 Python 导入。交付 #490 已接受方案的第四步,共五步。设计接受记录。

前三步 storage #493、handoff #496、workflows #517 已合入;本 PR 基于 main 493416520f537590eb8f2a4e74f276f82e488307,head 99c23738ecb5ea35b456cc1608c7eb624f680a11。独立变更 33 个文件。下一步是组合验收;#490、#371 整体完成另行确认。

Changed artifacts and evidence

要求 实际实现与检查
具体集成有明确归属 八个实现移入 apps/integrations/{cannbot,mindie}/。除 Cannbot 的 Knowledge import 与 MindIE MCP 的 version import 各增加一级相对导入外,规范化源码与父提交原件一致
静态兼容与对象身份 原包/子模块显式导入与字面量 __all__。旧 pickle 可加载,新函数/类定义使用 canonical 路径;无动态别名
Cannbot 包绑定 旧包 project 保持旧子模块绑定,公共函数/类由 canonical 实现拥有;迁移表 module_exports 登记并测试父包先导入、子模块先导入两种顺序
活跃调用方与打包 CLI、适配器测试和安装检查切换 canonical 路径。迁移表保留原 13 项并增加 8 项,共 21 项
独立 worker 获准解释器启动器定位 canonical worker 文件;两个 worker 在未安装 InferRSI 的新环境中按 -I -B 文件入口执行。旧路径保留登记的 Python 导入兼容
导入边界 新 integrations 父包及 MindIE 初始化保持轻量;既有 Cannbot 适配器按入口加载。检查无导入时 I/O、子进程、设备探测或服务启动
文档 同步实际目录、公开导入、包绑定和 worker 启动语义;保留主线 host/serving 与已迁移模块

供完整检视的固定 head 文件(若 seed diff 截断,请继续按路径读取):

Checks and dependencies

Windows / Python 3.12。当前 head 99c23738ecb5ea35b456cc1608c7eb624f680a11 追加处理检视中的说明歧义:旧 apps/mindie/__init__.py 改称兼容包标记,与空 __all__ 一致。相对于 97b0264 仅此一个 docstring 改动;八个 canonical 实现及运行行为均未改变。当前内容重新通过全仓 Ruff、whitespace,以及迁移/导入副作用/包目录 123 项回归;新 head 的必需 CI 正在运行,未沿用旧 head 的状态。

以下 319 项、57 项及发行物检查实际针对准备提交 31c14e70b847f809b8ac25300c766447d8431b2e;#517 换基线后的 97b0264 整个 Git tree 与其相同(9b4e3d5466cbba1a02e3e8e7d4c623fa46b65fe1)。97b0264 的 Ready run 44551475431 全部通过,knowledge-model-policy 也通过。这些保留为原内容验证记录;当前 docstring 修订的结果单列。

检查 实际结果
Cannbot / MindIE、迁移登记、对象身份、依赖边界、轻量导入 319 passed、7 skipped、332 subtests passed
Codex / WorkSwarm / DSH 包与入口 57 passed;1 条现有 tarfile 弃用警告
独立 sdist → wheel → 新环境,在 checkout 外运行安装检查 通过;930 个资源与源码一致,摘要 f4fe59130727ef9f80d42ef6e416aaea10ca27b0a56b93339c72e82ae77f1879
97b0264 换基线后的 Ruff / whitespace / 源码对照 通过
当前 99c2373 全仓 Ruff / whitespace、迁移与包边界回归 通过;123 passed

7 个适配器跳过项:Windows 不适用的两项 POSIX 清理,以及五项需要获准真实 Cannbot 索引的场景。真实知识源范围保留为未验证。

原并行组曾在 20 passed 后发生 CLI find 的 12 秒超时,原结果保留;构建和其他检查全部结束后,按原时限串行复跑得到上述 319 passed。没有修改时限或断言,也未确定单一超时根因。

之前组合预检在 b67e79d1 的实际记录单独保留:输出/发布/重放/离线判定/固定读取及 delivery 组 136 passed、1 failed 后停止;其余 delivery / Dashboard / trace 节点 109 passed、2 skipped、1 deselected。失败为已登记 #494 的 Windows busy-lock,已在未修改 main 9c7b7b05 再现;后续组明确排除了该单个节点,未当作原组全通过。原始记录。这部分不是本 head 的新运行,最终组合验收在第五步汇总。

当前实现的实际验证节点
tests/test_cannbot_boundaries.py
tests/test_cannbot_channel_acceptance.py
tests/test_mindie_project.py
tests/test_mindie_context.py
tests/test_mindie_runtime.py
tests/test_apps_module_migrations.py
tests/test_contracts_package.py
tests/test_target_module_import_gate.py
tests/test_package_root_inventory.py
tests/test_first_wave_isolation_policy.py

上述一组使用 python -m pytest -o addopts= -q -x -rs --tb=short。插件组为 tests/test_codex_plugin.py、tests/test_workswarm_plugin.py::test_native_manifest_and_shared_launcher、tests/test_dsh_plugin.py。发行物从 sdist 重新构建 wheel,并在全新环境、checkout 外以 -I 执行复制出的 tests/check_installed.py。

本切片不改 CI、AGENTS 或 Knowledge 实现。host-compatibility 按 #508 为 advisory,记录实际结果;合入核对两份当前有效独立 write+ 审批及必需 CI,保持 Ready。软件回归不构成模型或服务收益证据。

Remaining work and Issue closure

本 PR 交付 integrations。第五步继续汇总标准输出、固定记录、报告、Dashboard、trace 和宿主操作的组合验收。真实外部知识源未验证项保留记录。目标接受/关闭由 #371 Apps 负责人结合接口 owner 确认,本 PR 不自动关闭 #490 或 #371。#429/#430/#434 的生产评测端口仍单独跟踪。

Signed-off-by: zengchuang <zengchuang3@huawei.com>
Agent-assisted-by: Codex (author)

Copy link
Copy Markdown
Contributor Author

@Dong1017 @david6666666 @amy-why-3459 请独立检视 #490 第四步 integrations。当前 head 97b026405a0bff152d8423b374a978931328b765,base 为已合入 workflows 的 main 493416520f537590eb8f2a4e74f276f82e488307,保持 Ready。

源码树与已验证的准备版本完全相同:319 passed、7 skipped、332 subtests,三个插件 57 passed,独立 sdist/wheel 安装检查与 930 个资源一致性通过。换基线后 Ruff、whitespace、八个实现对照再次通过。33 个独立变更文件,清单 13 → 21 项。CI 刚启动,完成后补当前检查。

请重点核对旧 Cannbot project 模块绑定、MindIE 轻量父包、两个未安装 InferRSI 环境中的 canonical worker 启动、旧导入/旧 pickle 以及项目授权边界。正文已提供固定 head 的完整测试与安装检查链接,diff 若被截断请按路径继续读取。原并行超时、真实知识源跳过和既有 #494 限制均如实保留。通过请正式 Approve,首个非空行单独为 LGTM;有意见我先处理。合入按两份当前有效独立 write+ 审批加必需 CI。

@Dong1017 Dong1017 added area:harness Harness module: profile, A/B loop, quality gates, evidence reports kind:task Bounded delivery task with a delegated slice labels Nov 19, 2026

@Dong1017 Dong1017 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR review verdict — DO NOT PASS

Reviewed base 493416520f537590eb8f2a4e74f276f82e488307 and head 97b026405a0bff152d8423b374a978931328b765 (first review of the integrations slice of #490; prior head null). pr/prior-reviews.md records no formal Approve on this head and no outstanding CHANGES_REQUESTED, so nothing is pending to clear and no independent approval is being displaced here.

The verdict is an evidence-sufficiency blocker, not a claim that the code is wrong. What I could read looks consistent with the accepted #490 design. I cannot approve a 33-file relocation slice on a partial diff.

Blocker 1 — the diff I could review is incomplete

pr/meta.json reports diffComplete: false, and the patch stops inside the tests/check_installed.py hunk (mid-token in the canonical module list). #490 records this as a 33-file slice with 21 migration entries. I could not see any hunk for:

  • the remainder of tests/check_installed.py — the tail of the canonical module list, the exact-path assertions, and the resource/inventory comparisons;
  • tests/test_apps_module_migrations.py — the test that is supposed to read the new module_exports two-level mapping and drive the identity checks;
  • tests/test_cannbot_boundaries.py / test_cannbot_channel_acceptance.py and tests/test_mindie_project.py / test_mindie_runtime.py / test_mindie_context.py — the canonical-path and grant-revocation regressions;
  • tests/test_target_module_import_gate.py and the rest of tests/_gate_policy_support.py;
  • the Codex / WorkSwarm / DSH launcher and runtime-locator references named in #490's caller table, and any packaging/resource-manifest change.

Until the whole diff is available, #490's completion criterion 2 (registered Python callers, CLI, plugin launchers and the install check each showing a verifiable migration result) is unverified on this head.

Blocker 2 — worker-launch migration is asserted in docs but not shown in evidence

The old worker files are now pure re-export shims with no __main__ handler. Launching apps/cannbot/read_worker.py or apps/mindie/read_worker.py by file path therefore exits 0 printing nothing, rather than failing loudly. docs/module-layout.md states the intended rule correctly — "Legacy worker paths retain Python import compatibility; external interpreters are launched against the canonical files" — which is the explicit statement carried forward from #490 acceptance. What is not visible is the check that no registered launcher, MCP config or usage doc still invokes the old worker path. Please point to that coverage (or to the grep result listing remaining references) in the next revision.

What I did verify by reading

  • Import-light new packages: apps/integrations/__init__.py and apps/integrations/mindie/__init__.py contain only docstrings; apps/integrations/cannbot/__init__.py binds project but calls no load_grant, spawns no subprocess and opens no checkout at import time — load_grant still runs only inside CannbotChannel.__init__.
  • Relative-import depth after the move: from ....knowledge.channels in apps/integrations/cannbot/__init__.py and from .... import __version__ in apps/integrations/mindie/mcp.py both reach inferrsi from inferrsi.apps.integrations.<pkg>.<module>; the __version__ depth matches the documented change from from ... import __version__.
  • Worker resolution: both canonical project.py files keep _WORKER = Path(__file__).with_name("read_worker.py"), so the launch target moves with the implementation, and existing grant files record only python / engine / upstream — no worker path — so grants written before this move still resolve a valid worker.
  • Shim shape: all eight old modules are literal static re-exports with a hard-coded __all__, and every __all__ matches the corresponding exports list in docs/apps-module-migrations.json. The cannbot package entry keeps project as the old shim module with no sys.modules alias, which is what module_exports claims.
  • Callers in src/: the four on-demand imports in apps/cli/__init__.py (_channels, mindie, cannbot, campaign import-mindie) all point at canonical modules, not shims.
  • Doc/code agreement on the three updated files (architecture.md, external-channels.md, module-layout.md) for the paths and the __version__ import.

Not verified here

Tests not executed by me; the 319 passed / 7 skipped / 57 plugin checks / 930 resource digests in #490 are the author's results for prepared commit 31c14e70, and CI for this head is a separate run. I also did not audit the claim that the whole Git tree equals the pre-rebase tested tree.

Non-blocking

  • apps/mindie/__init__.py says "Compatibility exports for …" while __all__ is empty; harmless, but the docstring reads as if something is re-exported.
  • The ruleset's two independent write+ approvals still need to land on this head; nothing in this review substitutes for the second one.

I'll re-read in full once the complete diff is available after the next revision.


Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).

zengchuang-hw commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor Author

@Dong1017 按本轮意见补充当前 head 97b026405a0bff152d8423b374a978931328b765 的完整材料。也请 @david6666666 @amy-why-3459 独立复审。

当前提交的 Ready CI 已全部通过。 run 44551475431:3.10/3.11 full-check、两项 installed-package、dashboard-browser、pr-references 均 success;两宿主 advisory 也 success,knowledge-model-policy 状态 success。这是当前 head 的运行,旧准备版本的报告作为补充信息。

阻塞 1:已确认 handed diff 截断,请按固定 head 继续读取以下完整文件。 本 PR 的完整 33 文件列表/差异见 base/head compare。尤其请读取上次 cutoff 之后的内容:

tests/test_cannbot_channel_acceptance.py 在本切片没有源码差异,仍属执行的验证组,链接提供完整文件。其余变更路径均在 compare 中;请不要仅凭 seed diff 的截止处判断缺失。

阻塞 2:已有直接的 launcher 定位与发行物启动回归,之前因截断未显示:

  • test_project_launchers_reference_the_canonical_standalone_worker 对 Cannbot、MindIE 两项参数都断言 project._WORKER == ROOT / "apps/integrations" / system / "read_worker.py",以及 Path(project.__file__).with_name("read_worker.py") 同值;再在新进程中对对应文件做标准库导入与 runpy 加载检查;该单测节点本身不是独立 venv。
  • check_installed.py 的两个 adapter launch probe 分别断言 installed project._WORKER == Path(adapter.__path__[0]) / "read_worker.py",再经真实项目函数发出 python -I -B <worker>。两种合成的不可用后端均得到 worker 的既定错误结果,因而不能由退出 0 / 无输出的旧 shim 冒充。
  • 已在 src tests tools plugins docs 扫描完整旧 worker 文件路径和旧 worker 模块名,匹配结果只有:
docs/apps-module-migrations.json:368  "old": "inferrsi.apps.cannbot.read_worker"
docs/apps-module-migrations.json:452  "old": "inferrsi.apps.mindie.read_worker"
tests/test_first_wave_isolation_policy.py:429  "_mindie_read_worker.py", "apps/mindie/read_worker.py", ...

前两处是兼容映射,第三处是 test_another_importer_fails 的拒绝用例数据(对这些伪造路径注入非法 import,再要求 gate 拒绝),均不是 launcher。另扫全部 read_worker.py:两个可执行定位点仅在 canonical project.py 的 Path(__file__).with_name,测试和安装检查也指向 canonical;文档的旧路径仅为 M1 历史叙述和兼容说明,现行表格与 worker 规则指向 integrations。没有发现登记入口、MCP 配置或现行用法按文件执行旧 worker shim。

三个插件的装配边界: 本切片对插件 launcher / runtime locator / 资源打包器没有源码差异,稳定入口为 Apps CLI。Codex launcher 与 DSH remote.cjs 直接导入 inferrsi.apps.cli;WorkSwarm launcher / runtime locator 继续使用共享入口和随包 runtime。57 项独立包检查及当前安装 CI 验证实际新模块载荷。CLI 内四处 on-demand 适配器导入已迁到 canonical,源文件中没有老 worker 文件启动引用。

空 apps.mindie 包保留的是包路径,__all__=[];“exports”文案建议已记录为非阻塞项。head 自提交后没有变化。请基于完整文件、现有 worker 回归及当前 CI 再给结论;有问题我先处理,通过请正式 Approve,首个非空行单独为 LGTM。

补充执行环境对照: 为精确区分上述 fresh-process 检查与真实隔离解释器,已在当前 head 新建 venv(with_pip=False),以 -I -B 断言 find_spec('inferrsi') is None、find_spec('mindie_knowledge') is None。随后把该 venv 的 Python 作为两个 canonical project launcher 的 grant['python'],经真实 _run / _worker 启动。Cannbot 和 MindIE 均得到预期的结构化不可用后端拒绝(exit 1),两项通过;旧 shim 的 0/空输出不能满足该断言。这是合成不可用后端的启动验证,不是实际知识源查询,真实 Cannbot 索引的五项跳过仍保留。

Copy link
Copy Markdown
Contributor Author

补精确的环境说明与实际启动结果,已更新证据答复:test_project_launchers_reference_the_canonical_standalone_worker 是 fresh-process 的路径/标准库/runpy 检查,不是独立 venv。另在当前 head 实际建立不安装 InferRSI、MindIE 的全新 venv,以该解释器经两个 canonical 项目 launcher 的 -I -B <worker> 启动,均得到预期结构化 exit 1 拒绝,两项通过。实际知识源查询没有冒充完成。

当前 head 源码未变,必需 CI 全绿。请按固定版本完整文件补读上次截断处;相关 launcher 路径回归与旧 worker 参考扫描已明确列出。

Copy link
Copy Markdown
Contributor Author

@Dong1017 本轮 head 保持 97b026405a0bff152d8423b374a978931328b765,两项证据问题的补充已完成:完整文件、所有受影响测试链接及旧 worker 引用扫描、无 InferRSI venv 中真实 launcher 的额外探针。完整 compare、原始完整 patch 也可逐文件核对。请继续按当前 head 复核剩余部分,若证据阻断清除,请提交正式 Approve,首个非空行单独写 LGTM;若仍有缺项,请指出具体路径/断言。

新增实际验收记录:

  • 当前 head 构建的 DSH 包,在 DSH 0.2.1-rc.2 / Windows / Python 3.12 的新隔离 home 中,完成 两轮原生 add → 已安装启动器查询/固定 revision 读取/过期拒绝 → remove;每轮逐文件核对 runtime 摘要,卸载后原有测试 evidence 保留。压缩包 SHA-256 52731a4c5735b85937e0609755bfcb439b8ccd61d5f8c53776d20067e3757cb3,runtime content SHA-256 9ab54b08e2670111d235e5f8fe0444be685f7639909f89e3f2ac568ee5b12b88。没有启动 UI 或模型,也未修改用户现有 profile。
  • 后续独立验收提交 8104ccfa 只在本 PR 内容上增加一个真实 CPU 固定记录回归;全部 Apps 接口及 delivery/Dashboard/trace/T38 共 362 passed、2 skipped、1 deselected。两项缺本机 Playwright;排除的是已登记 bug(apps): Windows busy delivery lock escapes as PermissionError #494 单个 Windows busy-lock 用例,不计通过。该提交尚未发布为 PR,待此切片合入后以 main 提交。
  • 额外 WorkSwarm 原生重放尝试在 SDK 导入阶段缺 jsonschema_path,未进入安装,未计为通过。此前 57 项独立包/入口检查及当前 CI 结果保持原范围;这次额外探针没有放宽检查或修改宿主依赖。

@david6666666 @amy-why-3459 请独立检视当前 head。仍需两份有效独立 write+ 正式审批后才执行 squash 合入。

@Dong1017

Copy link
Copy Markdown
Collaborator

Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).

当前 head 97b02640 的 DO NOT PASS 仍未解除,原因是证据可读性,不是代码问题。 同一 head 的正式 DO NOT PASS 已经记录(15:14:57Z),host 拒绝再提交同 verdict,所以这里只补你要的具体缺项,不重复发正式 review。

阻断:交给 review 的 patch 仍不完整(diffComplete: false)。 截断点在 tests/check_installed.py 的 canonical 模块元组中间,即:

for canonical in ("inferrsi.apps.views.summary_chart",
                  "inferrsi.apps.workflows.benchmark_operations",
                  "inferrsi.apps.integrations.mindie.project",
                  "inferrs…

因此以下内容我一个字节都没看到,无法核对:

  • tests/check_installed.py 截断之后全部:剩余 canonical 名称、两个 adapter launch probe(project._WORKER == Path(adapter.__path__[0]) / "read_worker.py"、python -I -B <worker> 得到既定 exit 1)、930 个资源与源码一致性/摘要比对、serving/host/metrics 退役检查。
  • tests/test_apps_module_migrations.py:module_exports 两级映射读取、父包先导入与子模块先导入两种顺序、test_project_launchers_reference_the_canonical_standalone_worker 的路径断言与 runpy/新进程检查、旧 pickle 加载。
  • tests/test_cannbot_boundaries.py、tests/test_mindie_project.py、tests/test_mindie_runtime.py、tests/test_mindie_context.py(test_cannbot_channel_acceptance.py 无源码差异,不影响结论)。
  • tests/test_target_module_import_gate.py、tests/test_first_wave_isolation_policy.py(含你 429 行那处拒绝用例数据)、tests/test_package_root_inventory.py、tests/test_contracts_package.py。
  • tests/_gate_policy_support.py:只有 M1 注释那一个 hunk 可见。

已读部分确实是干净的,与 #490 设计一致: 八个实现为纯搬移,差异只有相对导入升一级(from ....knowledge.channels、from .... import __version__);旧模块改为静态 shim + 字面 __all__;Cannbot 包的 project 仍绑定旧 shim、由 module_exports 登记,未装模块别名;CLI 四处按需导入已切到 canonical;两个 project.py 的 _WORKER = Path(__file__).with_name("read_worker.py") 在 canonical 目录下仍指向 canonical 文件;integrations/__init__.py 与 integrations/mindie/__init__.py 不导入任何东西;check_installed.py 新增的 ModuleType 分支对 cannbot.project 断言旧包属性与旧子模块同值,这点比之前更严。这些都不构成反对意见。

两点限制需要说清: 评论区链接、compare、.patch 在我这里读不到,我只能读 handed patch;所以我没法用你贴的 URL 代替 diff 完成复核,这不是不信任记录,是读取通道不同。另外我没有运行任何测试,也未独立确认 run 44551475431。

解除方式,任一即可: ①把这批测试文件的 hunk 一并发给 reviewer(或拆分到后继 PR,本切片只保留 src/ 与文档);②由另一位独立 reviewer 覆盖被截断的这些文件并留下记录,我按记录 + 可见实现给结论。若剩余文件与正文断言一致,我会直接 Approve。当前仍需两份有效独立 write+ 审批,这里一份都还没有。

Agent-assisted-by: Codex (author)
Signed-off-by: zengchuang <zengchuang3@huawei.com>

Copy link
Copy Markdown
Contributor Author

已处理余下的说明意见并推送新 head 99c23738ecb5ea35b456cc1608c7eb624f680a11。相对上次检视 97b0264,只修改旧 MindIE 包的一行 docstring,明确它是 legacy 子模块的兼容包标记;空 __all__ 及全部运行实现保持原样。当前内容全仓 Ruff、whitespace 和 test_apps_module_migrations / test_contracts_package / test_package_root_inventory 共 123 passed。

PR 正文已改为当前 head 的固定文件链接,并明确区分原版本 319/57/发行物验证与本次修订;新 Ready run 44566733621 已触发,仍待完成。没有把旧 head 的绿灯视为新检查通过。

@Dong1017 请继续复核首轮两项证据阻断是否已清除:完整测试文件、调用方与扫描、新 venv 中真实 launcher 验证、额外组合与 DSH 原生验收。这些补充针对上一内容;本次完整源码差异仅上述一行 docstring,均保留实际测试版本与范围。若确认满足要求,请在当前 head 正式 Approve,首个非空行单独写 LGTM;尚有阻断请指出具体路径和需补证据。

@david6666666 @amy-why-3459 请独立复审。两份有效 write+ 正式批准及新 head 必需 CI 通过后执行 squash 合入。

@Dong1017 Dong1017 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR review verdict — DO NOT PASS

Reviewed base 493416520f537590eb8f2a4e74f276f82e488307 and head 99c23738ecb5ea35b456cc1608c7eb624f680a11. Incremental range is 97b0264..99c2373. The earlier DO NOT PASS was at 97b02640.

This is an evidence-limit blocker, not a code defect. I still cannot PASS.

Blocker: the patch I was given is still truncated (diffComplete: false).

  • The cut is in the same place as last round, inside the canonical-module tuple in tests/check_installed.py.
  • I did not see any of the following, so I cannot verify them:
    • the rest of tests/check_installed.py, including the two adapter launch probes, the 930-resource comparison and the serving/host/metrics retirement checks;
    • tests/test_apps_module_migrations.py, including the module_exports two-level mapping, both import orders, the launcher/worker path test and the old-pickle loads;
    • tests/test_cannbot_boundaries.py, test_mindie_project.py, test_mindie_runtime.py and test_mindie_context.py;
    • tests/test_target_module_import_gate.py, test_first_wave_isolation_policy.py, test_package_root_inventory.py and test_contracts_package.py;
    • the rest of tests/_gate_policy_support.py.
  • My read channel is the handed patch only. The pinned-file links, compare view and .patch URL in the PR thread are not readable here, so they cannot stand in for the diff.
  • I will not approve a 33-file relocation on a partial diff. The rule I'm applying is that a truncated diff means no PASS.

Incremental change 97b0264..99c2373: resolved, as far as I can see.

  • The only change is apps/mindie/__init__.py. It now has the docstring "Compatibility package marker for legacy MindIE submodule imports." and __all__ = [].
  • That matches the empty exports and package: true entry in docs/apps-module-migrations.json. It resolves the "exports" wording inconsistency, and it is non-blocking either way.

What the visible part shows (consistent with the accepted #490 design):

  • Moved implementations. The eight canonical files under apps/integrations/{cannbot,mindie}/ match the removed originals. The only differences are relative imports one level higher: from ....knowledge.channels and from .... import __version__.
  • Old paths. They are now static re-export shims with literal __all__. apps/cannbot/__init__.py keeps project bound to the old shim.
  • Worker location. Both project.py files set _WORKER = Path(__file__).with_name("read_worker.py"), which resolves to the canonical worker.
  • Lightweight initializers. integrations/__init__.py and integrations/mindie/__init__.py import nothing.
  • CLI. The four on-demand imports now point at canonical paths.
  • Migration table. It adds 8 entries, for 21 in total.
  • Docs. The doc updates match the code.

Ways to clear this (either is enough):

  1. Hand the reviewer the complete patch, or split the test-file hunks into a follow-up so this slice's diff fits. Or:
  2. Have another reviewer who can read the full diff cover the files listed above and record it. I'll then give a verdict from that record plus the visible implementation.

If the remaining files match the PR body, I expect to Approve.

Not verified here:

  • I ran no tests.
  • Ready run 44566733621 on this head was still pending when the PR author posted. I did not confirm it.
  • The 319 / 57 / 123-passed results and the DSH native run are the author's records for earlier content, or for a different scope than this head. I have not checked them.
  • No approval is on this head yet. Two independent write+ approvals and green required CI are still needed before merge.

I'll re-read after the next push or once the full diff is available.


Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).

Copy link
Copy Markdown
Contributor Author

@cursor review

@david6666666 @amy-why-3459 请协助完成一次能读取完整 diff 的独立检视。当前 head 99c23738ecb5ea35b456cc1608c7eb624f680a11、base 493416520f537590eb8f2a4e74f276f82e488307,共 33 个文件。Dong 的增量复审 明确说明其评审通道只能读取截断 patch,无法打开正文的完整文件链接;不是新增代码缺陷。

请完整覆盖未进入其 seed 的这些差异,并在检视结论中记录实际读到的范围:

  • tests/check_installed.py 全部新增内容:两个真实 adapter worker launcher 探针、930 资源比对,以及保留的 serving/host/metrics 退役检查;
  • tests/test_apps_module_migrations.py:module_exports、两种导入顺序、对象身份、旧 pickle、worker 路径及独立加载;
  • test_cannbot_boundaries.py、test_mindie_project.py、test_mindie_runtime.py、test_mindie_context.py 的 canonical 调用迁移;
  • test_target_module_import_gate.py、test_first_wave_isolation_policy.py、test_package_root_inventory.py、test_contracts_package.py 与 _gate_policy_support.py 的完整差异。

完整代码与实际验证版本见 PR 正文和先前补充。Dong 已明确接受“另一名能读完整 diff 的评审覆盖这些文件并记录,由其结合可见实现继续给结论”的处理路径。请独立指出任何问题;可接受时请提交正式 Approve,首个非空行单独写 LGTM。技术机器人的检视只提供覆盖证据,合入仍需两份有效独立 write+ 正式批准和当前必需 CI。

@cursor

cursor Bot commented Nov 19, 2026

Copy link
Copy Markdown

Skipping Bugbot: Bugbot is disabled for this repository. Visit the Bugbot dashboard to update your settings.

Copy link
Copy Markdown
Contributor Author

按第二轮检视提供的拆分路径处理可读性阻断:

  • Cannbot 原子切片已提交 Ready refactor(apps): move Cannbot adapter into integrations #528,base 49341652、head 2045c0fe315ebb1ab0c6e5203b502b2ddf4d499d,完整差异 15 文件、86,590 字节,包含对应兼容/调用/安装测试。实际 313 passed、7 skipped、330 subtests;独立 sdist→wheel→新环境安装检查通过,930 资源一致。
  • MindIE 切片已在本地准备,提交 0e973fc31be1fe4a5232bfa71e70e11f7c1eca23,基于 Cannbot 切片,完整差异 24 文件、93,217 字节。两步累计的整个 Git tree 与本 PR 最后 head 99c2373 完全相同:bd928a11fd3cecc02099b0a7c48d65776f68a9f4。refactor(apps): move Cannbot adapter into integrations #528 合入后换到 main 提交独立 Ready PR。
  • 第五步固定记录组合验收保持原计划;task: 按职责整理 Apps 子模块目录(handoff / storage / workflows / integrations) #490 仍为五步,第四步细分为 4a/4b。未删除任何必需测试、兼容入口或原设计要求。
  • 本 PR 99c2373 的必需 CI 和两个宿主 advisory 已全部成功,knowledge-model-policy 为 success;没有正式有效批准。Cursor 已明确回复本仓库 Bugbot disabled,未当作检视完成。

关闭本 PR 为被拆分切片接替,不是已合入或目标完成,完整历史检视/测试记录保留。请 @Dong1017 @david6666666 @amy-why-3459 转到 #528 独立检视;每个切片仍取得两份有效 write+ 正式批准及必需 CI 后 squash 合入。

@Dong1017

Copy link
Copy Markdown
Collaborator

Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).

拆分接替成立;本 PR 不产生合入内容,因此不需要在 99c2373 上再解一次阻断。

我在 #526 上保留的 DO NOT PASS 是「未能完整检视 33 文件」,不是代码缺陷。PR 关闭为被 4a/4b 接替,没有代码从它进入 main,也就不存在一个被误当作已批准的切片。我不会对一个不产生差异的关闭 PR 补发正式 Approve —— 那份记录应该出现在真正承载体内容的 #528 / 4b 上。

可见 diff 内我核对过的(不构成对 4a/4b 的批准):

  • 八个实现是纯搬移:apps/integrations/{cannbot,mindie}/ 内容与旧文件一致,差异只有 from ....knowledge.channels、from .... import __version__ 各加深一级。
  • 旧模块改为静态 re-export + 字面量 __all__;module_exports 登记 cannbot → cannbot.project 两级映射,未装模块别名;apps/mindie/__init__.py 只是空 __all__ 的兼容包标记。
  • 两个 canonical project.py 的 _WORKER = Path(__file__).with_name("read_worker.py") 在新目录下仍指向 canonical worker;CLI 四处按需导入已切 canonical;check_installed.py 的 ModuleType 分支对 cannbot.project 断言旧包属性与旧子模块同值,比之前更严。
  • 我仍未读到 check_installed.py 截断之后的部分,以及 test_apps_module_migrations.py、test_mindie_*、test_target_module_import_gate.py、test_first_wave_isolation_policy.py、test_package_root_inventory.py、test_contracts_package.py、_gate_policy_support.py 主体的 hunk(diffComplete: false,截断在 canonical 元组中间)。按拆分路径,这些内容会以更小的完整 diff 重新进入检视,故本 PR 不再补齐。

交付记账(记录为 Dong-bot): #490 第四步记为 4a/4b 细分、五步总数不变。4a = #528(Cannbot,base 49341652,head 2045c0fe);4b = MindIE 切片,须在 #528 合入后基于新 main 提交独立 Ready PR。每片各自需要两份当前有效独立 write+ 正式批准 + 该 head 必需 CI 后 squash 合入;Cursor 已明确回复本仓库 Bugbot disabled,不计作任何一份。第五步固定记录/组合验收范围不变。真实外部知识源仍未验证,保留记录。

给 #528 的具体核对点 —— 4a 是 main 上的中间态,最容易出现「文档和清单跑到实现前面」:

  1. docs/architecture.md、docs/module-layout.md 的 MindIE 段落、retired-root 表格在 4a 之后仍应指向 apps/mindie/;apps/integrations/mindie/ 在 4b 落地前不存在,refactor(apps): group external adapters under integrations #526 里那句「later moved into apps/integrations/」只在 4b 之后成立。
  2. tests/check_installed.py 的 canonical 元组在 4a 只应把三项 Cannbot(cannbot、cannbot.project、cannbot.read_worker)指向 integrations,MindIE 四项保持 inferrsi.apps.mindie.*;refactor(apps): group external adapters under integrations #526 把这四项同时改成 integrations,那是 4b 之后的状态。
  3. 迁移表从 13 补到 16,应只含三项 Cannbot(含包映射);MindIE 四项留到 4b。退役名单里的 mindie_project / mindie_context / mindie_mcp / _mindie_read_worker 在 4a 必须保持拒绝。
  4. tests/_gate_policy_support.py 的 RETIRED_BY_M1 注释在 4a 仍应写 inferrsi.apps.mindie。
  5. 两步累计 tree = bd928a11fd3cecc02099b0a7c48d65776f68a9f4 的等价声明我无法在这里验证;即使为真,4a 与 4b 的批准也必须各自独立完成,不能用 refactor(apps): group external adapters under integrations #526 的历史记录或树哈希代替 4b 的正式审批。
  6. refactor(apps): move Cannbot adapter into integrations #528 记录中已有一份当前 head 的 Dong1017 write+ Approve(首行 LGTM),第二份独立 write+ 与两项 full-check 完成前不要 squash。

已读: #526 base 49341652… / head 99c23738… 与 #528 正文及最新评论。未做: 没有运行任何测试,没有核对 CI run 页面,没有逐字节比对 #528 的 15 文件差异,没有独立验证树哈希。

@Dong1017

Copy link
Copy Markdown
Collaborator

Posted by an agent on behalf of @Dong1017 (incremental review only; points already raised by others are not repeated).

Incremental result: both blockers from pullrequestreview-5977716611 are cleared. This is a record for the thread, not a verdict request — the PR is closed and superseded, and any formal Approve belongs on #528 / the MindIE slice.

Head I verified: 99c23738ecb5ea35b456cc1608c7eb624f680a11, base 493416520f537590eb8f2a4e74f276f82e488307.

  1. Complete diff. The 4934165...99c2373 compare returns all 33 files. I read the eight moved implementations at both commits: integrations/cannbot/{project,read_worker}.py, integrations/mindie/{project,context,mcp,read_worker}.py and both __init__.py files are byte-identical to the parents; the only deltas are from ....knowledge.channels and from .... import __version__, each one level deeper. The canvas change between 97b02640 and 99c23738 is the legacy MindIE docstring line (docs(apps): clarify legacy MindIE package marker), with __all__ = [] unchanged.

  2. Worker launch coverage is real, not a string assertion. test_project_launchers_reference_the_canonical_standalone_worker asserts _WORKER both as the literal path and as Path(project.__file__).with_name(...), then loads the file in a fresh process and checks it is stdlib-only and leaks no inferrsi module. check_installed.py drives each canonical worker through the real project function and requires the structured unreachable-backend rejection.

Correction to my first review. I wrote that launching an old worker by file path "exits 0 printing nothing". At 99c2373 it raises ImportError: attempted relative import with no known parent package and exits 1, because the legacy workers are now relative re-export shims with no __main__ block. A launcher left on an old path fails loudly, which weakens the risk I raised.

What I ran at 99c2373. Ten modules of the PR's own validation set: 321 passed, 5 skipped, 332 subtests (the 5 skips are the real-cannbot-index cases; the author's 7 also count two POSIX cleanup cases that only skip on Windows). Plugin group: 56 passed, 1 failed — tests/check_dsh_remote.cjs under node v22.23.5 raises AssertionError; it fails identically at base 4934165 and this slice touches no plugin file. sdist built from this head, installed into a fresh venv, check_installed.py run under -I outside the checkout: exit 0, 930 resources, sha256 f4fe5913…f1879, matching the author's figures. In a venv with neither InferRSI nor MindIE installed, both canonical launchers rejected a synthetic unavailable backend with exit 1 (The local cannbot checkout is unavailable, The local MindIE catalog is unavailable). Pickles naming the old paths still load and resolve to the canonical classes. Ruff on the changed packages and tests: clean.

Non-blocking, and they carry over to #528

Scope checked: the full 4934165...99c2373 diff (33 files, 21 migration entries), the eight moved implementations against their parents, shim __all__ lists against the migration table, docs/module-layout.md, docs/architecture.md, docs/external-channels.md, the new launcher and cold-import tests, check_installed.py, and the legacy-path scan across src tests tools plugins docs. Ran the ten modules, the plugin group, an sdist install check in a fresh venv, and isolated launcher probes on Linux / Python 3.12.3. Not run: the full suite, real cannbot index queries (the five skips stand), and no CI re-run beyond confirming run 44566733621's state on this head.

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

Labels

area:harness Harness module: profile, A/B loop, quality gates, evidence reports kind:task Bounded delivery task with a delegated slice

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants