Skip to content

fix(interpreter): admit concurrent pipeline forks - #2722

Merged
chaliy merged 2 commits into
mainfrom
codex/pipeline-fork-admission
Oct 14, 2026
Merged

chaliy merged 2 commits into
mainfrom
codex/pipeline-fork-admission

Conversation

@chaliy

@chaliy chaliy commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

What changed

Streaming pipeline producers now claim the shared concurrent-job capacity before construction. Owned fork state, pipe metadata, producer vectors and future layouts reserve the request storage budget before allocation. Stage commands borrow the existing AST, and immutable environment/Git configuration stays shared. Cancelled-request cleanup releases retained pipe references.

Why

Eager producer construction previously bypassed live-job admission and storage accounting. Pipe backpressure only begins after construction, so it cannot protect this boundary.

Before / After

Two ordinary { :; } | : admission fixtures failed before the repair: an occupied shared job slot did not reject producer construction, and a zero storage budget did not reject retained fork storage. After the repair both return typed errors before forking.

Seven focused unit fixtures and four ordinary two-stage integration fixtures pass. They cover shared admission, environment ownership, cancellation, drop/reconciliation cleanup, supplied stdin, session reuse, export isolation, sequential mode, lastpipe and a real-Bash comparison. Exact local CLI smoke prints ok followed by 0 0 for PIPESTATUS.

Risk

  • Medium. Streaming producers now count against max_background_jobs; accepted pipelines preserve streaming and isolation. Previously accepted pipelines may return a resource-limit error under a low configured cap.
  • Fork ownership changes must update the conservative storage inventory.
  • Merge requires unchanged required CI to pass and every review comment to be resolved.

Checklist

  • Tests added or updated
  • Backward compatibility considered

Validation

Focused fixtures, workspace Clippy/tests, Git-feature compilation, formatting, all 162 script tests, capability/workflow/changelog/OKF/doc-link checks, cargo vet and rustdoc compilation pass. The pre-PR run initially lacked PyYAML locally; its remaining stages passed after installing PyYAML in an isolated build virtualenv. The reported exhaustion payload was not reproduced. Focused proof uses tiny ordinary inputs. Normal repository quality gates and required CI run under the user's subsequent approval; separate live-provider experiments and production changes remain outside this repair.

Performance validation: the standard Criterion parallel-execution benchmark completed. The ordinary 96-case Bashkit-vs-Bash corpus completed on both latest-main baseline and repair with zero errors and 100% expected-output matches. Aggregate Bashkit mean time was 25.70 ms versus 26.26 ms (+2.2%); the native-Bash control varied +7.1%. These short-run timings are observational; full per-case samples are retained locally.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
bashkit 093fbf7 Commit Preview URL

Branch Preview URL
Oct 14 2026, 02:26 AM

@chaliy
chaliy merged commit c84cd74 into main Oct 14, 2026
49 checks passed
@chaliy
chaliy deleted the codex/pipeline-fork-admission branch October 14, 2026 02:58
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.

1 participant