Repository navigation
feat(httpaction,curl,outboundhttp): per-hop redirect admission, cancellation non-denial, and partial outcome accounting - #2109
Open
chris-beckman wants to merge 2 commits into
Conversation
…llation non-denial, and partial outcome accounting Signed-off-by: Chris Beckman <chris@paintedwolf.ai>
chris-beckman
marked this pull request as draft
November 10, 2026 11:49
…op, and recovery proof Signed-off-by: Chris Beckman <chris@paintedwolf.ai>
chris-beckman
marked this pull request as ready for review
November 10, 2026 12:14
This branch has not been deployed
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.
Depends on #2066 → #2080 → #2083 → #2084 → #2086 → #2090 → #2092 → #2093 → #2095 → #2102
Summary (
UA04Redirect Admission & Truthful Partial Outcomes)Typed Per-Hop Request Facts (
outboundhttp,httpaction):outboundhttp.HopRequest{URL *url.URL, Method string, HostHeader string}andBeforeHopRequest func(context.Context, HopRequest) erroronoutboundhttp.Request, keepingBeforeHopintact for non-httpactioncallers (webresearch,loopwake).HostHeaderacross same-origin redirects (sameOrigin(current, next)) and dropsHostHeaderacross cross-origin redirects (!sameOrigin(current, next)), grounded in the shippedhttp_request.yamlcontract ("drops caller headers across origins"andhost_header:"Override HTTP Host header without changing destination network dial").curl -H "Host: ..."tohttp_requesthost_headerso explicitHostoverrides flow throughhttpaction.Perform, per-hop secret screening, and cookie authority checks.Per-Hop Route Admission & Initial-Hop Loopback Port Extraction (
httpaction,curl):admitHopRouteper hop viaBeforeHopRequest, enforcingegressgate.AwaitHTTPRequeston both the logical target URL and any--connect-to/--resolvedial target selected for that hop.curl.loopbackPortsto the initial request URL (including Hop 0--connect-to/--resolveport remappings) so redirect-only dial mappings do not pre-authorize later loopback hops before Hop 0 runs.Cancellation vs. Denial Separation (
confine,egressgate):confine(askOrCache) andegressgate(awaitEndpoint) do not cache negative verdicts (b.verdict.Store(key, false)/state.denied) or returnHostDeniedErrorwhen the caller/review context is cancelled (context.Canceled/context.DeadlineExceeded), preserving clean same-session recovery.Truthful Partial & Unknown Multi-Hop Outcome Accounting (
outboundhttp,httpaction,curl,test/wiring):RequestsStartedandResponsesReceivedacross redirect hops inoutboundhttpand surfaces them inhttpaction.Outcome/TransportFailureand nativecurloutcome details (http_requests_started,http_responses_received) without fabricatingsent:sha256:...body digest claims for uncompleted or pre-wire failed hops.dns,dial,tlsFault), and post-dial/post-TLS failures before response headers arrive with truthfulEffectCompleted/EffectUnknowncertainty and non-zero exit codes, preventingcommandfrom auto-replaying already-executed Hop 0 exchanges.curladapter (TestCommandProgramCurlRedirectDenialUnknownHopAndRecoveryRealAdapterinlycaon/test/wiring/command_curl_data_path_e2e_test.go).