Skip to content

Hypothesis stateful tests for metrics/tracing/logging hooks (cuprum/adapters/metrics_adapter.py) #78

Description

@coderabbitai

Overview

Add Hypothesis stateful tests for the metrics, tracing, and logging hooks in cuprum/adapters/metrics_adapter.py (around line 206).

Justification

Event streams can arrive in varied phase/order/pid combinations, and current tests do not exercise these combinations systematically.

Benefit

  • Proves counters, spans, and log records are created exactly when intended
  • Proves active maps drain correctly

Cost Trade-Off

Medium. Requires synthetic event generators.

Verifiability Improvements

Extract event-to-operation reducers from side-effecting collector/span calls.

Recommended Order

Phase 3 — state-machine work after refactors isolate pure transitions.


Raised from PR #62 by @leynos.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions