Skip to content
CAI
Software that uses CAICheck a score

dlski/python-mediator

56.9

Adequate · 21 September 2026

1.9k

lines of production code

Python

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a Python-based mediator library that facilitates event-driven architecture and command handling. It provides mechanisms for transactional event aggregation, synchronous event bus processing, and flexible callable invocation with argument mapping and filtering. The codebase has been refactored to unify handler creation and improve inspection capabilities, while maintaining test coverage for the core mediation logic.

Behavioural changes

Added transactional event aggregation and synchronous event bus mode

The eventing system now supports transactional publishing via a new \EventAggregate\ class, which stages multiple events and commits them within a single transaction context. Additionally, \LocalEventBus\ and \EventHandlerRegistry\ have been updated to support a \sync\_mode\ parameter, allowing event handlers to be processed synchronously rather than as background tasks. The underlying registry and scheduler implementations have been refactored to use \ModifierFactory\ instead of \OperatorDef\, and the \EventPublisher\ interface now explicitly supports transactional contexts.

mediator/event · high confidence

Enhanced callable inspection with kwargs detection and async context manager

The \mediator/utils/inspection.py\ module now provides more detailed inspection of callables, including a new \has\kwargs\ field in \CallableIODetails\ to detect if a function accepts \\\*kwargs\. Additionally, a new \AsyncNullContextManager\ class has been added to \context.py\ to serve as a no-op async context manager. The test file \test\_inspection.py\ was moved to the new location.

mediator/utils · high confidence

Refactor handler creation and introduce argument strictness and filtering

The handler creation logic has been refactored: \DirectHandler\ and \MappedDirectHandler\ are replaced by a unified \CallableHandler\ that supports explicit subject name, argument mapping, and argument filtering. Policies now include an \arg\_strict\ option (defaulting to filtering injected keys by available arguments) to control whether excessive arguments are dropped. The \OperatorDef\ and \OperatorStack\ abstractions are replaced by \ModifierFactory\ and \ModifierStack\ for wrapping callables with extra behavior. Additionally, \CallableHandlerPolicyOwner\ is renamed to \MappablePolicy\.

mediator/common · high confidence

Test coverage

Removal of obsolete test files in tests/common; Removed obsolete event test suite; Tests moved from separate directory to example package.

Dependencies

Update python-mediator package metadata and Python version support

The python-mediator package has been updated to version 0.7.0, with the description expanded to include 'ES' (Event Sourcing). The project now explicitly supports Python versions 3.7 through 3.10 (previously 3.8+), and includes metadata such as package inclusion rules, readme, and classifiers for PyPI. Additionally, mypy has been added as a dev dependency for static checking.

(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

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 49 → 57 (+7.6)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 100 → 100 (-0.2)
  • Architecture 100 → 97 (-2.5)
  • Maturity 55 → 55 (+0.0)
  • Readiness 46 → 50 (+3.9)
  • Security 36 → 52 (+15.2)

Resolved (22)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • No exposed public API
  • Test reliability not included
  • early-stage repository — too little history to judge knowledge freshness
  • git history depth insufficient
  • …and 2 more

New (28)

  • Dependency hygiene PARTLY measured — Python dependencies read, no exact pin to grade for currency
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Duplicated block (19 lines × 2) (mediator/event/registry.py)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • …and 8 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

dlski/python-mediator 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 21 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 0e09c18187fcd7a68dcdec3056608370ea1da75e — 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-fa71c66cabd8.