Skip to content

fix(rocq-pipeline): use futures for parallel_runner so worker results are reported immediately#221

Merged
jhaag-skylabs-ai merged 3 commits intomainfrom
rocq-pipeline/task-runner/use-futures-for-parallel-tasks
Feb 26, 2026
Merged

fix(rocq-pipeline): use futures for parallel_runner so worker results are reported immediately#221
jhaag-skylabs-ai merged 3 commits intomainfrom
rocq-pipeline/task-runner/use-futures-for-parallel-tasks

Conversation

@jhaag-skylabs-ai
Copy link
Copy Markdown
Contributor

@jhaag-skylabs-ai jhaag-skylabs-ai commented Feb 19, 2026

Background

The previous implementation of parallel_runner used ThreadPoolExecutor.map. This yields results in the order they are processed, blocking until the next result is available. This means that if a long-running task is "next" and subsequent/shorter tasks conclude in parallel, their results will not be processed immediately.

The effect is that when running agent pipelines we often observe print-statements indicating task success/failure before the overall status/progress bar is updated.

Change

In rocq_pipeline/util.py#parallel_runner:

  • use ThreadPoolExecutor.submit to create futures for each task up-front
  • use concurrent.futures.as_completed to eagerly process futures in the order that results become available

@jhaag-skylabs-ai jhaag-skylabs-ai self-assigned this Feb 19, 2026
@jhaag-skylabs-ai jhaag-skylabs-ai added the enhancement New feature or request label Feb 19, 2026
@skylabs-ai-ci
Copy link
Copy Markdown

skylabs-ai-ci Bot commented Feb 19, 2026

CI summary (Details)

Active Repos

Repo Job Branch Job Commit Base commit PR
fmdeps/rocq-agent-toolkit/ rocq-pipeline/task-runner/use-futures-for-parallel-tasks e319195 408efe1 #221

Passive Repos

Repo Job Branch Job Commit
./ main 2cb75e1
fmdeps/BRiCk/ main f938caa
fmdeps/auto/ main c7cb50c
fmdeps/auto-docs/ main 9f57097
bluerock/NOVA/ skylabs-proof 927947d
bluerock/bhv/ skylabs-main bd74d48
fmdeps/brick-libcpp/ main 53842f7
fmdeps/ci/ main d5ff6c5
vendored/elpi/ skylabs-master aa4475f
fmdeps/fm-ci/ main 262fb04
fmdeps/fm-tools/ main 46ed5a6
psi/protos/ main 8fe3e7c
psi/backend/ main 78623c8
psi/ide/ main 6b596cf
psi/data/ main 6c7fffd
vendored/rocq/ skylabs-master 2ede3c9
vendored/rocq-elpi/ skylabs-master 103a742
vendored/rocq-equations/ skylabs-main a8c4832
vendored/rocq-ext-lib/ skylabs-master 94a6630
vendored/rocq-iris/ skylabs-master 3ad4ddd
vendored/rocq-lsp/ skylabs-main a8b7272
vendored/rocq-stdlib/ skylabs-master bc07423
vendored/rocq-stdpp/ skylabs-master e01d802
fmdeps/skylabs-fm/ main 7d620c1
vendored/vsrocq/ skylabs-main 5b4527e

Performance

Relative Master MR Change Filename
-0.00% 122620.9 122620.9 -0.0 total
-0.00% 22464.4 22464.4 -0.0 ├ translation units
+0.00% 100156.5 100156.5 +0.0 └ proofs and tests
Full Results
Relative Master MR Change Filename
-0.00% 122620.9 122620.9 -0.0 total
-0.00% 22464.4 22464.4 -0.0 ├ translation units
+0.00% 100156.5 100156.5 +0.0 └ proofs and tests

Copy link
Copy Markdown
Contributor

@gmalecha-at-skylabs gmalecha-at-skylabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im in favor of the change once you fix the issue.

Comment thread rocq-pipeline/src/rocq_pipeline/util.py Outdated
Comment thread rocq-pipeline/src/rocq_pipeline/util.py Outdated
…in order, and properly handle future cancellation/exceptions
@skylabs-ai-ci
Copy link
Copy Markdown

skylabs-ai-ci Bot commented Feb 19, 2026

CI summary (Details)

Active Repos

Repo Job Branch Job Commit Base commit PR
fmdeps/rocq-agent-toolkit/ rocq-pipeline/task-runner/use-futures-for-parallel-tasks fbb64e5 be7e554 #221

Passive Repos

Repo Job Branch Job Commit
./ main 2cb75e1
fmdeps/BRiCk/ main f938caa
fmdeps/auto/ main c7cb50c
fmdeps/auto-docs/ main 9f57097
bluerock/NOVA/ skylabs-proof 927947d
bluerock/bhv/ skylabs-main bd74d48
fmdeps/brick-libcpp/ main 53842f7
fmdeps/ci/ main d5ff6c5
vendored/elpi/ skylabs-master aa4475f
fmdeps/fm-ci/ main 262fb04
fmdeps/fm-tools/ main 46ed5a6
psi/protos/ main 8fe3e7c
psi/backend/ main 78623c8
psi/ide/ main 6b596cf
psi/data/ main 6c7fffd
vendored/rocq/ skylabs-master 2ede3c9
vendored/rocq-elpi/ skylabs-master 103a742
vendored/rocq-equations/ skylabs-main a8c4832
vendored/rocq-ext-lib/ skylabs-master 94a6630
vendored/rocq-iris/ skylabs-master 3ad4ddd
vendored/rocq-lsp/ skylabs-main a8b7272
vendored/rocq-stdlib/ skylabs-master bc07423
vendored/rocq-stdpp/ skylabs-master e01d802
fmdeps/skylabs-fm/ main 7d620c1
vendored/vsrocq/ skylabs-main 5b4527e

Performance

Relative Master MR Change Filename
+0.00% 122620.9 122620.9 +0.0 total
+0.00% 22464.4 22464.4 +0.0 ├ translation units
+0.00% 100156.5 100156.5 +0.0 └ proofs and tests
Full Results
Relative Master MR Change Filename
+0.00% 122620.9 122620.9 +0.0 total
+0.00% 22464.4 22464.4 +0.0 ├ translation units
+0.00% 100156.5 100156.5 +0.0 └ proofs and tests

@skylabs-ai-ci
Copy link
Copy Markdown

skylabs-ai-ci Bot commented Feb 24, 2026

CI summary (Details)

Active Repos

Repo Job Branch Job Commit Base commit PR
fmdeps/rocq-agent-toolkit/ rocq-pipeline/task-runner/use-futures-for-parallel-tasks 87cacf3 612fe42 #221

Passive Repos

Repo Job Branch Job Commit
./ main 57d9592
fmdeps/BRiCk/ main f324984
fmdeps/auto/ main b5395a0
fmdeps/auto-docs/ main 9f57097
bluerock/NOVA/ skylabs-proof 927947d
bluerock/bhv/ skylabs-main 5a39ba2
fmdeps/brick-libcpp/ main 53842f7
fmdeps/ci/ main d5ff6c5
vendored/elpi/ skylabs-master aa4475f
fmdeps/fm-ci/ main 262fb04
fmdeps/fm-tools/ main 46ed5a6
psi/protos/ main 8fe3e7c
psi/backend/ main 37f7734
psi/ide/ main 6b596cf
psi/data/ main 6c7fffd
vendored/rocq/ skylabs-master 2ede3c9
vendored/rocq-elpi/ skylabs-master 103a742
vendored/rocq-equations/ skylabs-main a8c4832
vendored/rocq-ext-lib/ skylabs-master 94a6630
vendored/rocq-iris/ skylabs-master 3ad4ddd
vendored/rocq-lsp/ skylabs-main a8b7272
vendored/rocq-stdlib/ skylabs-master bc07423
vendored/rocq-stdpp/ skylabs-master e01d802
fmdeps/skylabs-fm/ main 7d620c1
vendored/vsrocq/ skylabs-main 5b4527e

Performance

Relative Master MR Change Filename
-0.00% 122626.6 122626.6 -0.0 total
-0.00% 22464.3 22464.3 -0.0 ├ translation units
+0.00% 100162.3 100162.3 +0.0 └ proofs and tests
Full Results
Relative Master MR Change Filename
-0.00% 122626.6 122626.6 -0.0 total
-0.00% 22464.3 22464.3 -0.0 ├ translation units
+0.00% 100162.3 100162.3 +0.0 └ proofs and tests

Copy link
Copy Markdown
Contributor

@gmalecha-at-skylabs gmalecha-at-skylabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jhaag-skylabs-ai jhaag-skylabs-ai merged commit 5cee0eb into main Feb 26, 2026
68 checks passed
@jhaag-skylabs-ai jhaag-skylabs-ai deleted the rocq-pipeline/task-runner/use-futures-for-parallel-tasks branch February 26, 2026 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants