Skip to content

[codex] Add bounty ownership transfer endpoint#2796

Open
caydyan wants to merge 1 commit into
stakwork:masterfrom
caydyan:codex/transfer-bounty-ownership
Open

[codex] Add bounty ownership transfer endpoint#2796
caydyan wants to merge 1 commit into
stakwork:masterfrom
caydyan:codex/transfer-bounty-ownership

Conversation

@caydyan

@caydyan caydyan commented Jun 13, 2026

Copy link
Copy Markdown

Summary

  • add a protected PATCH /gobounties/owner/transfer endpoint for moving unpaid workspace bounties from one owner pubkey to another
  • require the requester to be the workspace owner, source owner, or hold workspace bounty-management permission
  • require the target owner to exist and belong to the workspace before transfer
  • add the database ownership update method and focused handler tests

Why

Addresses #1919. Core Lightning moved from a V1 account to a V2 account while active bounties remained owned by the V1 account. This provides a bounded migration path without exposing a broad unauthenticated owner rewrite.

Validation

  • go test ./handlers -run TestTransferBountyOwnership -count=1
  • go test ./db -run TestNonExistent -count=0
  • go test ./... -run TestNonExistent -count=0
  • git diff --check

@caydyan caydyan marked this pull request as ready for review June 13, 2026 23:03
@caydyan

caydyan commented Jun 14, 2026

Copy link
Copy Markdown
Author

Current-head validation rerun on bd7f775:

  • go test ./handlers -run TestTransferBountyOwnership -count=1 -v passed, including both ownership-transfer handler subtests.
  • go test ./... -run ^$ passed as a compile/no-test package sweep.
  • git diff --check origin/master...HEAD passed.

The focused handler test uses mocks, so it ran without the local Postgres test database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant