Skip to content

Wire claim-ledger.js's real claimIssue() into the attempt pipeline #5393

Description

@JSONbored

Problem: claim-ledger.js's claimIssue() (the soft-claim mechanism meant to prevent two miners from colliding on the same issue) is never called by the real attempt pipeline. attempt-runner.js only ever requires deps.claimLedger.listClaims — it reads existing claims for the freshness check (checkSubmissionFreshness) but never actually claims the issue it's about to work on. The only real callers of .claimIssue( anywhere in the package are the standalone gittensory-miner claim subcommand (a manual operator tool) and the module's own unused convenience wrapper. In a world with more than one miner running against the same repo pool, nothing in the automated pipeline stakes a real claim before starting work, so two miners can pick up and attempt the same issue concurrently with no coordination.

Area: Miner / Claim coordination

Proposal: Have attempt-cli.js's runAttempt (or loop-cli.js, whichever owns the claim's lifecycle) call claimLedger.claimIssue() for real before invoking runMinerAttempt, and release/expire it appropriately on every terminal outcome (submitted, abandoned, blocked, governed) — mirroring how worktree-allocator.js's slot is acquired/released today.

Deliverables:

  • A real claim is written to the local claim ledger before an attempt starts, and cleared/expired on every real terminal outcome.

Acceptance criteria:

  • gittensory-miner claim list shows a real active claim while an attempt is in flight, and it clears (or expires) once the attempt finishes.
  • A second concurrent attempt/loop invocation against the same repo+issue observes the existing claim (via the freshness check or a new explicit conflict check) rather than duplicating work silently.

Boundaries:

Metadata

Metadata

Assignees

Labels

gittensor:bugGittensor-scored bug fix — scores a 0.05x multiplier.maintainer-onlyOwner-only work — yields no Gittensor points.

Projects

Status
Done

Relationships

None yet

Development

No branches or pull requests

Issue actions