Repository navigation
Conversation
Brings the provider stack, including the EdgeZero cutover (#1506), into the cross-adapter health and startup-failure contract, and keeps the contract on every adapter. Core: the probe pre-dispatch hook takes EdgeZero's PreDispatchRequest, and its tests drive the hook through a router with run_pre_dispatch_hook, because PreDispatchRequest cannot be built outside EdgeZero. Fastly: the cutover's handle_request, assemble_app and finalize_response stay. Liveness is built from the shared probe response and sent natively. A new initialize_dispatch runs the sandbox initialization, answers GET and HEAD /ready from its result, and answers a failed assembly on the seven publisher fallback methods with the fixed 503, logging the assembly error that EdgeZero's assembly-error response would have logged. Other methods keep EdgeZero's assembly-error response. finalize_response skips operational responses as it skips trace responses. The retained router wraps the trace hook in the probe hook. Fastly needs no failure router, so the PR's Fastly startup_error_router and its matrix test go; the matrix moves to main.rs and runs through initialize_dispatch and the native conversion. Axum, Cloudflare and Spin: Hooks::routes logs the report and returns the PR's failure router instead of failing assembly, so liveness stays 200 and /ready and every supported route answer the fixed 503. The routers keep the cutover's middleware and Axum's received-head preparer, with the probe hook around the trace hook. The cutover's EdgeZero managed logger already gives Cloudflare and Spin a production log sink, so the PR's adapter loggers are dropped. Tests: the cutover's startup tests are moved to the contract. Fastly's missing-blob test checks the fixed 503 for GET, the assembly error for TRACE, then recovery. The Cloudflare and Spin routes() tests serve the failure router. The Axum binary test now requires the binary to keep listening with live health and a 503 /ready and page, in place of a non-zero exit. The two Axum connection-entry tests move from /health, which now bypasses configured response headers, to the identify preflight. The probe parity test takes the cutover's forbidden-router tuple and also asserts that probes send no outbound request. Docs: the API reference, adapter guides, READMEs, AGENTS.md and CHANGELOG keep both sides. Startup statements now describe the contract: no Axum exit, no Spin /health 503, no Cloudflare JSON 500, with the Fastly logger-failure case and the Fastly assembly error for unsupported methods kept. The smoke-axum.sh negative cases stay on the PR's 503 contract with EdgeZero's port variable.
Brings the identity integration chain, now including the health and startup contract (#1617) on the EdgeZero cutover (#1506), into the creative proxy disclosure policy, and keeps the policy on every adapter's proxy path. Core proxy: proxy_request keeps the cutover's EdgeZero outbound client and redirect follower. The creative identity policy now runs at the cutover's two check points. The first target passes check_proxy_target, then CreativeHops rejects userinfo, rewrites the reserved ts-ec query to the authorized identity or to none, and picks the hop's cache policy. Each followed redirect goes through redirect_policy, which, on the creative route, takes EdgeZero's prepared request, applies the same per-hop decision with the raw Location path check, and follows the rewritten request. Identity endpoints bypass upstream caches. The chain state is shared with the policy, because EdgeZero keeps the policy for the whole chain, and the final response becomes private once an identity endpoint was visited. A final 3xx with a Location on the creative route is an error, and creative responses strip the first-party passthrough headers. The creative route sends the fixed creative header profile through a header-profile choice in proxy_outbound_request. append_ec_id is gone, and ProxyRequestConfig carries query_identity and disclosure in place of forward_ec_id. Target logging drops the query, as the PR does. Adapters: every adapter prepares the proxy policy when it builds state, alongside the cutover's identity-provider rejection, and passes the request's EcContext into handle_first_party_proxy. The finalize middleware keeps the cutover's handler-error rendering and Fastly's RequestGeo, and marks 4xx and 5xx creative proxy responses terminal-private. Fastly's test-only service injection in build_per_request_services is not needed on the cutover, so it is not carried. Core settings, config and consent: both sides' fields, checks, warnings and test imports are kept. Testlight keeps the base's response cap and uses without_ec_id. Tests: the PR's core proxy policy tests, its parity module and its Fastly named-route test run on ScriptedHttpClient in place of the removed platform HTTP stubs, and read each hop's URI and cache policy from the recorded requests. The parity origin answers by path through a request observer. The Fastly named-route test routes with the cutover's outbound client and a held US geo and runs the real entry-point finalize_response. The Fastly network fixture uses EdgeZero's Fastly client. The cutover's first-party proxy readback test now expects the creative header profile. The CLI proxy test keeps the cutover's in-process Axum fixture. The CLI proxy explain tests create the `[proxy]` table, which the cutover dropped from the integration fixture, so the appended endpoint tables still parse. Docs: the first-party proxy redirect list combines EdgeZero's redirect rules with the per-hop identity policy and the creative terminal-redirect rejection, and the proxy settings table keeps both sides' rows.
|
For the identity integration chain (#1608), this PR now stacks on #1489, and its base is This PR's health and startup contract wins over the cutover's startup behavior on every adapter, so once both land these cutover statements no longer hold:
How the port fits the cutover:
Checked locally at |
Brings the certificate-check statement for every outbound HTTPS request (#1616), on #1489's current head with #1487 and #1488, into the cross-adapter health and startup-failure contract. The merge is clean. #1489's new commits add provider cookie opt-out handling to the Fastly app's route dispatch, apart from the PR's probe and startup-failure changes, and #1616 touches neither, so every adapter keeps the PR's contract as merged before. Cargo.lock is unchanged.
Brings the identity integration chain, now with #1489's current head and the certificate-check statement for every outbound HTTPS request (#1616), through the health and startup-failure contract (#1617), into the creative proxy disclosure policy. Core settings: Proxy keeps the PR's identity_endpoints and the compiled identity policy, and certificate_check takes #1616's statement that TLS is always verified on every outbound HTTPS request. Docs: the configuration guide's proxy table keeps the PR's identity_endpoints row and takes #1616's outbound TLS wording for certificate_check. Everything else merged without conflict: every adapter still prepares the proxy policy when it builds state, next to the identity-provider rejection, and #1489's new identity changes sit apart from the policy. Cargo.lock is unchanged.
#1615's head fb25de5 carries the whole chain from #1506 through #1489 at 8623c4e, including the EdgeZero repin to rc/identity 9d02d7b3 and dhruv8sh's latest #1487, #1488 and #1489 commits. It also carries prk-Jr's line #1489 <- #1616 <- #1617 <- #1615: certificate checks on every outbound HTTPS request (#1556), the cross-adapter health and startup-failure contract (#1142) and the creative proxy identity disclosure policy (#1233). Each PR merged the one below it, so this merge is clean.
|
For the identity integration chain (#1608), this PR now stacks on #1616, and its base is Checked locally at On GitHub, stack 1632 (#1617, #1615) was dissolved so this PR could change base. The line is now stack 1647: #1616, #1617, #1615. |
…1622 into rc/identity #1622 (244ca26) now carries the whole chain, each PR merging the one below it: - #1506 (c197404) repins EdgeZero to rc/identity at d063a8e7, which carries EdgeZero main's Fastly SDK 0.13.3 upgrade through every EdgeZero PR here, and merges Trusted Server main's upgrade (#1671): fastly 0.13.3, url 2.5.9 and Viceroy 0.22.0. - #1614, #1525, #1526, #1487 and #1488 take it in turn. #1488 also adds b2d4bfd, which records known UID hashes with a setter. - #1489, the identity spine (#1639, #1640, #1612, #1628 and #1623), #1531 and #1532. - The Axum serving line: #1613, #1616, #1617, #1615, #1635, #1637 and #1627, chained, with #1627's b958107 decoding the Spin discovery document with Response::json and #1627's merge of #1625, which brings #1625's Wrangler pin into the chain. - The held line on #1627: #1533, #1534, #1536, #1535, #1537, #1539, #1538, #1540, #1566, #1624, #1641, #1642 and #1646. #1646 keeps its own shared after-response runner in ec::app::lookups. - #1636 (72096cd) on #1646 (b5a5f62), draining Axum after-response identity tasks on SIGTERM through #1646's shared runner. - The EC route line on #1636: #1626 (067531e), which merges #1636, the draft #1656, #1661, #1662 and #1622, and through #1622's merge of it, #1620's round-6 head. Each conflict was resolved in the PR that sits higher. This merge is clean. Since the last update the chain also takes #1488's hashed-email intake (a610152 and 9104fd3) and its POST, body and header options for the status call (f063a76), #1627's split of the generic runtime KV store into trusted_server_runtime_kv (4d0c1a2), #1646's gate on identity writes for rejected clients (aa31559) its native container test of the failure router (4f4c036) and that test's header check on an ordinary route (71a573a), #1626's withholding of a mirrored UID while another source owner is opted out (d07f789), and #1617's description of the Axum startup failure router (6d174a8) and of the startup failures that still exit before listening (4c07cad). #1636 no longer sits in the Axum serving line; it arrives through #1626, which merges it on top of #1646. Its new head adopts #1646's after-response runner in place of the one rc/identity took with cf1102c. Cloudflare guide: #1627's merge of #1625 now keeps both #1625's tool version clause and #1627's TRUSTED_SERVER_RUNTIME_KV binding in the smoke paragraph, and fixes #1625's smoke script test for #1617's Python floor and Worker build, and #1537's merge fixes its ts stub for #1537's storage template step, so this merge needs no resolution.
|
For the identity integration branch (#1608), I pushed
|
Takes #1616's new head 535c331, which carries #1506's repin of EdgeZero to rc/identity at 459bd27d (42e0c46): PR 275 at 0e2a58ae, the stack's test fixes and EdgeZero 536's bounded record update, RecordHandle::update. `CHANGELOG.md` conflicts only where this PR's own edits sit next to the EdgeZero pin text; the merge keeps this PR's text with the new pin.
|
For the identity integration branch (#1608), I pushed |
dhruv8sh
left a comment
There was a problem hiding this comment.
Summary
This PR adds a shared trusted_server_core::health module. It handles GET and HEAD on exactly /health and /ready. It does no path normalization, sets no-store caching and the compiled-in TS version header, and returns an empty body for HEAD. When startup fails, it returns a fixed 503 Service Unavailable with no failure details. Each adapter now uses this module, either through ProbePreDispatchHook or, in Fastly, through native handling. I found no bugs, security problems or compatibility breaks that I could verify.
What I reviewed: the core module, its tests, and the Fastly wiring in full. For the axum, Cloudflare and Spin adapters, the smoke scripts and the docs, I only reviewed a sample. They follow the same pattern. The diff has no binary entries and nothing that looks like an attempt to steer the reviewer.
Cross-cutting / body-level findings
- 👍 Fastly startup failure handling keeps retry and logging —
initialize_dispatchstill retries on the next request. It also logs the assembly error that the fixed 503 response hides from clients. - 👍 Non-fallback methods are unaffected — Methods outside the publisher fallback set still get EdgeZero's assembly-error response.
- 👍 Operational responses skip
finalize_response— Health and startup-failure responses are marked as operational, so finalization can't add cache headers or cookies to them. - 👍 Thorough test matrix — The tests cover every combination of error type, method and path. They also check the HEAD empty body and confirm that ordinary requests still reach the original hook.
CI Status
- integration tests (Fastly EC lifecycle): PASS
- integration tests: PASS
- trace runtime and browser acceptance: PASS
- browser integration tests: PASS
- format-docs: PASS
- release scripts: PASS
- Fastly response diff script: PASS
- CLAUDE.md symlink guard: PASS
- cargo test (cross-adapter parity): PASS
- cargo fmt: PASS
- vitest: PASS
- docs-proposal scripts: PASS
- prepare integration artifacts: PASS
- format-typescript: PASS
- cargo test: PASS
- HTML EOF runtime (Fastly): PASS
- ts dev lint domains (changed lines): PASS
- cargo check/build/test (spin native + wasm32-wasip1): PASS
- health-startup (cloudflare): PASS
- health-startup (axum): PASS
- health-startup (spin): PASS
- cargo test (ts CLI, native) (ubuntu-latest): PASS
- cargo check (cloudflare native + wasm32-unknown-unknown): PASS
- cargo test (axum native): PASS
- worker-deadlines (spin): PASS
- health-startup (fastly): PASS
- CI Node pin guard: PASS
- worker-deadlines (cloudflare): PASS
- PBS Terraform and Compose checks: PASS
- cargo test (ts CLI, native) (macos-latest): PASS
Takes #1616's new head 676f16b, which carries #1506's repin of EdgeZero to rc/identity at 1619078a (8edc50e), a revert that removes EdgeZero 522 (portable Fastly record providers) and 524 (outbound mTLS client identities). `CHANGELOG.md` conflicts only where this PR's own edits sit next to the EdgeZero pin text; the merge keeps this PR's text with the new pin.
|
For the identity integration branch (#1608), I pushed Takes #1616's new head 676f16b, which carries #1506's repin of EdgeZero to rc/identity at 1619078a (8edc50e), a revert that removes IABTechLab/edgezero#522 (portable Fastly record providers) and IABTechLab/edgezero#524 (outbound mTLS client identities).
|
ChristianPavilonis
left a comment
There was a problem hiding this comment.
Reviewed #1617 against its live fix/1556-identity-backend-tls base, 676f16b7a…c430ee83b. The four hosted startup smoke jobs passed on the reviewed tree. Approving with two P2 findings (boot diagnostics when ordinary logging is off, and request-time Geo KV on Axum probes), plus lower-priority tooling, documentation, and maintenance findings. The two P2 paths were verified in source, not rerun through those runtime configurations. Optional suggestions are non-blocking.
| Arc::new(trace_metadata), | ||
| ))) | ||
| .pre_dispatch_hook(ProbePreDispatchHook::new( | ||
| StartupState::Ready, |
There was a problem hiding this comment.
R9 · Optional: Keep Fastly’s native path as the sole shipping probe path
handle_request answers both probes and fixed startup failures before serve, so this second route and the operational marker/finalizer guard do not protect those responses in production. Consider restoring the direct trace hook here and keeping the native runtime tests. That gives up direct internal-router probe parity; it does not change the shipping request path.
There was a problem hiding this comment.
Disposition for e8b5489. Retained this optional router-level policy deliberately and added its bounded purpose beside routes_for_state: direct-router consumers and parity tests bypass the native entry point. Shipping Fastly still intercepts operational requests natively. Removing the router policy would remove that direct-router contract, so this correction avoids broadening the change. Leaving this optional simplification open for reviewer acceptance.
| test "${{ steps.versions.outputs.bindgen }}" = 0.2.126 | ||
| archive="$RUNNER_TEMP/wasm-bindgen.tar.gz" | ||
| curl --fail --location --silent --show-error "https://github.com/wasm-bindgen/wasm-bindgen/releases/download/${{ steps.versions.outputs.bindgen }}/wasm-bindgen-${{ steps.versions.outputs.bindgen }}-x86_64-unknown-linux-musl.tar.gz" --output "$archive" | ||
| echo "064948d58e2d6c0a745216477a639ba696216d6309aaa902939d1b865b1d869d $archive" | sha256sum --check |
There was a problem hiding this comment.
R11 · Low, maintenance: Keep runtime versions and digests together
The wasm-bindgen and Spin installers duplicate the version/digest pairs in worker-auction-deadlines.yml; integration-tests.yml also pins the Spin digest. The current pins work, but a bump that misses a copy can fail a different workflow before its tests start. Consider sharing these verified installer steps without dropping the checksum checks.
There was a problem hiding this comment.
Disposition for e8b5489. Deferring this optional installer abstraction. The existing runtime versions and published digests agree across the workflows, and checksum verification remains intact. Centralizing the platform installers would add a separate build-maintenance change beyond these corrected startup/runtime paths. Leaving this suggestion open rather than claiming the duplication is removed.
PR #1616's new head brings the cascaded owner review fixes from #1525, #1526, #1488, #1489, #1639, #1531 and #1532. AGENTS.md: #1526 added the core executor lint as CI gate 18, and #1617 added the production health and startup contract as gate 18. The resolution keeps both, base first: the executor lint stays 18 and the startup contract becomes 19. crates/trusted-server-adapter-axum/src/startup.rs: #1531 added an assertion message to the absent-prepared-stores check, and #1617 replaced that tail of the test with a failure-router check that serves /health, /ready and /. The resolution keeps #1617's failure-router check, which already carries the prepare_native assertion with its message.
PR #1616's new head brings wave B: #1506's merge of main ab5c24f (#1501, js_asset_proxy rewriter ordering) and its repin of EdgeZero to rc/identity 8a73c0978806, carried up through the chain. CHANGELOG.md: main's #1501 added the JS Asset Proxy and Prebid overlap entry at the top of Changed and #1506 moved the EdgeZero pin entry to 8a73c097, while #1617 added the health and readiness entry above the old pin entry. The resolution keeps both, base first: main's entry, the repinned EdgeZero entry, then #1617's entry. Cargo.lock changes only the 10 EdgeZero package sources, now at 8a73c097; the codegen crate's nested Cargo.lock is unchanged.
|
Round 12 identity realignment:
Each merge message says what it carries and how any conflict was resolved. |
PR #1616's new head brings #1616's certificate policy and pull-sync fixture corrections, plus #1506's repin of EdgeZero to rc/identity ef5cbf30, which renames Fastly backends to ez_b31v2_* and moves the yanked pin-project-lite, chacha20 and spin, #1639's pull reserve boundary check and wording and #1613's conformance doc alignment. CHANGELOG.md: #1506 moved the EdgeZero pin entry to ef5cbf30 and PR 275 at a3c5f3dd and renamed the Fastly backends to ez_b31v2_*, while #1617's owner commit rewrote the startup-failure entry as Fastly-only next to them. The resolution keeps #1506's pin and lifecycle entries, #1617's health and readiness entry after the pin entry, and #1617's rewritten startup-failure entry. Cargo.lock changes only the EdgeZero package sources (now ef5cbf30) and the yanked pin-project-lite, chacha20 and spin; the codegen crate's nested Cargo.lock is unchanged.
PR #1540's new head brings the identity chain's commits since #1667 last merged it at afc4f5d, including the EdgeZero repins up to rc/identity ef5cbf30, which renames Fastly backends to ez_b31v2_* and moves the yanked pin-project-lite, chacha20 and spin, main's #1501, #1525's plain HTTP opt-in for auction providers, and this round's owner commits on #1535, #1613, #1616, #1617, #1625, #1627, #1635, #1637 and #1639. Cargo.toml and crates/trusted-server-adapter-axum/Cargo.toml: #1667 pinned EdgeZero at d063a8e7, and the chain now pins rc/identity ef5cbf30, which keeps the client certificate API #1667 uses. The files merge cleanly to the chain's pin, so #1667 no longer carries its own. crates/trusted-server-core/src/auction/mod.rs: #1501 from main, which the chain carries, moved the APS provider test literal into the shared aps_provider_map helper, and #1667 added `mtls: false` to that literal. The resolution calls the helper and adds `mtls: false` to it. docs/guide/auction-orchestration.md: #1525 reworded the endpoint and allow_insecure_http rows of the provider field table, and #1667 added the mtls row below them. The resolution keeps #1525's rows followed by #1667's mtls row. docs/guide/configuration.md: #1525 added the allow_insecure_http row to the provider field table and the plain HTTP warning after the loopback exception, and #1667 added the mtls row and the note that an mtls provider needs an https endpoint. The resolution keeps #1525's table with #1667's mtls row last, and #1525's warning followed by #1667's note. docs/guide/error-reference.md: #1616's owner commit replaced "TLS is always verified" with the adapter and platform TLS policy wording, and #1667 added the outbound client identity bullet after it. The resolution keeps #1616's wording followed by #1667's bullet. crates/trusted-server-core/src/auction/plan.rs (semantic fix): #1525's 23e4bdd removed the local is_false helper from plan.rs and serializes allow_insecure_http through crate::settings::is_false, and #1667's mtls field still named the local helper. The mtls field now uses crate::settings::is_false too. crates/trusted-server-adapter-axum/tests/native_ec.rs (semantic fix): #1536's 9d41f0f added an APS ProviderConfig literal to the Axum native EC tests, and #1667 added the required mtls field to ProviderConfig. The literal now sets `mtls: false`. Cargo.lock matches #1540's new head: next to #1667's, it changes only the EdgeZero package sources (d063a8e7 to ef5cbf30) and the yanked pin-project-lite, chacha20 and spin; the codegen crate's nested Cargo.lock is unchanged.
|
Round 15 identity realignment:
This PR's new runner tests in Each merge message says what it carries and how any conflict was resolved. |
|
Round 17 identity realignment:
Each merge message says what it carries and how any conflict was resolved. |
…ntegration chain
|
Merged #1614's Trusted Server owns the This merge takes #1616's new head ( Checks on this head: no conflict markers; |
Summary
Give every adapter separate GET/HEAD liveness (
/health) and application-initialization readiness (/ready). A caught application startup failure preserves liveness and returns fixed, uncacheable plain-text503responses for readiness and supported publisher methods. Operational responses bypass application authentication, cookies, configured headers, trace capture and publisher forwarding.Revision status, checked 2026-12-03 12:12 UTC: the maintainer advanced this PR to
b43adbcd6e, with basefix/1556-identity-backend-tlsatee971dcd69020284c2f6c806f54e03b76544d542and EdgeZeroef5cbf308. Earlier signed review correctione8b54894b4remains in its history. Local/runtime and hosted results below are historical for their named revisions; they do not qualify this later SDK merge. Exact-head CI reports 27 contexts (27 QUEUED); full current-head qualification is assessed separately.Caught initialization diagnostics use EdgeZero’s boot target and remain visible when ordinary logging is Off. Fastly retains the actionable report before public error mapping and avoids a second generic event. Trusted Server installs no logger. Axum, Cloudflare and Spin share the failed-router policy in core while keeping their existing method sets; Fastly retains native interception and direct-router parity.
Readiness consumers distinguish direct application
200responses without redirects from origin availability, which follows framework redirects and accepts successful statuses. This covers Rust runtime/trace/EOF waiters and the actual browser container-start caller. The four production smoke runners share HTTP controls, preserve their original failure status and always attempt workspace cleanup after artifact-retention failure. Cloudflare accepts caller-relative bundle overrides, including spaces and leading dashes.The API reference owns the status matrices. Adapter guides retain timing details, including native Axum’s optional pre-dispatch Geo-KV lookup. Deployment and rollback guidance requires readiness where available plus a separate publisher request; older releases may lack
/readyor return startup500responses.Compatibility and limits
GET/HEAD
/readyis reserved on every adapter; Cloudflare also gains local GET/HEAD/health. Move traffic-admission checks to/ready. A green liveness response alone does not establish configuration loaded or publisher availability. Unsupported methods retain ordinary router behavior on Axum/Cloudflare/Spin and the SDK assembly-error path on Fastly.Readiness records the selected instance’s application-initialization outcome. The application probe hook adds no origin, bidder or identity-store polling. Optional native Axum Geo-KV can await a bounded uncached direct-peer lookup before that hook. Failures before application dispatch/router selection remain outside the contract, including provider preparation, invalid SDK profiles/limits, bind failures and Fastly logger-installation failure. Errors after successful startup keep their existing mapping. These local runtime checks are not deployed-service qualification.
Stacked on #1616 (
fix/1556-identity-backend-tls).Validation
Historical local checks on e8b5489:
test-utils, pass 11 startup cases each. Controls include exact GET/raw HEAD responses, missing config/secrets, malformed/invalid settings, hostile authentication/headers, successful publisher rewrites, actionable diagnostics at Off, and an ordinary warning present at Info but absent at Off. All four unchanged production artifacts fail the new Off diagnostic control.Tools: Rust 1.98.1, Node 24.20.0, Fastly CLI 16.0.0, Viceroy 0.22.0, Wrangler 4.83.0, Spin 4.1.0, worker-build 0.8.5 and wasm-bindgen 0.2.126.
All 31 hosted checks passed on review-correction commit
e8b54894b4cace2d42b66a25eb2fd700147096d1, including the four production health/startup jobs. Those results do not qualify the later SDK merge.Spec
Contract and implementation/verification plan.
Closes #1142