emmerich-os/cosmics
53.4
Adequate · 22 September 2026
1k
lines of production code
Python
primary language
6
measurements over time
What this system is
Cosmics is a Python library that provides a structured approach to database interactions and business logic through a layered architecture. It features a domain model with update capabilities, a repository layer that enforces column validation and transactional integrity, and a service layer utilizing a Message Bus and Unit of Work pattern. The system includes comprehensive testing utilities with fake implementations and integration tests to ensure reliability.
Features
Introduce service layer with MessageBus and Unit of Work
Added the service layer package containing a MessageBus for routing commands and events to their respective handlers, along with a Unit of Work abstraction to manage database transactions and event collection.
_cosmics/service\layer · high confidence
Removals
Removal of PostgreSQL repository implementation
The PostgreSQL-specific repository implementation has been removed from the codebase. This change eliminates the \cosmic\_tools.postgresql.repository\ module, which previously provided the \Repository\ class for interacting with PostgreSQL databases. Users relying on this specific database integration will no longer have access to this component.
_cosmic\tools · high confidence
Behavioural changes
Add update method to domain models
The AbstractModel class in the cosmics domain now includes an update method that allows users to update model instances with new values. This method filters out any keys not present in the current model state, ensuring that only valid, existing attributes are updated. This provides a convenient way to modify model instances without manually reconstructing them from a dictionary.
cosmics/domain · high confidence
Repository layer refactored with column validation and transactional updates
The repository package has been renamed from cosmic\_tools to cosmics/repository, and the PostgreSQL client now validates that all columns in insert, update, and delete operations exist in the target table, silently filtering out non-existent columns to prevent database errors. The update method was added to the repository interface, and the delete operation no longer supports a 'force' parameter, simplifying the deletion behavior. Additionally, database transactions are now explicitly committed or rolled back based on the success of the operation, and new exceptions (DuplicateItemException, ReferenceViolationException) were introduced to handle specific database constraint violations.
cosmics/repository · medium confidence
Test coverage
Added and restructured integration tests for PostgreSQL repository; Added fake implementations for testing; Added unit tests for service layer components; Added unit tests for the domain model; Restructure and expand repository unit tests; Updated test fixtures and removed obsolete model tests.
Dependencies
Update project name and lockfile dependencies
The project has been renamed from 'cosmic-tools' to 'cosmics', with the package name and import paths updated accordingly. The dependency manifest (pyproject.toml) and lockfile (poetry.lock) have been updated: flake8 and its plugins (flake8-debugger, flake8-simplify) were added or updated, while flakehell was downgraded. Additional dev dependencies like pytest-asyncio and pyflakes were introduced, and Sphinx documentation configuration was added.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 52 → 53 (+1.7)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 100 → 100 (-0.4)
- Architecture 69 → 66 (-3.3)
- Maturity 40 → 40 (+0.0)
- Readiness 46 → 50 (+3.9)
- Security 67 → 81 (+13.9)
- Domain Modelling 100 → 100 (+0.0)
Resolved (12)
- Coverage not included — suite not readable by the collector
- Critical CVE: [GHSA redacted] (poetry.lock)
- Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
- High CVE: [GHSA redacted] (poetry.lock)
- High CVE: [GHSA redacted] (poetry.lock)
- Medium CVE: [GHSA redacted] (poetry.lock)
- Medium CVE: [GHSA redacted] (poetry.lock)
- Medium CVE: [GHSA redacted] (poetry.lock)
- No exposed public API
- Test reliability not included
- The README lists four helper classes ('Repository', 'Client', 'Messagebus', 'Unit of Work') but never explains what each one does or how to use them. (README.md)
- single-maintainer — knowledge-concentration (bus factor) risk
New (10)
- Critical CVE: [GHSA redacted] (poetry.lock)
- Dependency hygiene PARTLY measured — Python dependencies read, no exact pin to grade for currency
- High CVE: [GHSA redacted] (poetry.lock)
- High CVE: [GHSA redacted] (poetry.lock)
- Medium CVE: [GHSA redacted] (poetry.lock)
- Medium CVE: [GHSA redacted] (poetry.lock)
- Medium CVE: [GHSA redacted] (poetry.lock)
- Medium IaC: WD-COMPOSE-0002 (docker/docker-compose.databases.yaml)
- No dependency advisory monitoring
- TodoComment (cosmics/repository/postgresql/_query_builder.py)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
emmerich-os/cosmics was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 22 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 262f3780523b9712d5c683368543d16e3d6c4510 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-821afab8930d.