Skip to content

Spark 0.15.8 — 全仓复杂度清零

Choose a tag to compare

@badhope badhope released this 24 Nov 19:48
· 7 commits to main since this release
Immutable release. Only release title and notes can be modified.

Spark 0.15.8 — 全仓复杂度清零

补丁版本,不改对外行为。全仓历史 D/E/F 从 58(53 D / 5 E / 0 F) 降到 0。

复杂度清零

  • 五个 E 级入口全部拆掉:run_shell、run_workflow、AgentLoop._llm_round、spawn_subtasks_parallel、TUI _render。
  • 51 个 D 级函数拆为单一职责 helper,覆盖 CLI、Web handlers、SSE、内存/索引、Provider、relay、wiki、review、selfheal、workbench。
  • scripts/complexity-baseline.json 重建为 functions: {},CI 对任何新增 D/E/F 或增长 >3 点直接失败。

拆分边界修复

  • _llm_round 补回 begin_provider_round(),回合指标不再 rounds=0。
  • 并发子代理共用 _create_sub_loop(owner, ...),修复 owner 绑定错误。
  • 知识库 embedding 失败立即停止后续批次,不把失败当“0 条新增”。
  • 历史消息补回 assistant 普通文本 id/feedback;任务工具补回 _finish_tool_execution;SSE pending 字段补类级注解。
  • 保持浏览器策略、租约续期/释放响应字段与拆分前逐字一致。

验证

  • ruff check src 通过;mypy src --ignore-missing-imports 190 files 0 error。
  • 复杂度扫描 -n D / -n E 均为空;门禁 0 known D/E/F functions, no new hotspots。
  • 全量 pytest:2006 passed, 13 skipped, 0 failed, 14 warnings, 1121.79s。
  • VSIX:spark-agent-0.15.8.vsix。

文档

  • 新增 docs/reviews/2026-11-25-complexity-clearance.md。
  • CHANGELOG.md、docs/PROJECT_BASELINE.md、docs/REMAINING.md 同步到 0 D/E/F / 0.15.8。

Full Changelog: v0.15.7...v0.15.8