Repository navigation
refactor(apps): move MindIE adapter into integrations - #537
zengchuang-hw wants to merge 1 commit into
Conversation
Agent-assisted-by: Codex (author) Signed-off-by: zengchuang <zengchuang3@huawei.com>
|
@Dong1017 @david6666666 @amy-why-3459 请检视 #490 第四步 4b MindIE,正式 Ready,当前 head 重点:canonical worker 的实际 本 head 实测:适配器/迁移/隔离组 319 passed、7 环境跳过、332 subtests;prepare 交接/模块边界 57 passed;三个插件包/入口 59 passed;全新 sdist→wheel→新环境 checkout 外 installed checker 通过;Ruff/whitespace 通过。各项缺口及首轮本机路径长度构建失败/短路径同源码复跑已保留在正文。必需 CI 44702208635 排队中,未计为通过。 请对完整 head 独立给出 PASS / DO NOT PASS;通过时提交首个非空行独立为 |
Dong1017
left a comment
There was a problem hiding this comment.
LGTM
PR review verdict — PASS
Reviewed base f0e92e8d4992746ac62e89f16347ecab6141de67 and head aba9b10c9395d22aa0cbc446a0f592843040dbc5 (full diff, diffComplete: true). This is the first formal review on this head: the seeded prior-review record lists no APPROVED review and no outstanding CHANGES_REQUESTED, so nothing earlier is being confirmed here.
Scope matches the accepted 4b slice. #490 clause 3 (per-module old/canonical/exports/consumers registration), clause 2 (explicit static re-export shims with literal __all__), and clause 10 (worker located in the canonical directory, registered launchers on the canonical file) are what this patch actually does: five implementation files added under apps/integrations/mindie/, the four apps/mindie/* modules reduced to shims, apps/mindie/__init__.py reduced to a package marker with __all__ = [].
Verified in the diff
- Migration table: 5 entries appended (
mindie,.project,.context,.mcp,.read_worker), taking the inventory from 16 to 21 as the issue records. Each shim's import list and__all__is the same set as that entry'sexports—project7 names,contextMAX_BYTES/export_context,mcpserve,read_workerread, package[]. - Shim depth is right:
apps/mindie/context.py,project.py,mcp.py,read_worker.pyresolve..integrations.mindie.*→inferrsi.apps.integrations.mindie.*. - The one implementation-line change is correct:
mcp.pymovesfrom ... import __version__tofrom .... import __version__so it still reachesinferrsi.__version__from the deeper package; thecheck_installedprobe still assertsserverInfo.version == inferrsi.__version__. _WORKER = Path(__file__).with_name("read_worker.py")now lives only in the canonicalproject.py, so a legacy import path or a pre-move grant still launchesapps/integrations/mindie/read_worker.py; the canonical worker keeps stdlib-only top-level imports.- CLI call sites switch to canonical (
..integrations.mindie.project.dispatch,..integrations.mindie.context.export_context); MCP still enters throughinferrsi mindie serve. - Legacy worker file paths: the shim is import-only and is not runnable by path.
docs/module-layout.mdnow says so explicitly ("Legacy worker paths retain Python import compatibility; external interpreters are launched against the canonical files"). That satisfies the carried-forward non-blocking item from the issue thread by taking the "state it" option rather than the "keep it runnable" option. - Test coverage moved with the code rather than weakening: the
check_installedworker probe loops("cannbot", "mindie")over canonical dirs (extends stdlib-only/path-load checks to cannbot too) and the(name, "integrations")inventory table gains all five mindie rows;test_project_launchers_reference_the_canonical_standalone_workeris parametrized tocannbot+mindie; the import-free-initializer test addsinferrsi.apps.integrations.mindie;test_mindie_runtime.pyreplaces the depth-dependentparents[3]withPath(__file__).parents[1] / "src", the samesrcdirectory, which is more stable after the extra package level, not less strict. - Docs are consistent:
architecture.mdtree nestsmindie/underintegrations/,module-layout.mdrenames the section, removes "MindIE remains inapps/mindie/until its separate integration slice", adds the historical note that the integrations slice moved the package, and keeps shim retirement as a separate reviewed PR;external-channels.mdand_gate_policy_support.pycomment follow the new path. - Net behaviour of the five implementation bodies is unchanged per the diff; private helpers (
_parse,_object,_invalid_constant,_WORKER) are not re-exported through the old paths, which matches the accepted rule that tests patch canonical modules.
Not verified here
- I ran no tests and no packaging check. The 319/7/332 + 57 + 59 and the sdist→wheel→fresh-venv result in #490 are the author's own numbers, unverified by me.
- Required CI on
aba9b10c(run 44702208635) was queued per the issue; merge should still wait on it plus a second valid independent approval. This Approve is one vote. - The Windows local wheel build hit a path-length limit and was rerun at a short temp path; only the rerun is recorded. No repo-wide grep for residual
apps.mindiereferences was possible from the seeded diff, so unlisted external consumers are unconfirmed.
(Dong-bot, authorized delegate)
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).
Refs #490
Refs #371
Move the MindIE project grant, context export, stdio MCP and standalone read worker into
apps/integrations/mindie/, completing #490 step 4b after Cannbot #528. Oldapps.mindiePython imports remain explicit static compatibility exports; CLI callers and worker lookup use the canonical implementation. Update the migration inventory, boundary assertions, installed-package checks and current directory documentation together.The five canonical source bodies match main before migration, apart from the MCP version import moving one package level deeper. Approved interpreter flags (
-I -B), authorization checks and worker behavior are unchanged. The old package initializer stays empty. The migration inventory now contains 21 entries and preserves both Benchmark prepare consumers introduced by merged #530.Base:
f0e92e8d4992746ac62e89f16347ecab6141de67(main includes #528 and #530). Head:aba9b10c9395d22aa0cbc446a0f592843040dbc5. Full diff: 24 files / 93,217 bytes. This replaces the MindIE portion of closed, unmerged #526; its historical checks are not presented as checks of this revision.Validation on this head
fecd92abf06092c094d6ce3346a66b7b1ac0dd1ec936794488bfe93c5fb0e015Local environment: Windows / Python 3.12. The first isolated wheel build hit Windows path-length exhaustion in unchanged Knowledge resources; rebuilding the same source under a shorter temporary path with validation-only version
0.0.0+mpassed, without a source/CI/packaging-rule change. These are this head's actual inventory/counts, not the older #526/#528 installation counts. The seven adapter skips are two POSIX process-group cleanup cases and five cases requiring an approved real Cannbot index. They are not passes. No validation thresholds or CI lanes changed; Windows/macOS host checks remain advisory under repository policy.Ready CI: run 44702208635, queued when local results were recorded; CI completion is still pending.
Review and remaining work
Please review the full base/head diff, canonical worker launch, shim identities/pickle compatibility, consumer inventory and installed-package paths. Obtain two eligible independent formal approvals and passing required checks before squash integration. Apps owner/accountable parent and author: zengchuang-hw / Codex under accepted #490; author/self-review cannot count.
The next independent slice is #490 step 5: a real ordinary CPU fixed record shared by status, report, Dashboard and trace, plus output/publication/replay and package compatibility acceptance. This migration does not complete #490 or #371. Production evaluation execution (#429), offline assess (#434) and the shared production CPU acceptance remain separate deliveries.