Repository navigation
feat: add Xiaomi MiMo Code integration - #4267
Mahdifotohi wants to merge 5 commits into
Conversation
|
Thanks for the pull request, @Mahdifotohi. A maintainer will review it soon. Want to talk it through while it is in review? Come join us on our Discord server. For longer-form discussion there is also GitHub Discussions. A couple of things that speed up review: make sure the test suite passes on Python 3.10 and 3.13, and that the change keeps extraction deterministic. |
e11646f to
e4f629a
Compare
There was a problem hiding this comment.
Graphify reviewed this change.
Worth a look — the grounded gate found no coupling regressions or blocking issues, but 5 advisory finding(s) below merit a look before merge.
Not checked: tests were not run; no formal proof of the changed code.
Graphify review — findings
Adds Xiaomi MiMo Code support via graphify mimo install|uninstall|status [--project]. It installs the skill into .mimocode/skills/ or the global config dir (MIMOCODE_HOME/config, else XDG, else ~/.config/mimocode), using the PowerShell skill on Windows. It also registers a chat.message/tool.execute.before plugin in mimocode.json that runs a bounded graphify query and injects graph context before the model responds, and writes always-on guidance to AGENTS.md; detection now skips the installed .mimocode/plugins/graphify.js so it never lands in the graph.
Worth a look
- Installing the MiMo plugin can erase the user's mimocode.jsonc settings —
graphify/install.py:1820· Escalate · high- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- Project-scoped mimo uninstall also removes the global plugin —
graphify/install.py:2275· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- Uninstall deregisters any third-party plugin whose path ends in plugins/graphify.js —
graphify/install.py:1880· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- Help advertises
mimosubcommands but this diff adds no CLI dispatch for them —graphify/__main__.py:940· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- MiMo Windows uninstall removes a different skill id than install writes —
graphify/install.py· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
Review partial — this diff was larger than one review pass covers, so later files were not reviewed; some findings may be missing.
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 3735 functions depend on the 1073 functions this change touches.
Health — this change adds coupling hotspots:
- worse:
install()— 17 callers, 12 callees - worse:
dispatch_install_cli()— 5 callers, 34 callees - worse:
_copy_skill_file()— 19 callers, 7 callees - new:
_mimo_install()— 12 callers, 8 callees - worse:
_project_uninstall()— 6 callers, 14 callees - worse:
_project_install()— 4 callers, 14 callees - new:
_mimo_uninstall()— 8 callers, 6 callees - worse:
_agents_install()— 6 callers, 7 callees - …and 3 more — each is listed as a finding
Verification — 3735 functions in the blast radius were not formally verified this run (proofs are advisory here).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 1867 function(s) in the blast radius were not formally verified this run
Test selection
Test selection
359 of 359 test file(s) selected (100%) via static blast radius.
Escalated to a full run for safety — the selection is not trustworthy on its own (see below). CI should run the whole suite.
tests/test_affected_cli.py— impact, full-run-safetytests/test_affected_member_seed.py— full-run-safetytests/test_agents_platform.py— impact, full-run-safetytests/test_analyze.py— full-run-safetytests/test_anthropic_custom_endpoint.py— full-run-safetytests/test_antigravity_install.py— full-run-safetytests/test_apm_fallback_version.py— full-run-safetytests/test_architecture_doc.py— full-run-safetytests/test_astro_extraction.py— impact, full-run-safetytests/test_astro_import_ids.py— full-run-safetytests/test_atomic_canvas_export.py— full-run-safetytests/test_atomic_version_stamp.py— impact, full-run-safetytests/test_atomic_writes.py— impact, full-run-safetytests/test_backend_env_isolation.py— full-run-safetytests/test_backend_extras.py— full-run-safetytests/test_benchmark.py— full-run-safetytests/test_benchmark_raw_graph.py— full-run-safetytests/test_blade_extractor.py— full-run-safetytests/test_build.py— impact, full-run-safetytests/test_build_located_semantic_identity.py— full-run-safetytests/test_build_merge_dedup_scope.py— full-run-safetytests/test_build_merge_hyperedges_and_prune.py— full-run-safetytests/test_build_merge_shrink_guard.py— full-run-safetytests/test_builtin_global_type_refs.py— full-run-safetytests/test_cache.py— full-run-safetytests/test_cache_stale_import_target.py— full-run-safetytests/test_callflow_html.py— full-run-safetytests/test_cargo_introspect.py— impact, full-run-safetytests/test_cargo_missing_manifest.py— full-run-safetytests/test_carried_hyperedge_remap.py— full-run-safetytests/test_case_sensitive_resolution.py— full-run-safetytests/test_charmap_encoding.py— impact, full-run-safetytests/test_chunking.py— impact, full-run-safetytests/test_cjs_module_extension.py— impact, full-run-safetytests/test_claude_cli_backend.py— impact, full-run-safetytests/test_claude_md.py— impact, full-run-safetytests/test_cli_broken_pipe.py— full-run-safetytests/test_cli_export.py— full-run-safetytests/test_cli_help.py— full-run-safetytests/test_cloud_cta.py— full-run-safetytests/test_cluster.py— full-run-safetytests/test_cluster_ambiguous_scale.py— full-run-safetytests/test_cluster_exclude_hubs.py— full-run-safetytests/test_cobol_extractor.py— full-run-safetytests/test_codebuddy.py— impact, full-run-safetytests/test_community_hub_labels.py— full-run-safetytests/test_community_labels_skill.py— full-run-safetytests/test_confidence.py— full-run-safetytests/test_corrupt_graph_json.py— full-run-safetytests/test_cpp_method_declarations.py— full-run-safety- … and 309 more
non-code file(s) changed (
ARCHITECTURE.md,README.md) → running the full suite for safety (a code graph can't see config/fixture/data deps)
changed code file(s) with no mapped test (
ARCHITECTURE.md,README.md) — a coverage gap or a missing link — running the full suite rather than only the selected tests
Selection is safe under the controlled-regression assumption; always-run tests + a periodic full run are the backstops. Advisory — it never changes the check verdict.
· 3 grounded finding(s) anchored inline below; 8 more finding(s) on lines outside this diff (see the check run).
Co-Authored-By: Gemini (via AGY)
Co-Authored-By: Gemini (via AGY)
e4f629a to
8d045b0
Compare
Co-Authored-By: Gemini (via AGY)
There was a problem hiding this comment.
Graphify reviewed this change.
Code graph out of date: Health delta baseline: last indexed commit 2cb81c6 (diverged from this PR's base — delta is approximate). Impact and hotspot numbers below may be wrong.
Formal verification could not match the changed code to the code graph, so it may not have checked the code this PR changed.
Worth a look — the grounded gate found no coupling regressions or blocking issues, but 3 advisory finding(s) below merit a look before merge.
Not checked: tests were not run; formal verification proved 0 of 10 changed function(s) (4 sampled, not proven, 6 not verified).
Formal verification. PR-changed functions: 4/10 verified (0 proven, 4 may-equivalent, 0 distinguished) · 6 not verified (5 vacuous, 1 unsupported).
Not verified on this run: \_agents\_install (vacuous: never exercised), \_platform\_skill\_destination (vacuous: never exercised), \_project\_install (vacuous: never exercised), \_project\_uninstall (vacuous: never exercised), install (vacuous: never exercised), uninstall\_all (unsupported).
Graphify review — findings
Adds a Xiaomi MiMo Code integration (graphify mimo install|uninstall|status [--project]) that installs the Graphify skill, writes persistent AGENTS.md instructions, and registers a chat.message/tool.execute.before plugin in mimocode.json. The plugin queries graph.json and injects bounded graph context before the model responds. Global installs resolve through _mimo_global_config_dir (MIMOCODE_HOME/config, then XDG_CONFIG_HOME/mimocode, then ~/.config/mimocode), Windows swaps in the PowerShell skill bundle, and detection skips the installed .mimocode/plugins/graphify.js so it never gets indexed.
Worth a look
- MiMo plugin executes unqualified graphify binary from workspace cwd —
graphify/install.py:1709· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- Comma inserted after a trailing line comment when adding the plugin key to the root object —
graphify/install.py· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
- Install silently overwrites a non-list/non-string
pluginvalue in mimocode.json —graphify/install.py· Escalate · medium- agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review
Review partial — this diff was larger than one review pass covers, so later files were not reviewed; some findings may be missing.
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 3791 functions depend on the 1129 functions this change touches.
Health — this change adds coupling hotspots:
- worse:
dispatch_install_cli()— 6 callers, 34 callees - worse:
install()— 17 callers, 12 callees - new:
_mimo_install()— 18 callers, 9 callees - worse:
_copy_skill_file()— 19 callers, 7 callees - new:
_mimo_uninstall()— 18 callers, 6 callees - worse:
_project_uninstall()— 6 callers, 14 callees - worse:
_project_install()— 4 callers, 14 callees - worse:
_agents_install()— 6 callers, 7 callees - …and 4 more — each is listed as a finding
Verification — 3791 functions in the blast radius were not formally verified this run (proofs are advisory here).
Health delta baseline: last indexed commit 2cb81c6 (diverged from this PR's base — delta is approximate).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 1923 function(s) in the blast radius were not formally verified this run
Test selection
Test selection
359 of 359 test file(s) selected (100%) via static blast radius.
Escalated to a full run for safety — the selection is not trustworthy on its own (see below). CI should run the whole suite.
tests/test_affected_cli.py— impact, full-run-safetytests/test_affected_member_seed.py— full-run-safetytests/test_agents_platform.py— impact, full-run-safetytests/test_analyze.py— full-run-safetytests/test_anthropic_custom_endpoint.py— full-run-safetytests/test_antigravity_install.py— full-run-safetytests/test_apm_fallback_version.py— full-run-safetytests/test_architecture_doc.py— full-run-safetytests/test_astro_extraction.py— impact, full-run-safetytests/test_astro_import_ids.py— full-run-safetytests/test_atomic_canvas_export.py— full-run-safetytests/test_atomic_version_stamp.py— impact, full-run-safetytests/test_atomic_writes.py— impact, full-run-safetytests/test_backend_env_isolation.py— full-run-safetytests/test_backend_extras.py— full-run-safetytests/test_benchmark.py— full-run-safetytests/test_benchmark_raw_graph.py— full-run-safetytests/test_blade_extractor.py— full-run-safetytests/test_build.py— impact, full-run-safetytests/test_build_located_semantic_identity.py— full-run-safetytests/test_build_merge_dedup_scope.py— full-run-safetytests/test_build_merge_hyperedges_and_prune.py— full-run-safetytests/test_build_merge_shrink_guard.py— full-run-safetytests/test_builtin_global_type_refs.py— full-run-safetytests/test_cache.py— full-run-safetytests/test_cache_stale_import_target.py— full-run-safetytests/test_callflow_html.py— full-run-safetytests/test_cargo_introspect.py— impact, full-run-safetytests/test_cargo_missing_manifest.py— full-run-safetytests/test_carried_hyperedge_remap.py— full-run-safetytests/test_case_sensitive_resolution.py— full-run-safetytests/test_charmap_encoding.py— impact, full-run-safetytests/test_chunking.py— impact, full-run-safetytests/test_cjs_module_extension.py— impact, full-run-safetytests/test_claude_cli_backend.py— impact, full-run-safetytests/test_claude_md.py— impact, full-run-safetytests/test_cli_broken_pipe.py— full-run-safetytests/test_cli_export.py— full-run-safetytests/test_cli_help.py— full-run-safetytests/test_cloud_cta.py— full-run-safetytests/test_cluster.py— full-run-safetytests/test_cluster_ambiguous_scale.py— full-run-safetytests/test_cluster_exclude_hubs.py— full-run-safetytests/test_cobol_extractor.py— full-run-safetytests/test_codebuddy.py— impact, full-run-safetytests/test_community_hub_labels.py— full-run-safetytests/test_community_labels_skill.py— full-run-safetytests/test_confidence.py— full-run-safetytests/test_corrupt_graph_json.py— full-run-safetytests/test_cpp_method_declarations.py— full-run-safety- … and 309 more
non-code file(s) changed (
ARCHITECTURE.md,README.md) → running the full suite for safety (a code graph can't see config/fixture/data deps)
changed code file(s) with no mapped test (
ARCHITECTURE.md,README.md) — a coverage gap or a missing link — running the full suite rather than only the selected tests
Selection is safe under the controlled-regression assumption; always-run tests + a periodic full run are the backstops. Advisory — it never changes the check verdict.
Formal verification
No difference found (not proven): No behavior difference found in \_run\_cli (not a proof).
The verifier ran both versions of \_run\_cli on many inputs and saw identical behavior every time. Strong evidence the change is safe, but evidence, not a proof.
Guarantee: Empirical: differential testing (both versions run on many generated inputs). A divergence on an untested input remains possible, so this is 'no counterexample found', not 'proven equivalent'.
Note: An input the sampler did not try could still differ.
Could not verify: Could not verify \_agents\_install.
The verifier did not have enough to check \_agents\_install, so it is saying so rather than guessing. No false assurance is the whole point.
Guarantee: No guarantee either way, this is an honest abstention, not a pass.
Note: Reason: no capturable inputs from the test suite; property tier: not verifiable: all 220 sampled inputs raised on both versions — the function never executed, so 'no divergence' would be vacuous (mostly NameError — names the real obstacle, not a sampling gap)
No difference found (not proven): No behavior difference found in \_agents\_uninstall (not a proof).
The verifier ran both versions of \_agents\_uninstall on many inputs and saw identical behavior every time. Strong evidence the change is safe, but evidence, not a proof.
Guarantee: Empirical: differential testing (both versions run on many generated inputs). A divergence on an untested input remains possible, so this is 'no counterexample found', not 'proven equivalent'.
Note: An input the sampler did not try could still differ.
No difference found (not proven): No behavior difference found in \_install\_codex\_hook (not a proof).
The verifier ran both versions of \_install\_codex\_hook on many inputs and saw identical behavior every time. Strong evidence the change is safe, but evidence, not a proof.
Guarantee: Empirical: differential testing (both versions run on many generated inputs). A divergence on an untested input remains possible, so this is 'no counterexample found', not 'proven equivalent'.
Note: An input the sampler did not try could still differ.
Could not verify: Could not verify \_platform\_skill\_destination.
The verifier did not have enough to check \_platform\_skill\_destination, so it is saying so rather than guessing. No false assurance is the whole point.
Guarantee: No guarantee either way, this is an honest abstention, not a pass.
Note: Reason: no capturable inputs from the test suite; property tier: not verifiable: all 41 sampled inputs raised on both versions — the function never executed, so 'no divergence' would be vacuous (mostly KeyError — names the real obstacle, not a sampling gap)
Could not verify: Could not verify \_project\_install.
The verifier did not have enough to check \_project\_install, so it is saying so rather than guessing. No false assurance is the whole point.
Guarantee: No guarantee either way, this is an honest abstention, not a pass.
Note: Reason: no capturable inputs from the test suite; property tier: not verifiable: all 218 sampled inputs raised on both versions — the function never executed, so 'no divergence' would be vacuous (mostly SystemExit — names the real obstacle, not a sampling gap)
Could not verify: Could not verify \_project\_uninstall.
The verifier did not have enough to check \_project\_uninstall, so it is saying so rather than guessing. No false assurance is the whole point.
Guarantee: No guarantee either way, this is an honest abstention, not a pass.
Note: Reason: no capturable inputs from the test suite; property tier: not verifiable: all 218 sampled inputs raised on both versions — the function never executed, so 'no divergence' would be vacuous (mostly KeyError — names the real obstacle, not a sampling gap)
No difference found (not proven): No behavior difference found in dispatch\_install\_cli (not a proof).
The verifier ran both versions of dispatch\_install\_cli on many inputs and saw identical behavior every time. Strong evidence the change is safe, but evidence, not a proof.
Guarantee: Empirical: differential testing (both versions run on many generated inputs). A divergence on an untested input remains possible, so this is 'no counterexample found', not 'proven equivalent'.
Note: An input the sampler did not try could still differ.
Could not verify: Could not verify install.
The verifier did not have enough to check install, so it is saying so rather than guessing. No false assurance is the whole point.
Guarantee: No guarantee either way, this is an honest abstention, not a pass.
Note: Reason: no capturable inputs from the test suite; property tier: not verifiable: all 41 sampled inputs raised on both versions — the function never executed, so 'no divergence' would be vacuous (mostly SystemExit — names the real obstacle, not a sampling gap)
Could not verify: Could not verify uninstall\_all.
The verifier did not have enough to check uninstall\_all, so it is saying so rather than guessing. No false assurance is the whole point.
Guarantee: No guarantee either way, this is an honest abstention, not a pass.
Note: Reason: no capturable inputs from the test suite; property tier: not verifiable: the input domain has 20 values but only 10 distinct were tested — a small finite domain must be EXHAUSTED, not sampled (an untested input could invert the result)
· 4 grounded finding(s) anchored inline below; 8 more finding(s) on lines outside this diff (see the check run).
| return new_raw | ||
|
|
||
|
|
||
| def _preserve_jsonc_plugin_remove(raw: str, possible_entries: set[str] | None = None) -> str: |
There was a problem hiding this comment.
_preserve_jsonc_plugin_remove()
high coupling complexity (Ca·Ce = 15).
Grounded coupling-delta finding (deterministic), not an LLM guess.
| print(f" {shown_config} -> plugin deregistered") | ||
|
|
||
|
|
||
| def _mimo_install(project_dir: Path, *, project: bool = False) -> None: |
There was a problem hiding this comment.
_mimo_install()
fans out to 9 callees (efferent coupling); 18 callers depend on it (afferent coupling).
Grounded coupling-delta finding (deterministic), not an LLM guess.
| print("answering codebase questions. Run /graphify first to build the graph.") | ||
|
|
||
|
|
||
| def _mimo_uninstall(project_dir: Path, *, project: bool = False) -> None: |
There was a problem hiding this comment.
_mimo_uninstall()
fans out to 6 callees (efferent coupling); 18 callers depend on it (afferent coupling).
Grounded coupling-delta finding (deterministic), not an LLM guess.
| print(f" {global_agents} -> removed") | ||
|
|
||
|
|
||
| def _mimo_status(project_dir: Path, *, project: bool = False) -> None: |
There was a problem hiding this comment.
_mimo_status()
high coupling complexity (Ca·Ce = 20).
Grounded coupling-delta finding (deterministic), not an LLM guess.
🌟 Xiaomi MiMo Code has been added to Graphify 🌟
Summary
Adds native Xiaomi MiMo Code integration to Graphify, allowing MiMo Code to use Graphify's local knowledge graph as context when responding to queries.
What Changed
graphify mimo install,uninstall, andstatuscommands, with project and global installation scopes.chat.messageandtool.execute.beforehooks to make relevant Graphify knowledge-graph context available during interactions.mimocode.jsonormimocode.jsonc, and configuresAGENTS.mdguidance.--projectand the supported--scopeforms..graphify-bakbackups, and refuses to overwrite malformed or unsupported configuration.Testing
Linux (Debian, Python 3.13.5, current branch state):
msvcrt.lockingattribute errors in cross-platform file-locking code on Linux; no new MiMo-related errors were reported.Windows (Python 3.11, uv; earlier revision):
tests/test_install_roundtrip.py, after resolving the upstream conflict: 54 passed.The full Windows suite has not been rerun against the latest commit. Some failures in the earlier run appeared platform-specific, and some were also reproduced on the upstream baseline.
GitHub Actions is awaiting maintainer approval, so CI results have not yet been confirmed.