dependabot[bot] [Sat, 28 Feb 2026 14:14:18 +0000 (14:14 +0000)]
chore(deps): bump minimatch in the npm_and_yarn group across 1 directory (#3140)
Bumps the npm_and_yarn group with 1 update in the / directory: [minimatch](https://github.com/isaacs/minimatch).
Updates `minimatch` from 10.2.2 to 10.2.4
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/minimatch/compare/v10.2.2...v10.2.4)
Jérôme Benoit [Sun, 22 Feb 2026 22:51:47 +0000 (23:51 +0100)]
test: add custom toMatchObject matcher for @std/expect compatibility
Implement custom Vitest matcher that replicates @std/expect's toMatchObject
semantics for arrays. The matcher handles sparse array subset matching where
only defined indices are compared, matching the behavior of @std/expect's
spread-based algorithm in _equal.ts.
This fixes 8 failing tests in queue test files that use toMatchObject with
sparse arrays created via new Array(capacity).
Jérôme Benoit [Sun, 22 Feb 2026 20:34:09 +0000 (21:34 +0100)]
fix(build): exclude vitest.config.ts from TypeScript build
The vitest.config.ts file was being included in the TypeScript
compilation via tsconfig.json's **/*.ts include pattern. This caused
rollup-plugin-dts to fail when looking for ./lib/index.d.ts.
Adding vitest.config.ts to the exclude array fixes the build.
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
* fix: add defensive checks for worker node affinity in selection strategies
- Add bounded loops to prevent infinite loops when no valid worker in affinity set
- Add empty/single-key checks in all strategies
- Add comprehensive tests for workerNodeKeys affinity
* fix: add empty array guard and fix iteration in worker node affinity strategies
* refactor(selection-strategies): extract getSingleWorkerNodeKey helper to reduce duplication
Consolidate the early-return pattern for single-element workerNodeKeys
array into a reusable protected method in AbstractWorkerChoiceStrategy.
All 7 selection strategies now use this helper instead of duplicating
the same check and isWorkerNodeReady call.
* fix(selection-strategies): correct affinity handling and optimize to O(1) lookup
- Fix WeightedRoundRobin: check affinity membership before using workerNodeKey
- Fix InterleavedWeightedRR: add wrap-around to find valid workers behind current position
- Optimize: change checkWorkerNodeKeys() to return Set<number> for O(1) .has() lookup
- Update all 7 strategies to use Set.has() instead of Array.includes()
The retry mechanism in executeStrategy() already handles the case where
choose() returns undefined. Each call advances the position via
interleavedWeightedRoundRobinNextWorkerNodeId(), eventually covering
the entire (roundId, workerNodeId) space.
Removed the interleavedWeightedRoundRobinChoose() helper method and
inlined the logic directly in choose() for simplicity.
* refactor(api): rename workerNodes to workerNodeKeys for clarity
Rename the task function affinity property from 'workerNodes' to
'workerNodeKeys' to avoid confusion with pool.workerNodes (IWorkerNode[])
and align with internal naming conventions where keys refer to indices.
* test(selection-strategies): add workerNodeKeys affinity tests for all strategies
Add comprehensive tests for worker node keys affinity in choose() method:
- Empty workerNodeKeys returns undefined
- Single workerNodeKey returns that key if ready
- Multiple workerNodeKeys respects affinity constraint
* refactor: rename checkValidWorkerNodes to checkValidWorkerNodeKeys
Align function name, parameter name, and error messages with actual
semantics: the function validates worker node keys (numeric indices),
not worker node objects.
* refactor: eliminate unnecessary Set/Array allocations in worker node affinity hot paths
- Remove workerNodeKeys getter from IPool interface and AbstractPool
- Replace new Set(this.workerNodeKeys) validation with O(1) range checks
- Rename getTaskFunctionWorkerNodes() to getTaskFunctionWorkerNodeKeysSet()
returning Set<number> directly from source
- Propagate Set<number> through execute() → executeStrategy() → choose()
eliminating intermediate array-to-Set conversions
- Replace new Set(this.workerNodes.keys()) in sendTaskFunctionOperationToWorkers()
with direct workerNodes.length/keys() usage
* fix(wrr): update state in single-element affinity shortcut
Reset nextWorkerNodeKey and workerNodeVirtualTaskExecutionTime in the
size === 1 path to maintain consistent round-robin state.
* fix: address Copilot review comments
- Check affinity before creating dynamic worker
- Add null to workerNodeKeys signature
- Fix anchor link and document length constraint
* chore: disable biome formatter in opencode
* perf(strategies): fast path for round-robin without affinity
* test: consolidate worker choice strategies test suite
* test: verify workerNodeKeys transmission from worker constructor
* fix: address Copilot review concerns for worker node affinity
- Snapshot workerNodeKeys in sendTaskFunctionOperationToWorkers to prevent race conditions
- Use ReadonlySet<number> for workerNodeKeysSet in selection strategies for type safety
- Compute workerNodeKeysSet lazily instead of storing in TaskFunctionProperties
- Allow null in workerNodeKeys type to explicitly disable affinity
* fix: improve error message grammar in addTaskFunction validation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
* fix: validate worker node keys against max pool size and fix single-key state update
- Validate workerNodeKeys against maximumNumberOfWorkers instead of current
pool size, allowing dynamic pools to reference future worker indices
- Only update nextWorkerNodeKey in RR/WRR single-key path when worker is
ready, preventing state inconsistency on retry
- Clarify TaskFunctionObject.workerNodeKeys doc regarding null vs undefined
In dynamic pools, when a task's workerNodeKeys affinity references
worker nodes beyond the current pool size, automatically create
dynamic workers up to the maximum pool size to satisfy the affinity.
* test: harmonize variable naming in dynamic worker affinity test
* refactor: consolidate worker node keys validation into helper and enforce error types in tests
* fix: remove unused null from workerNodeKeys type and restore test suite title
* docs: mention worker node affinity feature in README
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
* refactor: use project max helper instead of Math.max
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
dependabot[bot] [Sat, 14 Feb 2026 23:26:25 +0000 (00:26 +0100)]
chore(deps): bump markdown-it (#3120)
Bumps the npm_and_yarn group with 1 update in the / directory: [markdown-it](https://github.com/markdown-it/markdown-it).
Updates `markdown-it` from 14.1.0 to 14.1.1
- [Changelog](https://github.com/markdown-it/markdown-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/markdown-it/markdown-it/compare/14.1.0...14.1.1)