Skip to content

feat: improve parallel output rendering with per-output progress bars and explicit tests#286

Merged
szmyty merged 3 commits into
mainfrom
copilot/enable-parallel-execution-output-strategies
Apr 11, 2026
Merged

feat: improve parallel output rendering with per-output progress bars and explicit tests#286
szmyty merged 3 commits into
mainfrom
copilot/enable-parallel-execution-output-strategies

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 11, 2026

Parallel output rendering via Rayon's par_iter() was already wired up, but called MultiProgress::add() inside the parallel closure — acquiring an internal mutex on every call and potentially serializing workers. This PR eliminates that contention and adds explicit validation of the parallel behavior.

Changes

  • Pre-create per-output progress bars before the rayon section, then zip with outputs:

    let output_bars: Vec<ProgressBar> = config.outputs.iter()
        .map(|o| create_output_bar(&mp, &o.output_type.to_string()))
        .collect();
    
    config.outputs.par_iter()
        .zip(output_bars.par_iter())
        .map(|(output, bar)| { /* each worker owns its bar, no shared mutex */ })
        .collect()
  • create_output_bar() helper extracts bar creation logic and documents the pre-creation rationale

  • Named symbol constants (SYMBOL_OK, SYMBOL_FAIL, SYMBOL_SKIP) replace hardcoded emoji strings across all render status messages

  • Three new tests covering the parallel execution acceptance criteria:

    • test_parallel_dry_run_produces_result_per_outputpar_iter processes every configured output
    • test_parallel_failure_isolation_and_aggregation — each format fails independently; all failures aggregated into one error
    • test_parallel_renders_all_formats_independently — HTML + PDF + DOCX render concurrently and all output files are produced

Copilot AI linked an issue Apr 11, 2026 that may be closed by this pull request
5 tasks
Copilot AI changed the title [WIP] Enable parallel execution of output strategies feat: improve parallel output rendering with per-output progress bars and explicit tests Apr 11, 2026
Copilot AI requested a review from szmyty April 11, 2026 02:15
@szmyty szmyty marked this pull request as ready for review April 11, 2026 03:43
@szmyty szmyty merged commit e82a779 into main Apr 11, 2026
@szmyty szmyty deleted the copilot/enable-parallel-execution-output-strategies branch April 11, 2026 03:43
@devactivity-app
Copy link
Copy Markdown

Pull Request Summary by devActivity

Metrics

Cycle Time: 1h 41m Coding Time: < 1 min Pickup Time: 1h 27m Review Time: < 1 min

Achievements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🚀 Enable parallel execution of output strategies

2 participants