Skip to content

Model worker pool admission and failure draining - #274

Merged
DocksDocks merged 3 commits into
mainfrom
268-model-the-bounded-worker-pools-failure-drain
Nov 30, 2026
Merged

DocksDocks merged 3 commits into
mainfrom
268-model-the-bounded-worker-pools-failure-drain

Conversation

@DocksDocks

@DocksDocks DocksDocks commented Nov 30, 2026 •

Copy link
Copy Markdown
Owner

Plan run: #268 Model the bounded worker pool’s failure drain

Pull request: #274. Full CI passed. Reviewed head: bb9b23bdffba12ff42f186ebf36420074a0b077d. Base: 26c90afd43cba7e385f4c52de97855c953630ff2.

What changed

  • runBounded accepts new tasks until a worker fails. It then drains active tasks and rejects with the original reason from the lowest failing input index. There is no longer a stop flag, a map of failures, or a final search through every input.
  • Tests cover both failure orders. When the lowest failing input rejects with undefined, the pool waits for the other worker and preserves that reason even if the other worker also fails.

Decisions and corrections

  • The existing API, concurrency limits and result order stay unchanged. The final state records only the failure a caller can observe.

Delegated decisions

Reviews

Plan review passed in round 4. Code review passed in round 3. No findings remain.

Verification

  • A1: inspected the implementation diff. Each phase owns its data.
  • A2: the worker and tidy tests passed on Linux: 61 passed, one Windows-only case skipped.
  • A3: the public tidy --repo … --report command kept the dirty fixture worktree and measured the seeded cache.
  • A4: bun run check:types, targeted Oxlint, and Bun formatting passed.
  • A5: all 10 CI jobs passed on attempt 1. The tested merge was cb6d96bf3bbce8ee3d75172dd351f64fa8965d5c. Its parents match the reviewed base and head. GitHub accepts the required Full CI check.

Limits and failures

  • Did not run the complete bun run check command locally. Do not count the remote gate as a local run.

Kept resources

After merge

Archive #268 and mark its parent row done. A later yolo run on #267 starts the next child.

Checklist

  • bun run check passes locally - the local checks covered the changed code and its callers, not the full suite.
  • bun run check:types passes.
  • Tested locally end to end (A3).
  • The required Full CI check passes.
  • Code review passed.

Closes #268

A failed worker closes admission. Keep only the lowest-index failure
while active tasks drain, including when the reason is undefined.

Verified: worker and tidy tests, isolated tidy CLI, check:types,
targeted Oxlint and Bun formatting.
Observe settlement without asserting in a deferred rejection handler.
A later input error must not replace the earlier undefined reason.

Verified: worker and tidy tests, isolated tidy CLI, check:types,
targeted Oxlint and Bun formatting.
Release a resolved gate and raise the failure inside the task.
An unstarted fixture then cannot emit an unhandled rejection.

Verified: worker and tidy tests, isolated tidy CLI, check:types,
targeted Oxlint and Bun formatting.
@DocksDocks DocksDocks linked an issue Nov 30, 2026 that may be closed by this pull request
@DocksDocks
DocksDocks marked this pull request as ready for review November 30, 2026 23:50
@DocksDocks
DocksDocks merged commit 701e104 into main Nov 30, 2026
10 checks passed
@DocksDocks
DocksDocks deleted the 268-model-the-bounded-worker-pools-failure-drain branch November 30, 2026 23:56
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.

Model the bounded worker pool’s failure drain

1 participant