Skip to content

Milestone 1: service seam extraction - #2

Merged
Sebastiangmz merged 7 commits into
mainfrom
feat/m1-service-seam
Jun 27, 2026
Merged

Sebastiangmz merged 7 commits into
mainfrom
feat/m1-service-seam

Conversation

@Sebastiangmz

Copy link
Copy Markdown
Owner

Summary

Milestone 1 extracts the shared service seam defined in docs/superpowers/plans/2026-06-27-m1-service-seam-contract.md.

Implemented:

  • Shared RepositoryRegistry, IndexingService, RetrievalService, and ProviderConfigService under src/coderag/services/.
  • API routes now delegate repository metadata, indexing, deletion, query, and error mapping through the service seam.
  • MCP handlers/tools now delegate index/update/delete/query/search through the same service seam while preserving response shapes.
  • Provider profile foundation for cloud, hybrid, private, and retrieval-only, including .env wiring for MODEL_PROFILE.
  • Guardrails so retrieval-only/private profiles do not initialize/generate through the service path, plus a targeted existing-UI query guard.
  • UI repository metadata load now fails closed on corrupt existing JSON instead of silently replacing it with {}.
  • EvalFly smoke config and CI targeted gates extended for M1.

Not implemented in this milestone by design:

  • SQLite registry or migrations.
  • Hybrid/BM25 retrieval.
  • Verified citation semantics or graph extraction.
  • Full UI service-adapter cutover.
  • Autonomous editing behavior.

Verification

Local verification after final commit:

PYTHONPATH=src .venv/bin/python -m pytest tests/test_m0_baseline.py tests/test_m1_services.py tests/test_api_routes.py tests/test_mcp_handlers.py tests/test_mcp_tools.py tests/test_ui_handlers.py
pytest: 54 passed, 2 warnings

.venv/bin/python -m ruff check src/coderag/services src/coderag/config.py src/coderag/api/routes.py src/coderag/mcp/handlers.py src/coderag/mcp/tools.py src/coderag/ui/repository_metadata.py tests/test_m1_services.py tests/test_api_routes.py tests/test_mcp_handlers.py tests/test_mcp_tools.py tests/test_ui_handlers.py scripts/evalfly_smoke.py
OK

PYTHONPATH=src .venv/bin/python -m mypy src/coderag/services src/coderag/config.py src/coderag/ui/repository_metadata.py tests/test_m1_services.py tests/test_api_routes.py scripts/evalfly_smoke.py
OK

.venv/bin/python scripts/evalfly_smoke.py --suite smoke
evalfly committed smoke passed: 10 cases

.venv/bin/python -m py_compile src/coderag/services/*.py src/coderag/api/routes.py src/coderag/mcp/handlers.py src/coderag/ui/repository_metadata.py src/coderag/ui/handlers.py tests/test_m1_services.py tests/test_api_routes.py tests/test_ui_handlers.py
(no output)

.venv/bin/python -m build
Successfully built code_rag_me-0.1.2.tar.gz and code_rag_me-0.1.2-py3-none-any.whl

Post-implementation review:

  • Quality follow-up: PASS.
  • Security/UI follow-up: PASS after fail-closed UI metadata helper and behavioral corrupt-JSON regression.

SpecSafe:

  • CRAG-20260627-M1-SERVICE-SEAM closed PASS.

Spec-Slice: CRAG-20260627-M1-SERVICE-SEAM
Spec-Slice: CRAG-20260627-M1-SERVICE-SEAM
Spec-Slice: CRAG-20260627-M1-SERVICE-SEAM
Spec-Slice: CRAG-20260627-M1-SERVICE-SEAM
Spec-Slice: CRAG-20260627-M1-SERVICE-SEAM
Spec-Slice: CRAG-20260627-M1-SERVICE-SEAM
Copilot AI review requested due to automatic review settings June 27, 2026 22:05

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Spec-Slice: CRAG-20260627-M1-SERVICE-SEAM
@Sebastiangmz
Sebastiangmz merged commit 6ea869f into main Jun 27, 2026
1 check passed
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.

2 participants