Skip to content

Use request-scoped EdgeZero HTTP and body ownership - #1527

Draft
ChristianPavilonis wants to merge 3 commits into
review/shared-async-ecfrom
review/edgezero-compatibility
Draft

ChristianPavilonis wants to merge 3 commits into
review/shared-async-ecfrom
review/edgezero-compatibility

Conversation

@ChristianPavilonis

@ChristianPavilonis ChristianPavilonis commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Extract the existing minimum caller port to exact public EdgeZero draft462 revision456313675b6a85e11acea870240f6a6d869f1137.
  • Use the incoming shared HTTP client and preserve body/head transfer, guarded input, exact response ownership and managed Fastly delivery.
  • Remove replaced raw adapter transports without introducing another transport, executor, timer or result ledger.

Draft. Required current-head checks have failed. The current-main forwarding/provenance incompatibility below is not waived.

Stack and exact input

Head: a020daeec30ceae29ae023b7941853cad8bef8de. Base: review/shared-async-ec.

Retain the original demo RC #1424 and its dirty worktrees. No source from excluded #1499 or the independent #1506 implementation is imported or coordinated. Relay/privacy work remains separate. No deployment, live input change, main merge, old-RC retirement or recovery deletion is part of this PR.

Changes

Area Change
Six SDK declarations and lock sources Use one public full revision; registry package versions unchanged from the exported minimum port.
Core HTTP/body/trace/publisher callers Adapt current API and retain protected inputs, cancellation, correlation and caller deadlines.
Four adapters and fixtures Supply the request client and use managed delivery.
Focused regressions Native client, response owner and managed Fastly tests.

Closes

Closes #1523.

Spec

Not a feature. This is the scoped demo caller/API port, independent of the separate broad cutover/spec initiative. It reuses completed upstream minimum compatibility #460; buffer-group, codec-subset, phase-timeout, TLS/cap-policy and relay/privacy experiments remain excluded.

Test plan

Compatibility stop: selected SDK4563136 removes X-Forwarded-Host/Proto before app.begin_ingress, while current TS main's credential-authenticated ForwarderPreparation needs those assertions afterward. The isolated test-only constructor correction compiles and strict CLI Clippy passes, but real proxy regressions still return403 instead of200 and lose the browser authority/port. No trust policy, SDK hook/order change, raw-header fallback or assertion relaxation was implemented. Execution is paused for the scope choice between compatible-baseline demo cleanup and separately scoped current-main forwarding/provenance compatibility.

Source: SDK native boundary. Native proxy regression output is retained privately with exact tested patches. Parity API compile and earlier Fastly EOF failures remain open. Narrow local fixture/profile work is preserved but unpublished; it is not a full current-head pass.

The inherited HTTP fixture now uses pbs.example.com instead of a TEST-NET IP rejected by the repository domain linter. All27 focused auction-plan tests and strict Core Clippy passed on that test-only correction; no allowlist/suppression, behavior or assertion was relaxed. Other unchanged-input results below remain bounded to their recorded source.

Exact source committed in232975ab4, followed only by lower-layer review documentation merges: Core3382 passed/2 existing ignores; native client20 passed; Axum suite and Core/Axum strict Clippy/format passed. Registry version-set comparison against the exported port has no additions/removals. The later native descendant's WASM compile results are not presented as this head's full gate result. Fresh current-head CI, required broader tests and EOF/deadline runtime checks remain pending.

  • Complete required current-head gates in AGENTS.md before review readiness.
  • Record all failed, ignored or unavailable checks without counting them as passes.

Checklist

  • Scope is the existing demo extraction and minimum caller adaptation.
  • Feature contract/review history is linked where applicable, without backdating approval.
  • Synthetic test/operator examples only; no credentials, state or licensed Geo inputs added.
  • Original work, PR identities and parked experiments remain preserved.
  • Final combined checkpoint and affected-delta review complete.

@aram356
aram356 added this pull request to stack #1542 November 11, 2026 06:48

@prk-Jr prk-Jr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: REQUEST_CHANGES

Reviewed a020daeec30ceae29ae023b7941853cad8bef8de against base e529e5576c1052f0d2fb40a4f9920f0428e6e633. Six actionable findings are attached inline. All corrections are prose proposals; no one-click suggestions are included.

🔧 Additional runtime blockers: Fastly HTML EOF hangs, assembled winning bids are missing, and browser/integration checks fail. Their root causes remain unresolved; I have not attributed them to the inline findings.

Evidence combines exact pinned SDK source and current-head CI logs. Local Rust formatting passed. No full local suite or fresh runtime reproduction was performed; the forwarding, response-cap, and TLS conclusions are source-established.

CI status

let dispatch = match preflight(&self.settings, request) {
prepare_trusted_forwarder_parts(request.parts_mut(), &self.settings);
let dispatch = match preflight(&self.settings, request.parts_mut()) {
TracePreflight::NotTrace => {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔧 P1 — Native forwarding loses the authenticated public origin.

TS captures forwarding assertions after the new SDK has stripped them. Valid CLI-proxied trace actions consequently fail origin validation with 403, and publisher rewriting loses the browser authority/port. Preserve authenticated capture before sanitization through a compatible SDK boundary. This blocker is already disclosed in the PR; Fastly’s earlier capture protects its path.

Comment thread Cargo.toml
edgezero-adapter-spin = { git = "https://github.com/IABTechLab/edgezero", tag = "v0.0.11", default-features = false }
edgezero-cli = { git = "https://github.com/IABTechLab/edgezero", tag = "v0.0.11" }
edgezero-core = { git = "https://github.com/IABTechLab/edgezero", tag = "v0.0.11", default-features = false }
edgezero-adapter-axum = { git = "https://github.com/IABTechLab/edgezero", rev = "456313675b6a85e11acea870240f6a6d869f1137", default-features = false }

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔧 P1 — The SDK migration leaves existing test consumers uncompilable.

The dependency bump breaks CLI fixtures using the old AxumDevServer constructor/configuration and parity fixtures importing EdgeZeroAxumService and using the previous stream error type. Hosted CI confirms these compilation failures. Migrate these consumers while retaining their behavioral assertions.

match self.target {
AuctionTargetId::Fastly | AuctionTargetId::Cloudflare => Some(10 * 1024 * 1024),
AuctionTargetId::Spin => Some(8 * 1024 * 1024),
AuctionTargetId::Axum => None,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔧 P2 — Axum accidentally inherits a 1 MiB response ceiling.

This leaves Axum’s limit unset, which retains the SDK’s 1 MiB buffered default. A previously supported 2 MiB publisher response will therefore fail before processing, despite the publisher’s default 16 MiB limit. Set an explicit compatible response policy and preserve caller limits.

.backend(Arc::new(FastlyPlatformBackend))
.http_client(Arc::new(FastlyPlatformHttpClient))
.http_client(
trusted_server_core::platform::EdgeZeroHttpClient::for_request(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔧 P2 — Fastly ignores the registered certificate policy.

The replacement client uses backend_name only for correlation. The SDK creates another backend with certificate verification enabled, so documented proxy.certificate_check = false configurations stop supporting self-signed development origins. Preserve this existing setting through the shared transport contract or select a compatible SDK revision.

@@ -1,33 +1,44 @@
//! Local runtime fixture exercising the production HTTP client implementation.
//! Local fixture using the production request-local EdgeZero client and driver.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔧 P2 — Both worker deadline fixtures fail lint before runtime execution.

Their new first-line comments contain bare EdgeZero, triggering clippy::doc_markdown under -D warnings. Backtick the name in both this Cloudflare fixture and crates/trusted-server-adapter-spin/tests/runtime/deadline.rs:1.

/// ```
pub async fn assert_sign_inputs(router: &RouterService) {
let valid = Body::stream(futures::stream::iter([
Bytes::from_static(b"{\"url\":\"https://asset."),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔧 P2 — The streamed signing fixture fails the domain gate.

The fixture splits the URL after https://asset.; the linter recognizes disallowed host asset. Move the frame boundary before the URL scheme while preserving the streamed JSON test. No allowlist change is needed.

@aram356

aram356 commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

CREATOR: From the server-side identity plan (#1559, c7dc9de77): Proposed closure, for the author to decide: #1527 once its tests move (DEC-1).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extract the demo's request-scoped SDK compatibility port

3 participants