Skip to content

refactor(apps): move MindIE adapter into integrations - #537

Open
zengchuang-hw wants to merge 1 commit into
mainfrom
codex/apps-490-mindie-review
Open

zengchuang-hw wants to merge 1 commit into
mainfrom
codex/apps-490-mindie-review

Conversation

@zengchuang-hw

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

Copy link
Copy Markdown
Contributor

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. Old apps.mindie Python 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

Check Result
Cannbot/MindIE adapters, migration compatibility, contracts/import isolation and root inventory 319 passed, 7 skipped, 332 subtests passed
Benchmark prepare + Apps prepare + module boundaries 57 passed
Ruff on Apps and affected tests; diff whitespace; five source-body comparison; preservation of #530 consumers Passed
Codex / WorkSwarm launcher / DSH package checks 59 passed; one existing tarfile deprecation warning
Fresh sdist → wheel → isolated environment, installed checker outside checkout Passed: 761 packaged resources / 136 source-grounded records; SHA-256 fecd92abf06092c094d6ce3346a66b7b1ac0dd1ec936794488bfe93c5fb0e015

Local 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+m passed, 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.

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

Copy link
Copy Markdown
Contributor Author

@Dong1017 @david6666666 @amy-why-3459 请检视 #490 第四步 4b MindIE,正式 Ready,当前 head aba9b10c9395d22aa0cbc446a0f592843040dbc5 / base f0e92e8d4992746ac62e89f16347ecab6141de67(已包含 #528 / #530)。完整差异 24 文件 / 93,217 字节,拆自未合入的 #526,避免原检视通道补丁截断。

重点:canonical worker 的实际 -I -B 文件启动与授权边界;旧包静态 shim/对象身份/pickle;21 项迁移表与 #530 两个 consumer 保留;CLI/MCP/上下文和独立安装路径。五个实现体已逐一对照,仅 MCP 相对版本导入深度变化。

本 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;通过时提交首个非空行独立为 LGTM 的正式 Approve。需要两位有效独立 write+ 账户批准及必需 CI 通过后 squash 合入;作者与同账户自检不计票。

@Dong1017 Dong1017 added the kind:task Bounded delivery task with a delegated slice label Nov 20, 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.

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's exports — project 7 names, context MAX_BYTES/export_context, mcp serve, read_worker read, package [].
  • Shim depth is right: apps/mindie/context.py, project.py, mcp.py, read_worker.py resolve ..integrations.mindie.* → inferrsi.apps.integrations.mindie.*.
  • The one implementation-line change is correct: mcp.py moves from ... import __version__ to from .... import __version__ so it still reaches inferrsi.__version__ from the deeper package; the check_installed probe still asserts serverInfo.version == inferrsi.__version__.
  • _WORKER = Path(__file__).with_name("read_worker.py") now lives only in the canonical project.py, so a legacy import path or a pre-move grant still launches apps/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 through inferrsi mindie serve.
  • Legacy worker file paths: the shim is import-only and is not runnable by path. docs/module-layout.md now 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_installed worker 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_worker is parametrized to cannbot+mindie; the import-free-initializer test adds inferrsi.apps.integrations.mindie; test_mindie_runtime.py replaces the depth-dependent parents[3] with Path(__file__).parents[1] / "src", the same src directory, which is more stable after the extra package level, not less strict.
  • Docs are consistent: architecture.md tree nests mindie/ under integrations/, module-layout.md renames the section, removes "MindIE remains in apps/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.md and _gate_policy_support.py comment 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.mindie references 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).

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

Labels

kind:task Bounded delivery task with a delegated slice

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants