Skip to content

feat(remote_signer): Add BYOC job signing endpoint#3896

Open
seanhanca wants to merge 3 commits intomasterfrom
feat/remote-signer-byoc-v2
Open

feat(remote_signer): Add BYOC job signing endpoint#3896
seanhanca wants to merge 3 commits intomasterfrom
feat/remote-signer-byoc-v2

Conversation

@seanhanca
Copy link
Copy Markdown

Trigger Docker build for testing BYOC signing on staging infra. DO NOT MERGE — waiting for review.

eliteprox and others added 3 commits April 3, 2026 10:04
…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
@github-actions github-actions bot added the go Pull requests that update Go code label Apr 4, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 4, 2026

Codecov Report

❌ Patch coverage is 49.04459% with 80 lines in your changes missing coverage. Please review.
✅ Project coverage is 32.95495%. Comparing base (9e68815) to head (584701d).

Files with missing lines Patch % Lines
server/remote_signer.go 25.60976% 54 Missing and 7 partials ⚠️
core/orchestrator.go 0.00000% 9 Missing and 1 partial ⚠️
byoc/job_orchestrator.go 57.14286% 8 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@                 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     
Files with missing lines Coverage Δ
byoc/types.go 86.66667% <100.00000%> (+32.82052%) ⬆️
byoc/utils.go 47.44526% <100.00000%> (+2.82988%) ⬆️
server/rpc.go 69.23077% <100.00000%> (+0.09497%) ⬆️
byoc/job_orchestrator.go 49.60630% <57.14286%> (+0.95039%) ⬆️
core/orchestrator.go 72.07977% <0.00000%> (-0.62138%) ⬇️
server/remote_signer.go 52.08333% <25.60976%> (-6.55690%) ⬇️

... and 3 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9e68815...584701d. Read the comment docs.

Files with missing lines Coverage Δ
byoc/types.go 86.66667% <100.00000%> (+32.82052%) ⬆️
byoc/utils.go 47.44526% <100.00000%> (+2.82988%) ⬆️
server/rpc.go 69.23077% <100.00000%> (+0.09497%) ⬆️
byoc/job_orchestrator.go 49.60630% <57.14286%> (+0.95039%) ⬆️
core/orchestrator.go 72.07977% <0.00000%> (-0.62138%) ⬇️
server/remote_signer.go 52.08333% <25.60976%> (-6.55690%) ⬇️

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rickstaa rickstaa moved this from Triage to Todo in Engineering Roadmap Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go Pull requests that update Go code

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

3 participants