Repository navigation
refactor(apps): move Cannbot adapter into integrations - #528
zengchuang-hw wants to merge 1 commit into
Conversation
Agent-assisted-by: Codex (author) Signed-off-by: zengchuang <zengchuang3@huawei.com>
Dong1017
left a comment
There was a problem hiding this comment.
LGTM
PR review verdict — PASS
Reviewed base 4934165 and head 2045c0f (full diff, diffComplete: true). prior-reviews.md has no formal reviews, no Approve on this head, and no outstanding CHANGES_REQUESTED, so this is the first review.
Verified from the diff:
- Pure move: the git blob hashes show
integrations/cannbot/project.py(7386f0499) andread_worker.py(0ff4055d4) are identical to the pre-PR files. The only change to__init__.pyis the relative import depth (...knowledge→....knowledge). Grant schema, read-only access, limits, revocation and receipts are unchanged. - Legacy shims:
apps/cannbot/{__init__,project,read_worker}.pyuse explicit static imports and a literal__all__. They re-export the canonical objects.apps.cannbot.projectstays a distinct module, with no alias installed. - Worker launch:
project._WORKERresolves viaPath(__file__).with_name("read_worker.py"), so it points at the canonical sibling file. The launcher keeps-I -B. The worker's top-level imports are stdlib-only. - CLI: both
apps/cli/__init__.pycall sites import from..integrations. The newintegrations/__init__.pyis docstring-only. - Inventory and docs:
docs/apps-module-migrations.jsonadds the package entry withmodule_exportsforproject, plus the project and read_worker entries.docs/architecture.mdanddocs/module-layout.mdare updated, and the doc wording now says MindIE is the remaining integration slice. - Tests:
test_apps_module_migrations.pyis generalized forpackage: trueandmodule_exports.- It adds a parent-first and child-first import-order test for the legacy
projectbinding. - It adds a standalone-worker AST and
runpytest. check_installed.pyadds an installed-wheel launch probe, run from an unrelated cwd, that exercises the real worker subprocess.test_cannbot_boundaries.pyis repointed at the canonical modules.- The
test_contracts_package.pychange adds__file__to the exec namespace, which fitsPath(__file__)now being used at module import.
Non-blocking notes:
- Private-helper patches against the legacy
inferrsi.apps.cannbot.projectpath, such as_runor_WORKER, no longer reach the implementation. The docs state this. I only saw the test files in this diff, so a repo-wide grep for other legacy-path private patches is worth doing. operation = "read" if system == "cannbot" else "call"in the launcher test is parametrized scaffolding for a MindIE follow-up. It is harmless now.
Not verified here: I did not execute pytest or check_installed.py, and I did not check CI status or wheel contents. Merge still needs the ruleset's other qualifying approval and green CI. This was a Dong-bot (authorized delegate) review.
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).
|
已补充当前
Dong1017 已正式 Approve,首行 |
|
@david6666666 @amy-why-3459 当前 head |
|
@david6666666 @amy-why-3459 按请求方的持续推进安排再次跟进:截至 2026-11-19 18:09 UTC,当前 head 最新核对:
请其中一位独立检视并记录正式结论;可接受时提交 Approve,首个非空行单独写 |
Governing Issue and delivery slice
Refs #490
Refs #371
将 Cannbot 的只读外部知识接入归入
apps/integrations/cannbot/,让 CLI、兼容导入和获准解释器都指向有明确归属的实现。这是 #490 第四步 integrations 的 4a 切片(整体仍为五步)。原 #526 的复审 因评审通道只能读取截断 patch 无法给出完整结论,Cursor 入口也已在仓库关闭,因此将原变更拆为 Cannbot、MindIE 两个原子切片,每个切片保留自己的兼容测试。后续 MindIE 切片已在本地准备,累计内容与 #526 head
99c2373整个 Git tree 相同;本 PR 合入后提交。第五步固定记录验收另行交付。Base
493416520f537590eb8f2a4e74f276f82e488307;head2045c0fe315ebb1ab0c6e5203b502b2ddf4d499d。完整差异为 15 个文件、86,590 字节,供检视通道完整读取。Changed artifacts and evidence
__all__;旧 pickle 可加载,新定义归 canonical 路径module_exports登记两级绑定并覆盖两种导入顺序-I -B。grant 不保存 worker 路径,格式保持现有契约;旧 worker 路径提供登记的 Python 导入兼容MindIE 的实现和调用方在本 PR 保持当前 main 的位置,迁移由下一切片完成。三个 retired 根 MindIE 名称及旧 CLI 等现有退役检查均保留。无 CI、Knowledge 或冻结 evidence 改动。
Checks and dependencies
Windows / Python 3.12。测试运行时工作区基于 base,随后将完全相同内容提交为
2045c0fe;运行后没有源码变更。原运行元数据中的 base SHA 保留,并补提交内容关系记录。f4fe59130727ef9f80d42ef6e416aaea10ca27b0a56b93339c72e82ae77f1879回归节点:
test_cannbot_boundaries、test_cannbot_channel_acceptance、test_mindie_project、test_mindie_context、test_mindie_runtime、test_apps_module_migrations、test_contracts_package、test_target_module_import_gate、test_package_root_inventory、test_first_wave_isolation_policy。使用python -m pytest -o addopts= -q -x -rs --tb=short。7 个跳过项为两项 Windows 不适用的 POSIX 进程组清理,以及五项需要获准真实 Cannbot 索引的场景。真实外部索引不在本次已验证范围。独立 worker 探针是合成缺失 checkout 的结构化拒绝,不是实际知识查询。
Remaining work and Issue closure
本 PR 只交付 Cannbot 迁移。MindIE 4b 与第五步整体组合验收仍待后续 PR;#490/#371 保持打开。#371 的生产评测仍按 #429/#430/#434 跟踪,软件回归不构成模型或服务性能收益证据。
保持 Ready。按当前 head 的两份有效独立 write+ 正式审批与必需 CI 核对,满足后 squash 合入;host-compatibility 按 #508 为 advisory。