test(miner-concurrency): parallel-attempt collision regression suite - #4466
Closed
kiannidev wants to merge 3 commits into
Closed
test(miner-concurrency): parallel-attempt collision regression suite#4466kiannidev wants to merge 3 commits into
kiannidev wants to merge 3 commits into
Conversation
…suite Introduce the git-worktree-per-attempt allocator (JSONbored#4297) and prove its concurrency guarantees with parallel acquire, cap enforcement, release reuse, and crash-recovery regression tests. Closes JSONbored#4298 Co-authored-by: Cursor <cursoragent@cursor.com>
…ests Co-authored-by: Cursor <cursoragent@cursor.com>
…tion Replace in-process Promise microtask collision tests with barriered child_process acquires against a shared dbPath so BEGIN IMMEDIATE contention is genuinely exercised. Also fix isProcessAlive EPERM handling. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
kiannidev
marked this pull request as draft
July 9, 2026 20:08
Contributor
|
Important 🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪 🔍 Gittensory is reviewing…AI analysis is in progress. This comment will update when the review is complete. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed · 🟪 Reviewing |
Contributor
|
Gittensory had already started reviewing this pull request — converting it to draft to dodge the one-shot review process is not allowed. Please open a new pull request with the issues addressed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Collision regression suite for the worktree allocator (#4298). Includes a minimal allocator implementation required to run the tests (hard dependency per #4298 — see also #4297).
test/unit/miner-worktree-allocator-collisions.test.tsproving:acquire()returns distinct worktree paths (barrieredchild_processworkers against onedbPath)worktree_capacity_exceeded)release()frees a path for reusetest/fixtures/miner-worktree-allocator/acquire-child.mjshelper for real multi-process contention (replaces in-processPromise.resolve().then()microtasks that never raced onBEGIN IMMEDIATE).test/unit/miner-worktree-allocator.test.tsfor path resolution and basic allocator behavior.packages/gittensory-miner/lib/worktree-allocator.jsas test scaffolding (full allocator tracked separately in feat(miner-concurrency): add git-worktree-per-attempt allocator #4297).Closes #4298
Supersedes #4455 (closed after review feedback).
Test plan
npm run build:minernpx vitest run test/unit/miner-worktree-allocator.test.ts test/unit/miner-worktree-allocator-collisions.test.tsvalidate,codecov/patch, securityReview follow-up
Addresses @JSONbored feedback on PR #4455 review #4666332003: collision tests now spawn multiple Node processes that synchronize on a stdin barrier before calling
acquire()against the same SQLite store, exercising theBEGIN IMMEDIATEraced-recheck path.UI Evidence
N/A — test-only / miner library PR (no visible UI).
Made with Cursor