Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Unregister requests can exceed the intended deadline while waiting on the payment mutex, and absent-runner requests can access shared payment state without authentication.
2 open issues
What changed in this PR
This PR adds a durable ticket-handoff boundary to runner retirement and redemption destination changes, supporting managed paid-orchestrator lifecycle operations.
Changes:
- Return 503 while external ticket handoff is pending or unavailable, including after registration loss.
- Fence receipts from removed app registrations to prevent late ticket commits.
- Allow destination changes after durable acknowledgement, without waiting for settlement, while retaining signed-nonce checks.
| File | Description |
|---|---|
redemption/state.go |
Adds handoff-drain checks and updates destination-change eligibility. |
redemption/http_test.go |
Tests acknowledgement, restart persistence, and destination changes. |
orchestrator/registry.go |
Fences removed registrations and checks handoff before completing unregister. |
orchestrator/payment_engine.go |
Rejects receipts tied to retired app registrations. |
orchestrator/drain_test.go |
Tests retirement retries and receipt fencing during validation. |
Review effort: Balanced
| r.mu.Lock() | ||
| defer r.mu.Unlock() | ||
| current := r.runners[id] | ||
| if current != nil && (current.Static || !equalSecret(current.Credential, auth)) { |
There was a problem hiding this comment.
Reviewed with Astra. We’re keeping this behavior in this PR to preserve retirement retries after removal, expiry, or restart, when the scoped credential is no longer available to authenticate against. Requiring bootstrap authentication would reject retries using the original scoped credential; retaining and authenticating it across restart needs a separate recovery protocol.
The absent-runner path reports coarse busy/clear status and cannot remove a live runner without its credential. The mutex-wait issue is fixed in 386aa8f.
|
Closing unmerged after reviewing the requirements with Astra and coordinating with livepeer/control-center#3. Runner unregister was incorrectly used to gate Node-wide payment handoff. Existing durable storage and retry behavior support ordinary orchestrator replacement with retained state, so this PR is unnecessary for that workflow. Control Center is removing the synthetic unregister/payment probe and dependency on this PR. Disabling paid processing or changing retained-state ownership requires an explicit configuration-transition policy; it must not be inferred from runner retirement. |

Runner unregister returns 503 until external redeemers durably acknowledge outstanding winning tickets, including after registration loss or restart. Receipts are fenced during removal; destination changes use the same handoff boundary while retaining signed-nonce checks.
Validation: full repository race suite with pinned Go and Python SDK fixtures, go vet, and Staticcheck v0.8.2.
Required by livepeer/control-center#3 for livepeer/naap-ops#119.