{"record":{"id":"75dd6ad20e35f504","repo":"gastownhall/beads","slug":"ready-claim-of-s-reported-success-but-did-not-lan","errorCode":null,"errorMessage":"ready claim of %s reported success but did not land (found assignee=%q status=%q, want %s) — server likely degraded; treat the claim as NOT applied","messagePattern":"ready claim of (.+?) reported success but did not land \\(found assignee=%q status=%q, want (.+?)\\) — server likely degraded; treat the claim as NOT applied","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/storage/dolt/issues.go","lineNumber":442,"sourceCode":"\tclaimed, err := write()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif claimed == nil || !s.serverMode {\n\t\treturn claimed, err\n\t}\n\tassignee, status, verr := s.readReadyClaimState(ctx, claimed.ID)\n\tif verr != nil {\n\t\treturn nil, fmt.Errorf(\"ready claim of %s reported success but could not be verified (server degraded?): %w — re-read the issue before trusting the claim\",\n\t\t\tclaimed.ID, verr)\n\t}\n\tpost := claimedBy(actor)\n\tif post.want(assignee, status) {\n\t\treturn claimed, nil\n\t}\n\tdoltMetrics.claimVerifyLost.Add(ctx, 1, metric.WithAttributes(\n\t\tattribute.String(\"op\", \"ready-claim\")))\n\treturn nil, fmt.Errorf(\"ready claim of %s reported success but did not land (found assignee=%q status=%q, want %s) — server likely degraded; treat the claim as NOT applied\",\n\t\tclaimed.ID, assignee, status, post.desc)\n}\n\n// HeartbeatIssue refreshes the lease on an issue actor holds in_progress,\n// pushing lease_expires_at forward on its row in the ephemeral leases table\n// (see issueops.lease). Deliberately NO DOLT_ADD/DOLT_COMMIT: the leases\n// table is dolt_ignored, so a heartbeat mints no commit and no history — this\n// is the whole point of bd-lrgn1 (fleet heartbeats were the dominant source\n// of unbounded reachable history). Wrapped in withRetryTx so a heartbeat that\n// loses Dolt's optimistic merge to a concurrent reclaim/close on the same\n// lease row is replayed against a fresh snapshot rather than surfaced.\nfunc (s *DoltStore) HeartbeatIssue(ctx context.Context, id, actor string) error {\n\tif s.isActiveWisp(ctx, id) {\n\t\t// Wisps are ephemeral and never leased; nothing to heartbeat.\n\t\treturn fmt.Errorf(\"%w: %s is ephemeral\", storage.ErrNotClaimable, id)\n\t}\n\treturn s.withRetryTx(ctx, func(tx *sql.Tx) error {\n\t\treturn issueops.HeartbeatIssueInTx(ctx, tx, id, actor)","sourceCodeStart":424,"sourceCodeEnd":460,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/internal/storage/dolt/issues.go#L424-L460","documentation":"After a ready-claim write reported success, verifiedReadyClaim re-read the row and found assignee/status that do not satisfy the claim's postcondition (claimedBy(actor).want). This indicates the write was lost or reverted — likely a degraded server — so the library returns an error telling the caller to treat the claim as NOT applied.","triggerScenarios":"Ready claim reports success, but readReadyClaimState returns an assignee/status that fails post.want(assignee, status) — e.g. another actor already holds the claim, the issue was closed concurrently, or the write silently did not persist.","commonSituations":"Two agents claiming the same ready issue concurrently; a Dolt server in a degraded state dropping writes; replica/leader divergence after failover.","solutions":["Treat the claim as failed and re-run bd ready (or re-check bd ready) to see the current holder","Check the actual assignee/status shown in the error; if another actor holds it, pick a different ready issue","Investigate server health if claims are repeatedly lost (degraded/replayed writes)","Upgrade/restart the Dolt server and verify write durability before resuming agent loops"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Re-read the issue before assuming the claim landed\nconst { assignee, status } = await bd.show(issueId);\nif (assignee !== expectedActor) throw new Error(\"claim not held by expected actor\");","typeGuard":"function claimLandedFor(issue, actor) {\n  return issue && issue.assignee === actor && issue.status === \"in_progress\";\n}","tryCatchPattern":"try {\n  await bd.readyClaim(actor);\n} catch (e) {\n  if (String(e.message).includes(\"did not land\")) {\n    // treat claim as NOT applied; refresh ready list and pick another issue\n  } else throw e;\n}","preventionTips":["Avoid multiple agents claiming the same issue concurrently; use a coordination layer","Restart/upgrade degraded Dolt servers promptly","After any claim, verify assignee/status before starting work","Handle duplicate-claim races by refreshing the ready list instead of force-claiming"],"tags":["claim-lost","concurrency","server-degraded","verification"],"backgroundTag":"claim-not-applied","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}