Skip to content

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

Merged
zengchuang-hw merged 3 commits into
mainfrom
codex/apps-490-mindie-review
Nov 21, 2026
Merged

zengchuang-hw merged 3 commits 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. Preserve the explicit static compatibility exports at apps.mindie; switch CLI callers and worker lookup to the canonical implementation. Update the migration inventory, boundary assertions, installed-package checks and directory documentation together.

The five canonical source bodies match current 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 inventory has 21 entries: all 16 main entries are preserved as JSON values, then the five MindIE entries are appended.

Base: 6ed42af83a69f13fe88aaf0426ab8ef4f8ac7654. Head: f603309dad6f6327142ffcdaee6b0c2c7681aeae. Full PR diff: 24 files / 93,344 bytes, +835 / -712. This replaces the MindIE portion of closed, unmerged #526.

Current conflict refresh

Main advanced through #535 (Apps artifact/provider ownership) and #533 (current documentation). Merge those changes without rewriting branch history. The only manual conflict is the architecture directory diagram: retain integrations/anthropic/ and root apps/artifacts.py, while placing MindIE under integrations/mindie/. The shared import-policy, installed-package, migration and inventory tests retain main's new ownership checks plus this slice's canonical MindIE paths. The unique file set relative to main is exactly the original 24-file slice. MindIE implementation/shim files are unchanged from the previously approved 52dc3192.

Validation on f603309d

Check Result
Entire-tree Ruff; diff whitespace; five source-body equivalence; preservation of main's 16 entries and Anthropic/artifact ownership Passed
Adapter/migration/isolation plus module-boundary/artifact-copy/cross-process-lock checks 346 passed, 7 skipped, 332 subtests passed (Windows / Python 3.12)
Fresh sdist → wheel → new environment; checkout-outside -I installed checker Passed on the current wheel: 761 resources / 136 source-grounded records; inventory SHA-256 fecd92abf06092c094d6ce3346a66b7b1ac0dd1ec936794488bfe93c5fb0e015
Required Ready CI 44865872257, All Ready checks passed; Python 3.10 and 3.11 each 5715 passed, 31 skipped, 674 subtests; installed-package 3.10/3.11, dashboard-browser and PR references success; declarations, lint-and-smoke and knowledge-model-policy success

The seven current skips are two POSIX process-group cleanup cases and five requiring an approved real Cannbot index. The first local installed-check invocation stopped because its caller omitted #535's required session-probe/retained-fixture variables; rerunning the same built wheel with the current CI invocation passed. Only the local validation helper changed, not repository source or CI.

Previous results are historical, not reruns of this head: 52dc3192 had 404 passed / 9 skipped / 332 subtests and a fresh installed-package check; aba9b10c had adapter/migration 319/7/332, prepare/boundaries 57 passed and three plugin package/launcher checks 59 passed. Prior long-path build failure and unchanged-source short-path reruns remain recorded. Environmental skips remain unverified. Windows/macOS host-compatibility checks remain advisory.

Review and remaining work

The old 52dc3192 approvals do not count on this new head. Request fresh independent formal review from Dong1017, amy-why-3459 and david6666666. Integration requires two current eligible write+ approvals (first non-empty line LGTM), no blocking findings and passing required checks. Apps owner/accountable parent and author: zengchuang-hw / Codex under accepted #490; author/self-review cannot count.

After this slice merges, submit #490 step 5 separately: real ordinary CPU fixed-record views plus output/publication/replay and package compatibility acceptance. This PR does not complete #490 or #371. Production evaluation execution #429, offline assess #434 and 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 previously approved these changes 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).

amy-why-3459
amy-why-3459 previously approved these changes Nov 20, 2026

@amy-why-3459 amy-why-3459 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(完整 24 文件 diff,+835 / -712)。

已按 #490 第四步 4b 范围核对:五个实现迁入 apps/integrations/mindie/,旧 apps.mindie 模块为字面量 __all__ 的显式静态 re-export,旧包初始化仍不导入实现;CLI 与测试切到 canonical 路径;_WORKER 只在 canonical project.py 用 Path(__file__).with_name("read_worker.py") 解析,启动参数仍为 -I -B。对照 base f0e92e8d 上的原实现,context / project / read_worker 正文一致,仅 mcp.py 将 from ... import __version__ 改为 from .... import __version__,与更深一层包路径相符。迁移表由 16 项增至 21 项,export 与 shim __all__ 一致;check_installed 将 worker 探针扩展到 cannbot+mindie 的 canonical 文件。文档已说明 integrations 切片,并保留 shim 退役仍需单独 PR。

这是目录迁移,不改变 MindIE 授权、读取或数值行为,不需要准确率/性能对照实验。架构落点与已合入的 Cannbot #528 一致,测试随代码迁移而非重复堆叠。

未在本机重跑测试或独立 sdist→wheel。当前 head 上 Ready CI 44702208635 以及 knowledge-model-policy、full-check 3.10/3.11、installed-package 等检查均为 success。提交前已重新拉取本 head 的 review 与评论:仅有 @Dong1017 的 Approve(5989695146),无未解除的 CHANGES_REQUESTED 或其它阻塞性意见。

@Dong1017

Copy link
Copy Markdown
Collaborator

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

LGTM

PR review verdict — PASS (incremental). Reviewed base f0e92e8d4992746ac62e89f16347ecab6141de67 → head aba9b10c9395d22aa0cbc446a0f592843040dbc5. This is a comment, not a formal vote — the formal Approve on this head is 5989695146. Everything below is something the earlier comments on this head explicitly left unverified, or a result I obtained by execution rather than by reading the diff.

Executed, not inferred

  • 227 tests passed on this head in a clean checkout of the PR branch: test_apps_module_migrations, test_mindie_context, test_mindie_project, test_mindie_runtime, test_package_root_inventory, test_target_module_import_gate, test_first_wave_isolation_policy.
  • I built a wheel from this head and installed it into a fresh virtual environment with no checkout on sys.path, then ran tests/check_installed.py there: exit 0, installed package resolved under site-packages, resource inventory 761 files. Both layouts ship — apps/integrations/mindie/* carries the implementations (3.6–10.7 KB) and apps/mindie/* carries the shims (86–323 B). The installed-path claims hold against an actual install, not only against the checker source.

The four claims the author asked to be checked

  1. Pure move. git diff base:apps/mindie/<m>.py head:apps/integrations/mindie/<m>.py is empty for project, context and read_worker, and a single from ... import __version__ → from .... import __version__ line for mcp. Nothing else in the five bodies moved.
  2. Shim identity and pickling. All 11 exported names across context, project, mcp and read_worker are the same objects (is) through the legacy and canonical paths. ReadFailure.__module__ is the canonical module, and a pickle whose GLOBAL names inferrsi.apps.mindie.project still loads and yields that same canonical class — I produced one by rewriting __module__ before dumping, then loaded it back. The repository's own migration test covers the protocol-0 GLOBAL round trip for every class and function export, so this is now pinned, not just observed.
  3. Worker launch. _WORKER = Path(__file__).with_name("read_worker.py") exists only in the canonical project.py, and the launcher keeps -I -B, the private 0700 working directory, the popped MINDIE_BENCH_WORKSPACE, the 20 s timeout and the 2 MiB cap. I also ran the legacy file by path: it stops with ImportError: attempted relative import with no known parent package. It cannot half-start and produce a confusing partial read.
  4. Inventory. 16 → 21 entries. A structural diff of the JSON between base and head shows no entry removed, no field of an existing entry changed, and exactly the five MindIE entries appended, so the two tests/test_benchmark_preparation.py consumers introduced with feat(benchmark): add frozen P1 preparation port #530 (archive, bridge) are untouched. Entry shape matches content: the legacy package exports nothing, so it correctly carries package: true with exports: [] and no module_exports, unlike Cannbot's.

Residual references. Earlier comments noted that a repo-wide sweep was not possible from the seeded diff. It is possible against a checkout: I grepped the whole tree for apps.mindie and apps/mindie. Outside the shim directory there are 16 hits, all historical or declarative — six CHANGELOG lines describing the #452 move, the five new inventory entries, one docs/module-layout.md sentence, and three test allowlists that pin the legacy names as paths that must not import or must exist only as shims. No live import of the legacy path remains in src/, tests/ or docs/.

CI. Required run 44702208635 is now complete and green on aba9b10c: full-check 3.10 and 3.11, installed-package 3.10 and 3.11, dashboard-browser, pr-references, host-compatibility on both runners, lint-and-smoke, plus declarations and knowledge-model-policy on 44702494570. The "still queued, do not count it" caveat in the earlier notes is resolved.

Non-blocking

  • docs/module-layout.md says legacy worker paths "retain Python import compatibility". That is true of import inferrsi.apps.mindie.read_worker, but the file is no longer runnable by path. Anyone reading the sentence as "the old launcher still works" gets an ImportError; "importable as a module but not runnable as a script" would remove the ambiguity. The accompanying test pins that the shipped legacy file is a shim, so only the prose is loose.
  • The 158-byte legacy read_worker.py shim ships in the wheel. It is the one artifact a person can reach by the old path and be surprised by; harmless while the shim exists, worth remembering when shims are retired in their own PR.

检查范围:read the full base→head diff, the five shim files, the five canonical files, docs/apps-module-migrations.json, docs/module-layout.md, docs/architecture.md, docs/external-channels.md, tests/check_installed.py and the seven affected test modules; ran the 227 tests, the wheel build and the installed-package checker in a fresh venv. Did not run the Windows or macOS host-compatibility jobs, the dashboard browser job, or any MindIE engine against real hardware.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Independent third-party tip COMMENT (cursor[bot]; not Approve / not Request changes).

Technical verify only — collaborator permission none; not write+ / dual-tip / merge-ready.

Tip aba9b10c9395d22aa0cbc446a0f592843040dbc5 still carries Dong1017 + amy-why-3459 tip Approves and Ready tip green, but GitHub mergeable state is CONFLICTING/DIRTY against current main. Cursor does not re-Approve dual-clean tip Approves while the tip is unchanged, and cannot merge with permission none.

Steward note

Author rebase/resolve conflicts onto current main; Approves will dismiss on push — then write+ independent re-verify + steward merge. No formal second-vote from cursor until a clean tip is reviewable again.

Preserve managed round knowledge status and canonical MindIE paths.

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

Copy link
Copy Markdown
Contributor Author

@Dong1017 @amy-why-3459 @david6666666 已按请求解决与最新 main 的冲突,请重新检视当前 52dc31927fba2c9cb2b4b5716d3dd3400cbea17e(base 6bdc86ee339c3007f15833434065adf893bff953)。GitHub 已确认 mergeable=true;保持正式 Ready,使用正常 merge/push 保留分支历史。

本次唯一手工冲突在 docs/external-channels.md 的能力表:同时保留 #523 的 managed benchmark / AB/BA round / Dashboard attribution 行,以及本 PR 的 apps/integrations/mindie/ 路径。CLI 自动合并后仍完整保留主线的 round knowledge 调用与两处 MindIE canonical 导入;main 的原 16 项迁移登记逐项保持,另加原有 5 项 MindIE 登记。相对 main 仍为同一 24 文件迁移切片(完整补丁 93,291 字节);MindIE 实现及 shim 文件与原批准版本 aba9b10c 没有改动。

全树 Ruff、whitespace、源码等价与主线登记保留检查已通过;适配器/迁移/隔离与 optimization-session/project/round-citation 回归、独立 sdist→wheel→新环境安装检查正在运行,实际结果将回填正文。新 head 的 Ready CI 44744051129 运行中,尚未计为通过。

原 Dong / Amy 在 aba9b10c 上的正式批准已被 GitHub dismissed,不计入当前 head。请独立复核本次合并及完整当前 diff;无阻塞项时提交首个非空行独立为 LGTM 的正式 Approve。仍按两份有效独立 write+ 批准、必需 CI 通过及无阻塞意见后合入。

amy-why-3459
amy-why-3459 previously approved these changes Nov 20, 2026

@amy-why-3459 amy-why-3459 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 aba9b10c9395d22aa0cbc446a0f592843040dbc5 → 52dc31927fba2c9cb2b4b5716d3dd3400cbea17e(PR base 6bdc86ee339c3007f15833434065adf893bff953)。

本次是将已合入的 #523(main 6bdc86ee)合并进先前已通过的 MindIE 迁移,无重写历史。增量 21 个文件全部来自主线及冲突处理;相对当前 main 的 unique diff 仍为同一 24 文件切片。MindIE 实现与 shim 未出现在 aba9b10c…52dc3192 的差异中,与原批准版本一致。

冲突处理与合并结果已核对:

  • docs/external-channels.md:保留 #523 的 managed round / Dashboard attribution 行与正文,MindIE 行仅将路径更新为 apps/integrations/mindie/。
  • CLI:相对 main 仅两处 MindIE import 改为 canonical(integrations.mindie.project.dispatch / integrations.mindie.context.export_context);#523 的 _optimization_session、--cannbot-platform 与 knowledge-read 完整保留。
  • 迁移表:main 的 16 项(含 #523 为 cannbot 条目新增的 consumers)作为 JSON 值保持不变,其后追加原有 5 项 MindIE 登记,共 21 项。

这是目录迁移加主线冲突刷新,不改变 MindIE 授权、读取或数值行为,准确率/性能对照实验不适用。架构落点与已合入的 Cannbot 切片一致,本增量未引入多余测试或无关改动。

未在本机重跑测试或独立 sdist→wheel。当前 head 上 lint-and-smoke、declarations、pr-references、installed-package 3.10/3.11、dashboard-browser 及 host-compatibility 已为 success;Ready CI 44744051129 中 full-check 3.10/3.11 仍在运行,合入前应等待其通过。提交前已重新拉取本 head 的 review 与评论:当前 head 上尚无新的正式 review;仅有作者请重新检视的评论(7040753553),以及针对旧 head 冲突的 cursor[bot] COMMENT(现已解决)。无未解除的 CHANGES_REQUESTED 或其它阻塞性意见。

Copy link
Copy Markdown
Contributor Author

52dc3192 复验已完成:适配器/迁移/隔离/清单及 optimization-session、project-optimization、round-citation 消费方组合 404 passed、9 skipped、332 subtests passed(Windows / Python 3.12)。9 个跳过的具体环境缺口已补正文;全树 Ruff、whitespace、主线登记保留及源码等价检查通过。

本 head 的独立 sdist→wheel→新环境、checkout 外 -I installed checker 通过,761 resources / 136 source-grounded records,资源摘要 fecd92abf06092c094d6ce3346a66b7b1ac0dd1ec936794488bfe93c5fb0e015。正文和 #490/#371 已同步当前 head 及结果。

重新发起的检视请求 对应本 head;当前 Ready CI 的安装包/浏览器/PR 引用已通过,两项全量检查仍运行,旧批准不计入当前合入条件。

Dong1017
Dong1017 previously approved these changes 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 6bdc86ee339c3007f15833434065adf893bff953 and head 52dc31927fba2c9cb2b4b5716d3dd3400cbea17e (full 24-file diff, diffComplete: true). This is the first formal decision on this head: both earlier approvals (5989695146, 5989836026) were dismissed at aba9b10c, and pr/prior-reviews.md records no APPROVED review on 52dc3192 and no outstanding CHANGES_REQUESTED, so nothing earlier is being confirmed here. I also read #490 to check the accepted clause text against what the patch does.

Scope matches the accepted 4b slice. #490 clause 10 (canonical worker location, registered launchers on the canonical file, shims for registered Python imports), clause 2 (explicit static re-export shims with literal __all__, import-free initializers), clause 3 (per-module old/canonical/exports/consumers registration) and clause 5 (__module__ / definition-location assertions moved with the code) are what this diff implements.

Move equivalence, read from the diff

  • apps/integrations/mindie/{context,project,read_worker}.py are line-for-line identical to the removed apps/mindie/* bodies.
  • mcp.py differs by exactly one line: from ... import __version__ → from .... import __version__. Four dots from inferrsi.apps.integrations.mindie.mcp land on inferrsi, so the server-version reply still reads inferrsi.__version__.
  • _WORKER = Path(__file__).with_name("read_worker.py") now exists only in the canonical project.py; the launcher keeps -I -B, the 0700 private cwd, the popped MINDIE_BENCH_WORKSPACE, the 20 s timeout and the 2 MiB cap. Grant schema, read-only SQLite URI and receipt/session_sha256 behaviour are unchanged.

Shims and identity. apps/mindie/{context,project,mcp,read_worker}.py are import + literal __all__ only — 2 / 7 / 1 / 1 names — and each set equals the exports of its new inventory entry. apps/mindie/__init__.py is a docstring plus __all__ = [] with no import, matching package: true, exports: []. Legacy pickles naming inferrsi.apps.mindie.* still resolve to the same canonical objects.

Merge resolution is verifiable, not just asserted. Against the new base the PR changes exactly two import lines in apps/cli/__init__.py (316, 630), so #523's round-knowledge CLI path is untouched; docs/external-channels.md changes exactly the MindIE capability row, with #523's managed benchmark / AB-BA / Dashboard attribution row intact in the hunk; docs/apps-module-migrations.json is a pure append (+84 / −0) to 21 entries, so main's 16 entries are preserved and both #530 Benchmark prepare consumers are undisturbed. The architecture.md / module-layout.md edits are path and prose only.

Tests. Consumer imports repointed in test_mindie_{context,project,runtime}.py; test_mindie_runtime.py's subprocess source becomes Path(__file__).parents[1] / "src", which is the same directory the old project.__file__ parents[3] produced and no longer depends on package depth; the launcher test is parametrized to cannbot + mindie (cannbot's existing pass shows that assertion set tolerates shim-form legacy modules); inferrsi.apps.integrations.mindie is added to the import-free-initializer test; import-gate and first-wave path lists gain the canonical files; test_package_root_inventory.py pins the four files under apps/integrations/mindie/ plus an initializer with no ast.Import/ImportFrom. check_installed.py now runs the stdlib-only/runpy worker probe against both canonical workers — correct, since the mindie worker body imports only stdlib and the legacy apps/mindie/read_worker.py now carries a relative import and must not be probed that way — and its allowed module set is captured before mcp is imported, so the new inferrsi.apps.integrations entry is the right one.

Not verified here. I read the seeded diff and files only: no checkout, no test run, no wheel/sdist build, no repo-wide grep for residual apps.mindie references outside these 24 files. At review time the author's adapter/migration and fresh-install results for this head were still running and required CI 44744051129 was queued, so I do not count either as passed — this approval asserts the diff is correct, not that the head's checks are green. Note the residual-reference risk is bounded anyway: a stale legacy import outside the diff still resolves through these shims; only the worker-by-path case would fail, and those launchers are canonical.

Non-blocking

  • docs/module-layout.md still says "Legacy worker paths retain Python import compatibility; external interpreters are launched against the canonical files". True, but python apps/mindie/read_worker.py now ends in ImportError: attempted relative import with no known parent package. #490's acceptance asked for either "old worker file paths are not supported" or a runnable shim; the sentence states the launch rule without stating the failure. Same nit as on aba9b10c; the retirement PR is the natural place to make it explicit.
  • The apps/integrations/mindie/ row in the same file's layout table still says "M1 (#452) moved the four root MindIE files here". architecture.md got the correction ("M1 moved … into Apps; #490 groups it at apps/integrations/mindie/"); that table row did not.

Merge gating. This is one approval. A second valid independent write+ approval is still required, along with green required checks on 52dc3192; the retired-shim follow-up and #490 step 5 stay separate. This PR does not complete #490 or #371.

I will re-read on the next push.


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

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Independent third-party tip COMMENT (cursor[bot]; not Approve / not Request changes).

Technical verify only — collaborator permission none; not write+ / dual-tip / merge-ready.

Head moved aba9b10c… → 52dc31927fba2c9cb2b4b5716d3dd3400cbea17e since INF-89 tip COMMENT. Tip Approves: Dong1017 (<!-- always-on-bot:v1 -->) + amy-why-3459. Ready tip checks green on this head.

Still DIRTY: mergeable=CONFLICTING / mergeStateStatus=DIRTY against base 6bdc86ee…. Withholding formal Approve while conflicts remain. After author rebase to a clean tip, write+ re-verify / steward merge can proceed; cursor may second-verify the clean tip then.

Not claiming #490 step completion.

Keep Anthropic integration and Apps artifact ownership alongside canonical MindIE paths.

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

Copy link
Copy Markdown
Contributor Author

@Dong1017 @amy-why-3459 @david6666666 请复审新 head f603309dad6f6327142ffcdaee6b0c2c7681aeae / base 6ed42af83a69f13fe88aaf0426ab8ef4f8ac7654。已解决新主线 #535/#533 带来的冲突,GitHub 确认 mergeable=true;当前仍为正式 Ready,正常 merge/push,未重写历史。

唯一手工冲突在 docs/architecture.md:同时保留 Anthropic 集成、Apps 根级 artifacts 工具与 integrations/mindie/。自动合并的安装器/导入隔离/根清单检查已逐项检查,保留主线新增约束;main 原 16 项迁移表作为 JSON 值保持不变,追加原 5 项 MindIE。相对 main 仍只有原 24 文件切片(93,344 字节,+835/-712),MindIE 实现及 shim 与旧批准版本 52dc3192 无变动,五个实现体与 main 对照仅原有 MCP import 深度变化。

全树 Ruff / whitespace / 原有文件集及主线条目保留检查通过。当前 head 的适配器/迁移/隔离 + 模块边界/产物工具复制/跨进程锁组、独立 sdist→wheel→新环境安装检查运行中,结果补正文;Ready CI 44865872257 已排队。旧 404 项等记录保持原版本,不冒充本次复跑。

请针对当前 head 独立复核;通过时提交首个非空行独立为 LGTM 的正式 Approve。已核实 Dong/Amy 均为 write、均非本 Apps 切片作者或 accountable parent。旧 head 的票不计新提交;本次拿到两份有效批准、必需 CI 全部通过且无阻塞意见后即 squash 合入。

Copy link
Copy Markdown
Contributor Author

当前 f603309d 复验结果已补正文:346 passed、7 skipped、332 subtests passed,覆盖适配器/迁移/导入隔离及 #535 共同修改的模块边界、产物工具复制、跨进程锁;全树 Ruff / whitespace / 主线条目保留 / 五个实现体等价检查通过。

本次 sdist→wheel→全新环境、checkout 外 -I 安装检查已通过(761 资源 / 136 记录;资源摘要 fecd92abf06092c094d6ce3346a66b7b1ac0dd1ec936794488bfe93c5fb0e015)。首次本地调用漏传主线新增的 probe/fixture 环境变量而停止,随后只补齐调用参数,使用同一 wheel 完成复跑;未修改源码、检查断言或 CI。

Ready CI 的安装包 3.10/3.11、Dashboard browser、PR 引用均 success,两项 full-check 仍运行;knowledge policy success。待当前 head 两份有效独立正式批准和必需 CI 完成后立即 squash 合入。

@amy-why-3459 amy-why-3459 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 6ed42af and head f603309.
Reviewed increment 52dc319 → f603309.

本次将已合入的 #535(Apps artifact/provider ownership)与 #533(文档刷新)并入先前已通过的 MindIE 迁移,无重写历史。相对当前 main 6ed42af8 的 unique diff 仍为同一 24 文件切片。MindIE 实现与 shim 未出现在 52dc3192…f603309d 的差异中,与原批准版本一致。

冲突处理已核对:唯一手工冲突在 docs/architecture.md 目录图,已同时保留 main 的 integrations/anthropic/ 与根级 apps/artifacts.py,并将 MindIE 放在 integrations/mindie/。docs/module-layout.md 与 docs/external-channels.md 的路径亦更新为 canonical MindIE 位置,main 新增的 Anthropic/artifact 约束得以保留。

这是目录迁移加主线冲突刷新,不改变 MindIE 授权、读取或数值行为,准确率/性能对照实验不适用。本增量未引入多余测试或无关改动。

未在本机重跑测试或独立 sdist→wheel。作者在评论 7057275080 中补充了本 head 的本地复验:346 passed、7 skipped、332 subtests passed,以及 sdist→wheel→新环境安装检查通过(761 资源 / 136 记录,摘要 fecd92abf06092c094d6ce3346a66b7b1ac0dd1ec936794488bfe93c5fb0e015)。当前 head 上 lint-and-smoke、declarations、pr-references、installed-package 3.10/3.11、dashboard-browser 及 host-compatibility 已为 success;Ready CI 44865872257 中 full-check 3.10/3.11 仍在运行,合入前应等待其通过。提交前已重新拉取本 head 的 review 与评论:当前 head 上尚无正式 review;新评论仅补充本地复验结果,无 CHANGES_REQUESTED 或其他阻塞性意见。

Copy link
Copy Markdown
Contributor Author

@Dong1017 @david6666666 当前 head f603309dad6f6327142ffcdaee6b0c2c7681aeae 的 Ready CI 44865872257 已全部通过:Python 3.10/3.11 各 5715 passed、31 skipped、674 subtests,两项安装包、Dashboard browser、PR 引用均 success;declarations、lint-and-smoke、knowledge policy 也通过。两宿主 advisory 成功。

当前已有 @amy-why-3459 对该 head 的正式 LGTM Approve,仍差第二份有效独立批准。请针对已解决冲突的当前 24 文件切片复审;如无阻塞项,请提交首个非空行独立为 LGTM 的正式 Approve。若有意见,直接记录,我先修复。GitHub 目前 mergeable=true,未再改 head;第二票符合要求后即按请求方授权 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.

LGTM

PR review verdict — PASS
Reviewed base 6ed42af83a69f13fe88aaf0426ab8ef4f8ac7654 and head f603309dad6f6327142ffcdaee6b0c2c7681aeae (full diff, diffComplete: true, 24 files). Dong-bot (authorized delegate). My earlier approvals were dismissed on older heads, so this is a fresh read of the current head. The seeded record shows @amy-why-3459 APPROVED on this exact head and no outstanding CHANGES_REQUESTED.

Read from the diff

  • Pure move. The removed apps/mindie/{context,project,read_worker}.py bodies match the added apps/integrations/mindie/* bodies line for line. mcp.py differs by one line: from ... import __version__ → from .... import __version__. Four dots from inferrsi.apps.integrations.mindie.mcp reach inferrsi, so the MCP server version still reads inferrsi.__version__.

  • Worker launch is unchanged. _WORKER = Path(__file__).with_name("read_worker.py") now exists only in the canonical project.py. The launcher keeps -I -B, the 0700 private cwd, the popped MINDIE_BENCH_WORKSPACE, the 20 s timeout and the 2 MiB cap.

  • Shims. Each legacy module is an explicit static re-export with a literal __all__:

    • context: MAX_BYTES, export_context
    • project: 7 names
    • mcp: serve
    • read_worker: read
    • apps/mindie/__init__.py is __all__ = [] with no imports.

    Each list matches the exports of its inventory entry.

  • Inventory. Five MindIE entries are appended after the existing 16: the package plus context, project, mcp and read_worker. The diff hunk adds only; it touches no earlier entry. The consumers lists match the actual importers (the CLI, mcp.py, project.py and the tests).

  • CLI. Only the two MindIE imports change, to the canonical ..integrations.mindie.* paths. The diff shows no other CLI change.

  • Tests and the installed check.

    • test_mindie_runtime.py derives the source path from Path(__file__).parents[1] / "src". The old mindie_project.__file__.parents[3] would be one level off after the move, so this change is needed and correct.
    • check_installed.py now probes both the cannbot and mindie canonical read_worker.py files and the canonical MindIE package.
    • The migration and initializer tests are parametrized for mindie.
  • Main's new constraints are kept. The one manual conflict is the docs/architecture.md directory diagram. It keeps integrations/anthropic/ and root artifacts.py and places mindie/ under integrations/. The diff shows no removal of the #535 or #533 content in the other files.

Not verified by me

  • I did not run tests or a fresh sdist→wheel build on this head. The author reports 346 passed, 7 skipped and 332 subtests, plus an installed-package check (761 resources / 136 records). I took those as the author's claims, not my own results.
  • Per the PR body, Ready CI run 44865872257 had full-check 3.10/3.11 still pending. Merge should wait for those required checks to go green. The approval does not replace them.
  • I did not run MindIE against real hardware.

Non-blocking

  • The wording in docs/module-layout.md that legacy worker paths "retain Python import compatibility" is carried over. It is true for import, but the legacy file is no longer runnable by path. Consider "importable, not runnable as a script" in a later docs pass.

No blockers found. With Amy's approval on this head plus this one, the two-approval requirement is met. Remaining gate: required CI.


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

@zengchuang-hw
zengchuang-hw merged commit 13a9953 into main Nov 21, 2026
14 checks passed

Copy link
Copy Markdown
Contributor Author

已按请求方授权 squash 合入,main 提交 13a9953ac682f831d5be6d9489c9092779410295,合入时间 2026-11-21 12:47(Asia/Shanghai)。合入后的 Git tree 与检视/CI head f603309dad6f6327142ffcdaee6b0c2c7681aeae 完全相同(22a2ef32ba2a68a5e1a3b34525dcffed5a8aacc3)。

合入前再次核实:

  • Amy 正式批准与 Dong 正式批准 的原始 commit_id 均为 f603309d,首个非空行为 LGTM;两账户 permission=write,均非本 Apps 切片作者/parent,计两份有效独立批准。
  • Ready CI 全部成功,Python 3.10 / 3.11 各 5715 passed、31 skipped、674 subtests;原始 check-runs 中 declarations / lint-and-smoke 等均 success,knowledge policy success。
  • GitHub mergeable=true,无未解决检视线程或新的阻塞意见,按期望 head 执行 squash,未绕过合入规则。

Dong 的旧 worker 路径文案建议为 non-blocking,已在下一步验收分支明确成“importable compatibility shims, not runnable scripts”。本次完成 #490 第四步,随后独立提交第五步固定记录组合验收;#490 和 #371 整体验收保持打开。

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.

3 participants