f4432c2759
CI / quality (push) Has been cancelled
CI / integration_tests (push) Has been cancelled
CI / e2e_tests (push) Has been cancelled
CI / build (push) Has been cancelled
CI / typecheck (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / security (push) Has been cancelled
CI / benchmark-publish (push) Has been cancelled
CI / unit_tests (push) Has been cancelled
CI / helm (push) Has been cancelled
CI / coverage (push) Has been cancelled
CI / docker (push) Has been cancelled
CI / status-check (push) Has been cancelled
CI / benchmark-regression (push) Has been cancelled
Remove four empty stub packages that contained only __init__.py with __all__ = [] and no functional code, violating CONTRIBUTING.md §Commit Completeness. All four were audited against docs/specification.md: - src/cleveragents/runtime/ — Spec defines four layers (Domain, Application, Infrastructure, Presentation) with no Runtime Layer. Runtime concepts (LSP Runtime, actor runtime) belong in Infrastructure. - src/cleveragents/domain/repositories/ — Spec mentions repository interfaces in Domain but mandates no separate subpackage. Empty with no protocols defined; existing models cover the domain. - src/cleveragents/domain/plans/ — Plan domain models already exist in domain/models/planconfig, planfiles, and plansettings. Empty duplicate. - src/cleveragents/application/workflows/ — Application logic already served by application/services/. Empty stub added no value. Updated test references in features/steps/module_coverage_steps.py, features/steps/coverage_extras_steps.py, features/architecture.feature, and robot/architecture.robot to remove the deleted packages from import verification and architecture validation lists. ISSUES CLOSED: #948 Co-authored-by: Brent E. Edwards <brent.edwards@cleverthis.com> Co-committed-by: Brent E. Edwards <brent.edwards@cleverthis.com>
103 lines
4.3 KiB
Plaintext
103 lines
4.3 KiB
Plaintext
*** Settings ***
|
|
Documentation Architecture and dependency validation tests
|
|
Library OperatingSystem
|
|
Library Collections
|
|
Library String
|
|
Resource ${CURDIR}/common.resource
|
|
|
|
*** Variables ***
|
|
${SRC_DIR} ${CURDIR}/../src/cleveragents
|
|
|
|
*** Test Cases ***
|
|
Package Structure Should Follow Layered Architecture
|
|
[Documentation] Verify package structure matches ADR-001
|
|
Directory Should Exist ${SRC_DIR}
|
|
|
|
# Check main packages exist
|
|
Directory Should Exist ${SRC_DIR}/cli
|
|
Directory Should Exist ${SRC_DIR}/application
|
|
Directory Should Exist ${SRC_DIR}/domain
|
|
Directory Should Exist ${SRC_DIR}/infrastructure
|
|
Directory Should Exist ${SRC_DIR}/providers
|
|
Directory Should Exist ${SRC_DIR}/config
|
|
Directory Should Exist ${SRC_DIR}/core
|
|
Directory Should Exist ${SRC_DIR}/shared
|
|
|
|
Package Init Files Should Have Docstrings
|
|
[Documentation] Verify packages document their responsibilities
|
|
@{packages}= List Directories In Directory ${SRC_DIR}
|
|
FOR ${package} IN @{packages}
|
|
${init_file}= Set Variable ${SRC_DIR}/${package}/__init__.py
|
|
${exists}= Run Keyword And Return Status File Should Exist ${init_file}
|
|
IF ${exists}
|
|
${content}= Get File ${init_file}
|
|
Should Contain ${content} """ Missing docstring in ${package}/__init__.py
|
|
END
|
|
END
|
|
|
|
Development Tools Should Be Configured
|
|
[Documentation] Verify development tools are properly configured
|
|
File Should Exist ${CURDIR}/../pyproject.toml
|
|
File Should Exist ${CURDIR}/../noxfile.py
|
|
|
|
# Check tool configurations in pyproject.toml
|
|
${pyproject}= Get File ${CURDIR}/../pyproject.toml
|
|
Should Contain ${pyproject} [tool.ruff]
|
|
Should Contain ${pyproject} [tool.pyright]
|
|
Should Contain ${pyproject} [tool.coverage]
|
|
Should Contain ${pyproject} [tool.hatch]
|
|
|
|
Modern Tooling Should Be Used
|
|
[Documentation] Verify no legacy helper scripts - using modern tooling instead
|
|
# Verify we're NOT using legacy scripts (intentionally removed)
|
|
File Should Not Exist ${CURDIR}/../scripts/install.py
|
|
File Should Not Exist ${CURDIR}/../scripts/sync.py
|
|
|
|
# Verify modern tooling configuration exists
|
|
${pyproject}= Get File ${CURDIR}/../pyproject.toml
|
|
Should Contain ${pyproject} [tool.hatch] Modern build backend (Hatch) should be configured
|
|
Should Contain ${pyproject} [project.optional-dependencies] Dependency groups should be defined
|
|
|
|
Type Marker Should Exist
|
|
[Documentation] Verify py.typed marker for type hints
|
|
File Should Exist ${SRC_DIR}/py.typed
|
|
|
|
Configuration Should Use CLEVERAGENTS Prefix
|
|
[Documentation] Verify environment variables use correct prefix
|
|
${settings_file}= Set Variable ${SRC_DIR}/config/settings.py
|
|
File Should Exist ${settings_file}
|
|
${content}= Get File ${settings_file}
|
|
# Check for CLEVERAGENTS_ prefix
|
|
${matches}= Get Regexp Matches ${content} CLEVERAGENTS_[A-Z_]+
|
|
${count}= Get Length ${matches}
|
|
Should Be True ${count} > 0 No CLEVERAGENTS_ variables found in settings
|
|
|
|
Core Exception Hierarchy Should Be Defined
|
|
[Documentation] Verify exception hierarchy from ADR-005
|
|
${exceptions_file}= Set Variable ${SRC_DIR}/core/exceptions.py
|
|
File Should Exist ${exceptions_file}
|
|
${content}= Get File ${exceptions_file}
|
|
Should Contain ${content} class CleverAgentsError
|
|
Should Contain ${content} class DomainError
|
|
Should Contain ${content} class InfrastructureError
|
|
Should Contain ${content} class ValidationError
|
|
|
|
*** Keywords ***
|
|
List Files In Directory
|
|
[Arguments] ${directory} ${pattern}=*
|
|
@{files}= OperatingSystem.List Files In Directory ${directory} ${pattern}
|
|
RETURN @{files}
|
|
|
|
List Directories In Directory
|
|
[Arguments] ${directory}
|
|
@{items}= List Directory ${directory}
|
|
@{dirs}= Create List
|
|
FOR ${item} IN @{items}
|
|
${path}= Set Variable ${directory}/${item}
|
|
${is_dir}= Run Keyword And Return Status Directory Should Exist ${path}
|
|
IF ${is_dir} and not '${item}'.startswith('__')
|
|
Append To List ${dirs} ${item}
|
|
END
|
|
END
|
|
RETURN @{dirs}
|