Repository navigation
refactor(apps): group external adapters under integrations - #526
zengchuang-hw wants to merge 2 commits into
Conversation
Signed-off-by: zengchuang <zengchuang3@huawei.com> Agent-assisted-by: Codex (author)
|
@Dong1017 @david6666666 @amy-why-3459 请独立检视 #490 第四步 integrations。当前 head 源码树与已验证的准备版本完全相同: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
left a comment
There was a problem hiding this comment.
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 newmodule_exportstwo-level mapping and drive the identity checks;tests/test_cannbot_boundaries.py/test_cannbot_channel_acceptance.pyandtests/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.pyand the rest oftests/_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__.pyandapps/integrations/mindie/__init__.pycontain only docstrings;apps/integrations/cannbot/__init__.pybindsprojectbut calls noload_grant, spawns no subprocess and opens no checkout at import time —load_grantstill runs only insideCannbotChannel.__init__. - Relative-import depth after the move:
from ....knowledge.channelsinapps/integrations/cannbot/__init__.pyandfrom .... import __version__inapps/integrations/mindie/mcp.pyboth reachinferrsifrominferrsi.apps.integrations.<pkg>.<module>; the__version__depth matches the documented change fromfrom ... import __version__. - Worker resolution: both canonical
project.pyfiles keep_WORKER = Path(__file__).with_name("read_worker.py"), so the launch target moves with the implementation, and existing grant files record onlypython/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 correspondingexportslist indocs/apps-module-migrations.json. Thecannbotpackage entry keepsprojectas the old shim module with nosys.modulesalias, which is whatmodule_exportsclaims. - Callers in
src/: the four on-demand imports inapps/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__.pysays "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).
|
@Dong1017 按本轮意见补充当前 head 当前提交的 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 之后的内容:
阻塞 2:已有直接的 launcher 定位与发行物启动回归,之前因截断未显示:
前两处是兼容映射,第三处是 三个插件的装配边界: 本切片对插件 launcher / runtime locator / 资源打包器没有源码差异,稳定入口为 Apps CLI。Codex launcher 与 DSH remote.cjs 直接导入 空 补充执行环境对照: 为精确区分上述 fresh-process 检查与真实隔离解释器,已在当前 head 新建 |
|
补精确的环境说明与实际启动结果,已更新证据答复: 当前 head 源码未变,必需 CI 全绿。请按固定版本完整文件补读上次截断处;相关 launcher 路径回归与旧 worker 参考扫描已明确列出。 |
|
@Dong1017 本轮 head 保持 新增实际验收记录:
@david6666666 @amy-why-3459 请独立检视当前 head。仍需两份有效独立 write+ 正式审批后才执行 squash 合入。 |
|
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5). 当前 head 阻断:交给 review 的 patch 仍不完整( 因此以下内容我一个字节都没看到,无法核对:
已读部分确实是干净的,与 #490 设计一致: 八个实现为纯搬移,差异只有相对导入升一级( 两点限制需要说清: 评论区链接、compare、 解除方式,任一即可: ①把这批测试文件的 hunk 一并发给 reviewer(或拆分到后继 PR,本切片只保留 |
Agent-assisted-by: Codex (author) Signed-off-by: zengchuang <zengchuang3@huawei.com>
|
已处理余下的说明意见并推送新 head PR 正文已改为当前 head 的固定文件链接,并明确区分原版本 319/57/发行物验证与本次修订;新 Ready run 44566733621 已触发,仍待完成。没有把旧 head 的绿灯视为新检查通过。 @Dong1017 请继续复核首轮两项证据阻断是否已清除:完整测试文件、调用方与扫描、新 venv 中真实 launcher 验证、额外组合与 DSH 原生验收。这些补充针对上一内容;本次完整源码差异仅上述一行 docstring,均保留实际测试版本与范围。若确认满足要求,请在当前 head 正式 Approve,首个非空行单独写 @david6666666 @amy-why-3459 请独立复审。两份有效 write+ 正式批准及新 head 必需 CI 通过后执行 squash 合入。 |
Dong1017
left a comment
There was a problem hiding this comment.
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 themodule_exportstwo-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.pyandtest_mindie_context.py;tests/test_target_module_import_gate.py,test_first_wave_isolation_policy.py,test_package_root_inventory.pyandtest_contracts_package.py;- the rest of
tests/_gate_policy_support.py.
- the rest of
- My read channel is the handed patch only. The pinned-file links, compare view and
.patchURL 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
exportsandpackage: trueentry indocs/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.channelsandfrom .... import __version__. - Old paths. They are now static re-export shims with literal
__all__.apps/cannbot/__init__.pykeepsprojectbound to the old shim. - Worker location. Both
project.pyfiles set_WORKER = Path(__file__).with_name("read_worker.py"), which resolves to the canonical worker. - Lightweight initializers.
integrations/__init__.pyandintegrations/mindie/__init__.pyimport 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):
- Hand the reviewer the complete patch, or split the test-file hunks into a follow-up so this slice's diff fits. Or:
- 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).
|
@cursor review @david6666666 @amy-why-3459 请协助完成一次能读取完整 diff 的独立检视。当前 head 请完整覆盖未进入其 seed 的这些差异,并在检视结论中记录实际读到的范围:
完整代码与实际验证版本见 PR 正文和先前补充。Dong 已明确接受“另一名能读完整 diff 的评审覆盖这些文件并记录,由其结合可见实现继续给结论”的处理路径。请独立指出任何问题;可接受时请提交正式 Approve,首个非空行单独写 |
|
Skipping Bugbot: Bugbot is disabled for this repository. Visit the Bugbot dashboard to update your settings. |
|
按第二轮检视提供的拆分路径处理可读性阻断:
关闭本 PR 为被拆分切片接替,不是已合入或目标完成,完整历史检视/测试记录保留。请 @Dong1017 @david6666666 @amy-why-3459 转到 #528 独立检视;每个切片仍取得两份有效 write+ 正式批准及必需 CI 后 squash 合入。 |
|
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5). 拆分接替成立;本 PR 不产生合入内容,因此不需要在 我在 #526 上保留的 DO NOT PASS 是「未能完整检视 33 文件」,不是代码缺陷。PR 关闭为被 4a/4b 接替,没有代码从它进入 main,也就不存在一个被误当作已批准的切片。我不会对一个不产生差异的关闭 PR 补发正式 Approve —— 那份记录应该出现在真正承载体内容的 #528 / 4b 上。 可见 diff 内我核对过的(不构成对 4a/4b 的批准):
交付记账(记录为 Dong-bot): #490 第四步记为 4a/4b 细分、五步总数不变。4a = #528(Cannbot,base 给 #528 的具体核对点 —— 4a 是 main 上的中间态,最容易出现「文档和清单跑到实现前面」:
已读: #526 base |
|
Posted by an agent on behalf of @Dong1017 (incremental review only; points already raised by others are not repeated). Incremental result: both blockers from Head I verified:
Correction to my first review. I wrote that launching an old worker by file path "exits 0 printing nothing". At What I ran at Non-blocking, and they carry over to #528
Scope checked: the full |
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,head99c23738ecb5ea35b456cc1608c7eb624f680a11。独立变更 33 个文件。下一步是组合验收;#490、#371 整体完成另行确认。Changed artifacts and evidence
apps/integrations/{cannbot,mindie}/。除 Cannbot 的 Knowledge import 与 MindIE MCP 的 version import 各增加一级相对导入外,规范化源码与父提交原件一致__all__。旧 pickle 可加载,新函数/类定义使用 canonical 路径;无动态别名project保持旧子模块绑定,公共函数/类由 canonical 实现拥有;迁移表module_exports登记并测试父包先导入、子模块先导入两种顺序-I -B文件入口执行。旧路径保留登记的 Python 导入兼容供完整检视的固定 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 修订的结果单列。f4fe59130727ef9f80d42ef6e416aaea10ca27b0a56b93339c72e82ae77f187997b0264换基线后的 Ruff / whitespace / 源码对照99c2373全仓 Ruff / whitespace、迁移与包边界回归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,已在未修改 main9c7b7b05再现;后续组明确排除了该单个节点,未当作原组全通过。原始记录。这部分不是本 head 的新运行,最终组合验收在第五步汇总。当前实现的实际验证节点
上述一组使用
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 的生产评测端口仍单独跟踪。