The claim was the one v0 operation not covered by the public facade: the
handler reached past it into the domain layer, driving
uw.IssueUseCase().ClaimIssue directly and carrying its own conflict type,
its own refusal shaping and its own transaction protocol. That is a
handler doing the library's job.
Claim is now a role of its own beside issueops.Lifecycle and
issueops.Reader, reached by its own accessor rather than appended as a
fifth verb:
- issueops.Claimer, with ClaimRequest, ClaimResult and the typed
ClaimConflictError, which WRAPS the refusal rather than replacing it —
errors.Is, the refusal's exact prose and beads.ParseClaimConflict's
fragments all survive.
- storage.Storage.IssueClaimer(), implemented by both Dolt stores over a
shared storageissueops.ExecuteClaim, and recursed through by the hook
and telemetry decorators.
- uow.IssueClaimerSource / uow.NewIssueClaimer, where the HTTP path's
semantics live, retry included.
handleClaim now does argument validation, asks the provider for the role
and returns the result. The wire is unchanged: no diff under
internal/httpapi/spec or internal/httpapi/apigen, and the existing claim,
spec-parity and bijection suites pass unmodified apart from the storage
commit message, which loses its "bd serve:" prefix now that the operation
is not the server's.
ClaimResult.Issue is deliberately the bare post-state row — no labels,
dependencies or comments, unlike UpdateResult. That is what the shipped
v0 response and `bd update --claim --json` both report today, verified
against an issue that does carry labels; hydrating it here would change
an already-published body.
Breaking for out-of-tree implementations of beads.Storage, which must add
IssueClaimer() to compile. Noted in CHANGELOG.md.
Agent-Signature: claude-opus-5
Co-authored-by: CI Bot <ci@beads.test>