fix(live-runner): per-signer payment type on the LR path (dual-path sibling to #46)#47
Merged
Merged
Conversation
) The dual-path fix in #46 covers the BYOC payment path (byoc.py). The Live Runner payment path is separate — `_get_runner_payment` in live_runner.py — and it hardcoded `type="live"` for every non-scope runner. The legacy Daydream signer (signer.daydream.live) only accepts `lv2v`, so LR + Daydream returned `400 invalid job type` and payment failed. (The lr-gateway `lv2v` patch only fixed the isolated sidecar, not the gateway itself.) - Move the per-signer helper to `remote_signer.py` as the canonical `_payment_type_for_signer` (the module that owns LivePaymentSession — shared by both payment paths; LR does not depend on the soon-deprecated byoc.py). - `_get_runner_payment`: Scope/LV2V stays "lv2v"; every other runner uses the per-signer dual-path (Daydream → "lv2v", modern → "byoc"). Verified on-chain (via the lr-gateway lv2v patch this generalizes): LR single-shot + Daydream signer → ticket redeems on Arbitrum. Once #46 merges, byoc.py's local copy should import this canonical helper (trivial dedup follow-up). 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 |
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.
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) hardcodedtype="live"for every non-scope runner.signer.daydream.liveonly acceptslv2v→400 invalid job type→ LR payment fails. Thelr-gatewaylv2vpatch 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
_payment_type_for_signermoved toremote_signer.py(the module that ownsLivePaymentSession) so both payment paths share it and LR does not import the soon-deprecatedbyoc.py. Legacy Daydream →lv2v; modern signers →byoc._get_runner_payment: Scope/LV2V stayslv2v; 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
lv2vpatch: LR single-shot + Daydream signer →Payment tickets processed, totalTickets=1on Arbitrum.Follow-up
Once #46 merges,
byoc.py's local_payment_type_for_signercopy should import this canonical one (trivial dedup) — the two PRs touch disjoint files so they merge without conflict.Test
py_compile(passes locally)type:lv2v→ ticket redeems (the Scenario-1 gate)type:byoc(gated on the pymthouse upstream fix + orch byoc-single-shot verification)🤖 Generated with Claude Code