-
-
Notifications
You must be signed in to change notification settings - Fork 90
test(miner-concurrency): add parallel-attempt collision regression suite #4298
Copy link
Copy link
Closed
Labels
gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.gittensor:priorityMaintainer-selected Gittensor priority — scores a 1.5x multiplier.Maintainer-selected Gittensor priority — scores a 1.5x multiplier.help wantedExtra attention is neededExtra attention is needed
Description
Metadata
Metadata
Assignees
Labels
gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.gittensor:priorityMaintainer-selected Gittensor priority — scores a 1.5x multiplier.Maintainer-selected Gittensor priority — scores a 1.5x multiplier.help wantedExtra attention is neededExtra attention is needed
Projects
StatusShow more project fields
Done
This depends on the git-worktree-per-attempt allocator (sibling Phase 6 issue,
feat(miner-concurrency): add git-worktree-per-attempt allocator) landing first — there is nothing to regression-test untilacquire/releaseexist. Filing this now so the dependency is visible in the tracker, but a contributor should pick up the allocator issue first (or claim both together).Once the allocator exists, this is a focused regression suite proving the concurrency guarantees the allocator issue's deliverables promise, rather than just its happy path: that concurrent
acquire()calls never hand out the same worktree path, thatrelease()correctly frees a path for reuse, that the configured concurrency cap is actually enforced under simultaneous requests (not just checked sequentially), and that a simulated crash (an allocation recorded as active with no live owner) is reclaimed on the next startup rather than either double-allocated or leaked forever.Deliverables
test/unit/miner-worktree-allocator-collisions.test.ts(or fold into the allocator's own primary test file if that ends up small enough — match whatever filename the allocator issue actually lands, sincetest/unit/miner-*.test.tsis the established location pertest/unit/miner-claim-ledger.test.tsand siblings).acquire()calls (e.g. viaPromise.all) and assert all N returned paths are distinct.release()a path, thenacquire()again, and assert the freed path becomes available (not permanently retired).node:sqlite-backed local-store tests use a temp DB path per test — seetest/unit/miner-claim-ledger.test.ts/test/unit/miner-run-state.test.tsfor the setup/teardown pattern already in use).References
feat(miner-concurrency): add git-worktree-per-attempt allocator(Phase 6) — hard dependency, must land first.test/unit/miner-claim-ledger.test.ts,test/unit/miner-run-state.test.ts— existing SQLite-backed local-store test setup/teardown pattern to reuse for the allocator's own store.