现状
竞品审计报告 (fusion-mlx_vs_*.md) 一致指出存在两套 BatchedEngine 实现:
fusion_mlx/engine/batched/__init__.py (357 行) — class BatchedEngine(BaseEngine),独立实现,含 _mtp_dispatch.py
fusion_mlx/engines/batched.py (1157 行) — class BatchedEngine(BaseEngine),生产实现(server.py + engine_pool.py 用这个)
证据
$ grep -rln 'engines.batched' fusion_mlx/ # 生产导入者
fusion_mlx/server.py
fusion_mlx/pool/engine_pool.py
fusion_mlx/pool/engine/dflash.py
$ grep -rln 'engine.batched' fusion_mlx/ # 生产代码零导入者
# (空)
$ grep -rln 'engine.batched' tests/ # 仅测试依赖
tests/unit/test_no_mllm_flag.py
tests/unit/test_embeddings_timeout_admission.py
tests/unit/test_batching.py
tests/unit/test_disconnect_guard_aborts_scheduler.py
tests/unit/test_batched_engine_output_router.py
# ... 20+ 测试文件
风险
engine/batched/ 子包在生产代码中零导入者,但被 20+ 测试文件直接 import。两套实现分叉,维护时易改错一份,是架构冗余的典型信号(见三份竞品报告的「关键差距与风险」章节)。
复杂度
不能简单删除 engine/batched/ —— 20+ 测试依赖它,且这些测试多数在 debt_modules.txt 隔离名单内(已知失败)。清理需:
- 确认
engine/batched/ 是否为旧入口/shim(engine/__init__.py 仍 from . import batched)
- 决定单一权威实现(生产用
engines/batched.py)
- 将依赖
engine.batched 的测试迁移到 engines.batched,或确认这些测试本身已是死测试随隔离名单清理
来源
竞品深度对比报告 (~/fusion/audit/fusion-mlx_vs_*.md) 行动项。本 issue 仅记录技术债,不在 GGUF 桥 PR 中一并处理(风险不对等)。
Co-Authored-By: Claude Fable 5 noreply@anthropic.com
现状
竞品审计报告 (
fusion-mlx_vs_*.md) 一致指出存在两套 BatchedEngine 实现:fusion_mlx/engine/batched/__init__.py(357 行) —class BatchedEngine(BaseEngine),独立实现,含_mtp_dispatch.pyfusion_mlx/engines/batched.py(1157 行) —class BatchedEngine(BaseEngine),生产实现(server.py + engine_pool.py 用这个)证据
风险
engine/batched/子包在生产代码中零导入者,但被 20+ 测试文件直接 import。两套实现分叉,维护时易改错一份,是架构冗余的典型信号(见三份竞品报告的「关键差距与风险」章节)。复杂度
不能简单删除
engine/batched/—— 20+ 测试依赖它,且这些测试多数在 debt_modules.txt 隔离名单内(已知失败)。清理需:engine/batched/是否为旧入口/shim(engine/__init__.py仍from . import batched)engines/batched.py)engine.batched的测试迁移到engines.batched,或确认这些测试本身已是死测试随隔离名单清理来源
竞品深度对比报告 (
~/fusion/audit/fusion-mlx_vs_*.md) 行动项。本 issue 仅记录技术债,不在 GGUF 桥 PR 中一并处理(风险不对等)。Co-Authored-By: Claude Fable 5 noreply@anthropic.com