Skip to content

fix: load review backend managers only when selected - #6699

Merged
atomantic merged 2 commits into
mainfrom
cos/app-improve-portos-default-module-hygiene-mttpq7ig/agent-c2788b8d
Sep 9, 2026
Merged

fix: load review backend managers only when selected#6699
atomantic merged 2 commits into
mainfrom
cos/app-improve-portos-default-module-hygiene-mttpq7ig/agent-c2788b8d

Conversation

@atomantic

Copy link
Copy Markdown
Owner

Summary

Review-defaults callers imported LM Studio and Ollama download/install dependencies even when they never executed a local review. Load each manager only at the selected backend's existing async boundary, matching MTPLX. The review service's static closure shrinks from 149 to 138 modules.

Test plan

  • Passed 346 tests across services/codeReview.test.js, services/codeReview.providers.test.js, services/codeReview.backendLoading.test.js, routes/codeReview.test.js, lib/importScoping.test.js, services/agentCliSpawning.test.js, and services/cleanupAgentWorktree.test.js (npm test --prefix server -- --run ...).
  • Import guards assert that defaults loading cannot statically reach any of the three managers and that the lazy imports remain present. Existing workflow tests cover successful reviews, failures, pins, capability fallback, and cleanup compatibility.
  • git diff --check passed.
  • Claude ran in enforced read-only mode for the configured one-round budget. Its response included extra prose (optional no-verdict); the concrete finding was validated and fixed, with a workflow test for manager-load failure at an explicit endpoint.

@atomantic
atomantic merged commit a071c4d into main Sep 9, 2026
7 checks passed
@atomantic
atomantic deleted the cos/app-improve-portos-default-module-hygiene-mttpq7ig/agent-c2788b8d branch September 9, 2026 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant