This document records the current benchbox run lifecycle and export branches before the
single-path refactor.
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 | Entry condition | Runtime path | Export path |
|---|---|---|---|
| Dry run | if dry_run: |
DryRunExecutor.execute_dry_run(...) |
DryRunExecutor.save_dry_run_results(...) |
| Direct non-interactive SQL/DataFrame | test_execution_type not data/load-only and platform+benchmark provided |
BenchmarkOrchestrator -> run_benchmark_lifecycle |
Inline ResultExporter block with directory-manager filename override |
| Data-only / load-only | if test_execution_type in [\"data_only\", \"load_only\"] |
BenchmarkOrchestrator -> run_benchmark_lifecycle (phase-limited) |
Separate inline ResultExporter block with mode-specific status rendering |
| Interactive | fallback TTY-guided path | BenchmarkOrchestrator -> run_benchmark_lifecycle |
Third inline export block (config.get(\"output.formats\", [\"json\"])) |
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.
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.
- 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.
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.
- 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(...).
- 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.