UAT: ProjectService uses legacy Project model instead of spec-aligned NamespacedProjectProjectRepositoryProtocol is disconnected from service layer #3900

Closed
freemo wants to merge 3 commits from fix/project-service-namespaced-project into master

3 Commits

Author SHA1 Message Date
cleveragents-auto 8cb5821cee chore: worker ruff auto-fix (pre-push lint gate)
CI / lint (pull_request) Successful in 52s
CI / quality (pull_request) Successful in 59s
CI / typecheck (pull_request) Successful in 1m21s
CI / security (pull_request) Successful in 1m22s
CI / helm (pull_request) Successful in 24s
CI / push-validation (pull_request) Successful in 22s
CI / build (pull_request) Successful in 42s
CI / unit_tests (pull_request) Failing after 4m41s
CI / coverage (pull_request) Has been skipped
CI / docker (pull_request) Has been skipped
CI / integration_tests (pull_request) Failing after 21m47s
CI / status-check (pull_request) Failing after 3s
2026-06-01 01:07:22 -04:00
HAL9000 165454d6ab fix(project): move inline imports to top-level, narrow bare except clauses
Move all runtime imports scattered inside _build_default_repo,
initialize_project, and _create_default_plan_for_project to the
module top level per CONTRIBUTING.md Import Guidelines.

Narrow four bare `except Exception` blocks to specific exceptions:
- get_current_project: catch NotFoundError on repo lookup, catch
  (ValueError, ValidationError) on NamespacedProject synthesis
- initialize_project: catch NotFoundError on existence check
- get_project_by_path: catch (NotFoundError, ValueError)

Fix plan.py _get_current_project() return type from legacy Project
to NamespacedProject, matching ProjectService.get_current_project()
actual return type (caught by Pyright).

ISSUES CLOSED: #3700
2026-06-01 01:07:22 -04:00
freemo 225efe75e4 fix(project): migrate ProjectService to spec-aligned NamespacedProject model
Wire ProjectRepositoryProtocol as the primary repository dependency for
ProjectService, replacing the legacy Project model with the spec-aligned
NamespacedProject model throughout the service layer.

- ProjectService now accepts ProjectRepositoryProtocol (auto-built from
  UnitOfWork database URL when not provided via DI)
- All CRUD operations use NamespacedProject (namespaced_name as identity)
- Removed hardcoded default_model='mock-gpt' test artifact from production
- DI container wires NamespacedProjectRepository into ProjectService
- ContextService and PlanService updated with compatibility helpers
  (_resolve_legacy_project_id, _resolve_project_path, _get_exclude_patterns,
  _get_include_patterns) to bridge NamespacedProject ↔ legacy Project
  during the transitional migration period
- CLI commands updated to work with NamespacedProject attributes
- Feature test steps updated for NamespacedProject (no .path, .id, .settings)

ISSUES CLOSED: #3700
2026-06-01 01:07:22 -04:00