orchestrata_ultimate.refactor.codemod.observability
Reference › orchestrata_ultimate › refactor › codemod › observability
SPEC-110 codemod engine observability package.
This package makes codemod operations observable. The workspace and the transaction layer emit events (thirteen lifecycle kinds, REQ-110-025) onto an observable bus, one correlation id per operation, and observers subscribe to it. The default observer set is empty; scripts/codemod.py run --observe attaches the five standard ones from default_observers().
The observers: debug_panel writes a trace file per operation, error_detector raises an alert on repeated parse failures, graph_writer persists runs and passes to the graph through the persistence repository, metrics exports Prometheus counters and histograms, and tracing writes timed span records. The facade re-exports all of them. Observers never take part in the operation's outcome. Start with events. The packet S1 section of the refactor package narrative has the design history.
7 modules, 732 lines of code.
Modules
| Module | Summary | LOC |
|---|---|---|
__init__ |
SPEC-110 codemod engine observability package. | 44 |
debug_panel |
DebugPanelObserver — writes NDJSON trace files for post-mortem analysis. | 65 |
error_detector |
ErrorDetector — pattern-matches error sequences and emits alerts via EventBus. | 142 |
events |
SPEC-110 codemod engine module. | 54 |
graph_writer |
GraphWriterObserver — async writes to graph DB, batched, non-blocking. | 148 |
metrics |
MetricsObserver — Prometheus counters and histograms for codemod operations. | 189 |
tracing |
TracingObserver — emits structured JSON spans via core.tracing.Tracer. | 90 |