nirs4all.pipeline.trace.recorder module

Trace Recorder V3 - Records execution traces during pipeline execution.

This module provides the TraceRecorder class which is responsible for building ExecutionTrace objects during pipeline execution.

V3 improvements: - Chain stack for tracking operator chain through execution - Branch stack for automatic branch path management - Proper recording of branch substeps as individual steps - Support for multi-source artifact tracking

The recorder is designed to be controller-agnostic: it records step execution and artifact creation without knowing about specific controller types.

Usage:
  1. Create a TraceRecorder at the start of pipeline execution

  2. Call start_step() when a step begins

  3. Call record_artifact() when artifacts are created

  4. Call end_step() when a step completes

  5. Call finalize() to get the completed trace