feat(remote_signer): Add BYOC job signing endpoint#3896
Open
feat(remote_signer): Add BYOC job signing endpoint#3896
Conversation
…ys advertise capabilities prices - Introduce FlattenBYOCJob (V1 binary format with LP_BYOC_JOB_V1 domain separator) in byoc/types.go to prevent cross-protocol signature replay. - Update gateway sign() and orchestrator verifyJobCreds() to use V1 format; remove V0 legacy path. - Improve payment error handling in job_orchestrator: reject when payment header is present but invalid, always return non-nil balance from processPayment. - Add BYOC pricing branch in core/orchestrator.go priceInfo() using GetPriceForJob for Capability_BYOC capabilities, with sender -> "default" fallback. - Guard fixed-price lookup with Balances != nil check. - Always call GetCapabilitiesPrices in orchestratorInfoWithCaps so BYOC capability prices are advertised regardless of whether the request includes capabilities. - Update rpc_test.go: add CapabilitiesPricesError test, fix mock to return error properly, assert empty (not nil) CapabilitiesPrices when no external capabilities exist. Made-with: Cursor
…ling
- Add POST /sign-byoc-job endpoint that signs BYOC job credentials using the V1
binary format (FlattenBYOCJob) and returns {sender, signature}.
- Add RemoteType_BYOC ("byoc") job type to GenerateLivePayment with time-based
billing: 120-second preload on first request, elapsed-time billing thereafter.
- Add resolvePriceInfo() to find effective BYOC PriceInfo from OrchestratorInfo
CapabilitiesPrices (Capability=BYOC, Constraint=<name>).
- Use capability constraint as manifest ID for shared balance tracking when
manifest_id is omitted in BYOC requests.
- Add ManifestID json tag for proper serialization.
- Add tests for resolvePriceInfo and missing BYOC capability constraint validation.
Made-with: Cursor
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3896 +/- ##
===================================================
+ Coverage 32.87450% 32.95495% +0.08045%
===================================================
Files 171 171
Lines 42063 42197 +134
===================================================
+ Hits 13828 13906 +78
- Misses 27194 27241 +47
- Partials 1041 1050 +9
... and 3 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
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.
Trigger Docker build for testing BYOC signing on staging infra. DO NOT MERGE — waiting for review.