Rs/single shot payment review followups#3983
Closed
rickstaa wants to merge 5 commits into
Closed
Conversation
|
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 |
dd5c866 to
a96f33f
Compare
Pre-existing working-tree cleanup of ProxyLiveRunnerSingleShot: drop the reservedID/reservedIDInput split, release the reserved session on return, and remove the redundant session/manifest recheck.
- Drop the ModifyResponse block (Session-Id/Control/Payment response headers). WebSocket clients cannot read upgrade response headers, and SSE/HTTP clients derive the session-scoped payment URL from the 402 challenge (manifest_id + orchestrator), so the headers were redundant. Removes the now-unused Session-Payment constant, sessionPaymentURL, and the response-header test assertions. - Surface payment_interval_ms in the 402 challenge so held-open clients (SSE/websocket) size their payment cadence below the server tick instead of guessing. - Rename startLiveRunnerSessionPaymentMonitor to ...PaymentLoop to match the startAutoConvertLoop convention (a start* method that owns its own goroutine); monitorCtx to loopCtx to match. - Type the payment loop manifestID as core.ManifestID instead of a bare string, converting at the single use site, so it cannot be transposed with the adjacent runnerID/sessionID params. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The metering loop is now bound to the ctx passed in rather than always detaching via context.WithoutCancel. Single-shot passes the request ctx (r.Context()), so the loop stops when the request returns instead of lingering up to one LivePaymentInterval; the persistent path passes context.WithoutCancel(ctx) so its loop outlives the reservation request and stops when the session is released. Matches the startAutoConvertLoop convention: the caller owns the lifetime via the context. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
a96f33f to
6737b7a
Compare
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.
Quick PR to compare with the
ja/live-runnerbranch.