Skip to content

Add a real concurrent-process test for ledger races #4867

Description

@JSONbored

Problem: Only the worktree-allocator has a dedicated test for concurrent-process collisions — portfolio-queue and claim-ledger atomicity are only exercised per-function, not under real concurrent load from two actual processes.

Area: AMS / Testing

Proposal: Add an integration test that spawns two real processes racing the same portfolio-queue/claim-ledger files and asserts no double-claim or corruption occurs.

Deliverables:

  • A real, passing concurrent-process test for both stores.

Scope note: this issue is limited to adding a test harness that spawns two real processes and asserts the existing portfolio-queue/claim-ledger atomicity holds (no double-claim, no corruption). It does not include changing the claim-conflict resolution logic itself (who wins a race) -- if this test uncovers a real race/corruption bug in that logic, the fix must be filed as a separate maintainer-only issue, not folded into this PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions