fix(byoc): per-signer payment type (dual-path) — rescue from prod image into ja/live-runner#46
Merged
Merged
Conversation
The production SDK build (sdk-service:byoc-dual-path-1bf13cd) carries a load-bearing byoc-payment fix that exists in NO branch — only in the running container. This ports it onto ja/live-runner so the unified gateway keeps BYOC payment working (and stops the fix living only as a deployed image). - `_payment_type_for_signer(signer_url)`: legacy Daydream signer (signer.daydream.live) → type:"lv2v" + string `capability`; modern signers (pymthouse DMZ, …) → type:"byoc" + BYOC capabilities protobuf. - `_create_byoc_payment`: build the payment payload + orch-discovery capabilities per the resolved type. - `capabilities.py`: `CapabilityId.BYOC` + `byoc_capabilities_from_app()`. Why this over #41: #41 sends type:"byoc" unconditionally and depends on an undeployed go-livepeer signer+orch change — against signer.daydream.live (which only accepts lv2v today) that reproduces the 2026-07-13 "invalid job type" outage. This per-signer switch is the superset that keeps the legacy signer working while allowing modern signers. It also generalizes to the live-runner payment path (removing the lr-gateway lv2v workaround). Verified: byte-identical to the code running in prod today. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
3 tasks
seanhanca
added a commit
that referenced
this pull request
Jul 18, 2026
…ibling to #46) (#47) Sibling to #46. #46 gives the **BYOC** payment path a per-signer dual-path; this gives the **Live Runner** payment path the same, so selecting an LR runner doesn't break payment on the default (Daydream) signer. ## The bug `_get_runner_payment` (live_runner.py) hardcoded `type="live"` for every non-scope runner. `signer.daydream.live` only accepts `lv2v` → **`400 invalid job type`** → LR payment fails. The `lr-gateway` `lv2v` patch only fixed the isolated sidecar; the gateway itself was still broken for LR + Daydream. Without this, the transparent-routing plan's **Scenario 1 (Daydream + LR) breaks**. ## The fix - Canonical `_payment_type_for_signer` moved to **`remote_signer.py`** (the module that owns `LivePaymentSession`) so **both** payment paths share it and LR does **not** import the soon-deprecated `byoc.py`. Legacy Daydream → `lv2v`; modern signers → `byoc`. - `_get_runner_payment`: Scope/LV2V stays `lv2v`; every other runner uses the per-signer switch. Two files, +28/−2. Both compile. ## Verified Generalizes the exact fix proven on-chain via the lr-gateway `lv2v` patch: LR single-shot + Daydream signer → `Payment tickets processed, totalTickets=1` on Arbitrum. ## Follow-up Once #46 merges, `byoc.py`'s local `_payment_type_for_signer` copy should import this canonical one (trivial dedup) — the two PRs touch disjoint files so they merge without conflict. ## Test - [ ] `py_compile` (passes locally) - [ ] LR + Daydream signer → `type:lv2v` → ticket redeems (the Scenario-1 gate) - [ ] LR + modern signer → `type:byoc` (gated on the pymthouse upstream fix + orch byoc-single-shot verification) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The production SDK (
sdk-service:byoc-dual-path-1bf13cd) carries a load-bearing byoc-payment fix that exists in no branch — only in the running container. That's an operational liability and it blocks a unified gateway. This ports it ontoja/live-runner(the Live Runner + Scope branch, PR #20 → main) so the consolidated gateway keeps BYOC payment working while gaining LR.What
_payment_type_for_signer(signer_url)— legacy Daydream signer (signer.daydream.live) →type:"lv2v"+ stringcapability; modern signers (pymthouse DMZ, …) →type:"byoc"+ BYOC capabilities protobuf._create_byoc_payment— assemble the payment payload + orch-discovery capabilities per the resolved type.capabilities.py—CapabilityId.BYOC+byoc_capabilities_from_app().Two files, +52/−9. Byte-identical to what runs in prod today.
Relationship to #41
PR #41 sends
type:"byoc"unconditionally and depends on an undeployed go-livepeer signer+orch change. Againstsigner.daydream.live(which only acceptslv2vtoday) that reproduces the 2026-07-13 “invalid job type” outage. This PR is the superset: per-signer switching keeps the legacy signer working and enables modern signers. Recommend closing #41 in favor of this.Follow-on
The same per-signer type logic generalizes to the live-runner payment path, which will let us drop the
lr-gatewaylv2vworkaround once this lands.Test
python -m py_compile(passes locally)submit_byoc_jobagainstsigner.daydream.live→type:lv2v→ 200 (no regression)submit_byoc_jobagainst a modern signer →type:byoc+ caps proto → 200🤖 Generated with Claude Code