Run Lifecycle Branch Map¶
This document records the current benchbox run lifecycle and export branches before the
single-path refactor.
Canonical Runtime Today¶
For real benchmark execution, benchbox/cli/commands/run.py delegates to:
BenchmarkOrchestrator.execute_benchmark(...)inbenchbox/cli/orchestrator.pyrun_benchmark_lifecycle(...)inbenchbox/core/runner/runner.py
benchbox/cli/execution_pipeline.py is not the default path used by run.py.
Branch Matrix (benchbox/cli/commands/run.py)¶
Branch |
Entry condition |
Runtime path |
Export path |
|---|---|---|---|
Dry run |
|
|
|
Direct non-interactive SQL/DataFrame |
|
|
Inline |
Data-only / load-only |
|
|
Separate inline |
Interactive |
fallback TTY-guided path |
|
Third inline export block ( |
Duplicate Export Logic Identified¶
run.py currently contains three non-dry-run export blocks with drift in:
format selection (
[\"json\"]vs config-driven),output filename/output_dir handling,
status output formatting.
These blocks are the target for unification in the refactor.
Metadata Wiring Gap Identified¶
Driver/runtime metadata enrichment currently exists in ExecutionEngine._enrich_driver_metadata(...)
inside benchbox/cli/execution_pipeline.py.
Because run.py executes through orchestrator/lifecycle, metadata wired only in pipeline code may be
missing from real exported CLI artifacts unless enrichment is moved to canonical post-processing.
Refactor Baseline Decisions¶
Canonical runtime path:
run.py->BenchmarkOrchestrator->run_benchmark_lifecycle.ExecutionPipelinemust not remain a parallel behavior-bearing runtime path.Export policy must be centralized and called by all non-dry-run branches.
Metadata enrichment must run on the canonical path before result export.
Single-Path Architecture (Post-Refactor)¶
Runtime path¶
benchbox/cli/commands/run.pybuilds validated CLI config and execution context._execute_orchestrated_run(...)executes throughBenchmarkOrchestrator.BenchmarkOrchestrator.execute_benchmark(...)delegates torun_benchmark_lifecycle(...).apply_driver_metadata(...)enriches results on the canonical path._export_orchestrated_result(...)performs export with directory-manager naming.
Extension points¶
Add lifecycle behavior in
benchbox/core/runner/runner.py, not in CLI branch-specific code.Add result metadata wiring in
benchbox/core/results/driver_metadata.pyso all run modes inherit it.Add export behavior in
benchbox/cli/commands/run.pyhelper_export_orchestrated_result(...).
Alpha Release Notes (Execution Refactor)¶
Removed legacy
quickbranch logic frombenchbox run.Removed legacy
no_regenerateoption wiring from run-command benchmark options.Unified non-dry-run execution through shared run-command helpers:
_execute_orchestrated_run(...)_export_orchestrated_result(...)
ExecutionPipelineis retained as a compatibility module and test surface, not the behavior-authoritative runtime path forbenchbox run.