Skip to content

fix(join): budget generated output and synchronous work - #2713

Merged
chaliy merged 3 commits into
mainfrom
codex/join-execution-budget
Oct 13, 2026
Merged

chaliy merged 3 commits into
mainfrom
codex/join-execution-budget

Conversation

@chaliy

@chaliy chaliy commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

What changed

Join reserves shared live-memory capacity before generating matching-row
products. Parsing, key grouping and emission consume shared work and check
cancellation/deadlines. Budget failures abort the execution as resource errors;
ordinary many-to-many output remains complete through pipelines and redirects.

Why

Join previously built its full result in an ordinary String before dispatcher
accounting. Its synchronous matching loops did not poll execution limits.

Before / After

Ordinary inputs a 1 / a 2 and a x / a y have two rows per table. With a
70-unit work budget, unchanged main returned all four rows: the required-error
fixture failed, exit 101. With this patch the fixture passes: the public API
returns a work-budget resource error and the session accepts a later execution.
The same ordinary inputs under normal limits produce exactly:

a 1 x
a 1 y
a 2 x
a 2 y

Verified in the default CLI with producer exit 0 and an exact-output assertion.
Five ordinary option combinations match GNU join. A stdout capture limit of
8 bytes still permits 24 complete output bytes through a pipe and VFS redirect.
Small unit tests cover memory admission, generated work, cancellation, deadline
mapping, contextual Unicode lowercasing, and the stream's byte/text copy.

Risk

Medium: join now rejects requests that exceed configured live-memory, aggregate
input or work budgets. Small budgets may reject valid matching rows. GNU output
semantics remain unchanged when budgets admit the work.

Checklist

  • Ordinary failing-before/passing-after fixtures
  • Clippy across all targets/features
  • Knowledge, threat model and public guides updated
  • Ordinary GNU differential and default CLI smoke
  • Full just pre-pr, just test, all-target/all-feature Clippy
  • Dependency advisory gate repaired separately in fix(deps): replace archived YAML parser with maintained fork #2704; unchanged deny/vet green
  • Parallel benchmark and final 96-case Bashkit/Bash benchmark (0 errors, 100% output match)
  • 49 CI checks green, complete PR reviews, squash merge and 20 exact-merged tests plus CLI output assertion

Builds on the separately merged dependency repair in #2704. Existing resource
limits and CI definitions are unchanged. Benchmark histories are retained; the
parallel results vary on the shared machine and do not isolate join overhead.

@cloudflare-workers-and-pages

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 bddf43b Commit Preview URL

Branch Preview URL
Oct 13 2026, 04:31 AM

@chaliy
chaliy merged commit c3ce522 into main Oct 13, 2026
49 checks passed
@chaliy
chaliy deleted the codex/join-execution-budget branch October 13, 2026 04:50
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