1 Commits

Author SHA1 Message Date
HAL9000 e17a6ddec7 fix(arch): route CLI project create through NamespacedProjectService
CI / benchmark-regression (push) Failing after 0s
CI / benchmark-publish (push) Failing after 0s
CI / push-validation (push) Successful in 23s
CI / helm (push) Successful in 43s
CI / build (push) Successful in 3m49s
CI / lint (push) Successful in 3m56s
CI / quality (push) Successful in 4m24s
CI / typecheck (push) Successful in 4m53s
CI / security (push) Successful in 4m55s
CI / e2e_tests (push) Successful in 7m0s
CI / integration_tests (push) Successful in 7m44s
CI / unit_tests (push) Successful in 8m37s
CI / docker (push) Successful in 1m37s
CI / coverage (push) Successful in 15m4s
CI / status-check (push) Successful in 3s
CI / docker (pull_request) Successful in 1m38s
CI / coverage (pull_request) Successful in 14m58s
CI / typecheck (pull_request) Successful in 4m24s
CI / push-validation (pull_request) Successful in 23s
CI / integration_tests (pull_request) Successful in 11m54s
CI / build (pull_request) Successful in 3m35s
CI / lint (pull_request) Successful in 3m49s
CI / helm (pull_request) Successful in 29s
CI / quality (pull_request) Successful in 4m13s
CI / security (pull_request) Successful in 4m38s
CI / e2e_tests (pull_request) Successful in 6m54s
CI / unit_tests (pull_request) Successful in 8m56s
CI / status-check (pull_request) Successful in 3s
Introduce NamespacedProjectService in the application layer to encapsulate
all NamespacedProject domain model construction. The agents project create
CLI command previously imported NamespacedProject and parse_namespaced_name
directly from cleveragents.domain.models.core.project, violating
Architectural Invariant #3 (CLI layer must only call application services).

Changes:
- Add NamespacedProjectService with create_project(), get_project(),
  list_projects(), delete_project(), parse_project_name(),
  validate_project_name(), and project_to_dict() methods
- Wire NamespacedProjectService into the DI container as
  namespaced_project_service provider
- Refactor cli/commands/project.py to use NamespacedProjectService for
  all project operations (create, list, show, delete, link-resource,
  unlink-resource)
- Add BDD feature file and step definitions for NamespacedProjectService
  (25 scenarios covering all service methods and edge cases)
- Narrow exception handling in get_project() to catch only
  ProjectNotFoundError instead of bare Exception, preventing
  infrastructure errors from being masked as NotFoundError
- Update CHANGELOG.md with both #7464 and #8232 entries
- Update CONTRIBUTORS.md with PR #8297 contribution entry

ISSUES CLOSED: #7464
2026-04-21 03:38:05 +00:00