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. |
Brings in, through #1636 (cf1102c): - dhruv8sh's spine on #1489: #1639 (738ba34), #1640 (46530d8), #1612 (36e35f8), #1628 (384a481) and #1623 (6fd236e). - #1531 (47411de) and #1532 (4d17086, which renames the native Geo profile variable to TRUSTED_SERVER__NATIVE_GEO_PROFILE_FILE). - #1613 (2415b7d), then #1616 (c142e87), #1617 (b91770e) and #1615 (255c390), restacked on #1613. - #1635 (06b4044), restacked on #1615, and #1636 (cf1102c). Each conflict was resolved in the PR that sits higher. This merge is clean.
|
For the identity integration branch (#1608), I pushed This PR's health and startup-failure contract now also covers A1's Axum production runner from #1531. One limit: failures before Trusted Server's initializer still exit non-zero before listening. That includes EdgeZero's provider preparation (a missing config file, or a missing AppConfig profile or Secrets Manager secret), extraction-limit validation, the hosting and Geo profile, ingress and bind. Changing that needs EdgeZero.
|
This brings in 1f054c6 from #1488, which forwards ortb2.user.ext.eids from the Prebid config into the auction EIDs, and a99dd66, a62601b, d1eb75f and 394892b from #1489, which cap mirrored UID expiry at 30 days from the UTC day start and pass the request time into finalize. Fastly adapter imports: this PR's removal of the HEADER_X_TS_VERSION import stays, and #1489's checked_current_timestamp import is added. It also brings b2d4bfd from #1488, which records the known UID hashes on lookup results with a setter, so the provider IDs the write planner logs are not derived from them. The base now also carries #1506's repin of EdgeZero to rc/identity at d063a8e7 and its merge of main's Fastly SDK 0.13.3 upgrade (#1671): fastly 0.13.3, url 2.5.9 and Viceroy 0.22.0. CHANGELOG.md conflicted only because this PR's /health and /ready entry sits on the line above the EdgeZero pin entry. The merge keeps this PR's entry and the repinned one.
This brings in 1f054c6 from #1488, which forwards ortb2.user.ext.eids from the Prebid config into the auction EIDs, and a99dd66, a62601b, d1eb75f and 394892b from #1489, which cap mirrored UID expiry at 30 days from the UTC day start and pass the request time into finalize. They arrive through the chain's merges into #1639, #1640, #1612, #1628, #1623, #1531, #1532, #1533, #1534, #1536, #1535, #1537, #1539, #1538, #1540, #1566, #1624, #1641, #1642 and #1646, with #1646's move of the request time into IdentityApp::finalize. It also brings d5276ee, which publishes the native AWS runtime files without GNU mv -T, and Christian's merge 5597d3e of #1538 into #1540, through #1566's merge. The base now also carries the Axum serving line (#1613, #1616, #1617, #1615, #1635, #1637 and #1627), which #1533 merged, and #1627's b958107, which decodes the Spin discovery document with Response::json, and #1627's merge of #1625 (006b45e), which pins Wrangler for the Cloudflare smoke and CI. This PR already carries #1646's head 461aa0d, so the merge adds only #1646's new merge 166944769 of #1642 and the chain below it, including the identity conformance check that now strips the mirrored UID's exp. It also brings b2d4bfd from #1488, which records the known UID hashes on lookup results with a setter, so the provider IDs the write planner logs are not derived from them. Restacking on the Axum serving line conflicts in the Axum startup tests, where #1617 waits for /ready, since liveness stays up after a caught initialization failure, and this PR rewrites the wait to retry a port collision and to require the child's own ready lifecycle event. Axum startup tests: wait_ready keeps this PR's collision retry and lifecycle check, then probes #1617's /ready and returns the /health response once the child is ready. The fixture drains each child's output through this PR's log readers, so #1617's assert_serves_failure_router reaps the stopped child and reads those captured logs instead of collecting the pipes, which the readers already own. The base now also carries #1506's repin of EdgeZero to rc/identity at d063a8e7 and its merge of main's Fastly SDK 0.13.3 upgrade (#1671): fastly 0.13.3, url 2.5.9 and Viceroy 0.22.0. This PR now stacks on #1661 instead of #1646, so rc/identity can take both as plain merges. #1661 sits on #1656 and #1626, which sit on #1646, so the merge also brings #1626 (provider opt-outs and legacy EID expiry on Fastly and Axum), #1656 (the configurable Edge Cookie browser gate) and #1661 (refusing EC creation when a trusted JA4 contradicts the User-Agent). Fastly identity conformance fixture: #1661 records each scenario's runtime TLS JA4 through a RuntimeTlsJa4 middleware in place of derived device signals, takes the User-Agent from the scenario and drops the browser flag. This PR adds geo consent requests with their own trusted client IP settings and no browser device signals. The merge assembles the conformance app with #1661's middleware and keeps this PR's geo_configured flag and producer_settings. It sends the scenario's User-Agent unless the API request supplies one, and inserts the scenario's JA4 only for requests without a geo consent exchange, because this PR derived device signals only for those. The base now also carries #1627's 4d0c1a2, which renames the generic runtime KV store to trusted_server_runtime_kv, #1488's a610152 and 9104fd3, which add hashed-email intake for the LiveRamp and ID5 identity providers, #1646's aa31559, which gates identity writes for rejected clients, and #1626's d07f789, which withholds a mirrored UID while another source owner is opted out. Fastly conformance JA4: the rebuilt #1661 merge supplies a trusted Python JA4 behind the Chrome User-Agent for #1646's known non-browser API requests, and this PR inserts the scenario's JA4 only without a geo consent exchange, with its producer_settings. The merge keeps both: a known non-browser request gets the Python JA4, any other request the scenario's JA4 unless it is a geo consent exchange. This PR's head moves to e8015ca, its clean merge of #1646's aa31559, which the base already carries, so it adds no change beyond the base. Axum lib.rs: the base now carries #1636, through #1626's merge of it, whose after_response_drain_tests module sits where this PR adds its geo_conformance module. The crate keeps both test modules.
This brings in 1f054c6 from #1488, which forwards ortb2.user.ext.eids from the Prebid config into the auction EIDs, and a99dd66, a62601b, d1eb75f and 394892b from #1489, which cap mirrored UID expiry at 30 days from the UTC day start and pass the request time into finalize. They arrive through the chain's merges into #1639, #1640, #1612, #1628, #1623, #1531, #1532, #1533, #1534, #1536, #1535, #1537, #1539, #1538, #1540, #1566, #1624, #1641, #1642 and #1646, with #1646's move of the request time into IdentityApp::finalize. It also brings d5276ee, which publishes the native AWS runtime files without GNU mv -T, and Christian's merge 5597d3e of #1538 into #1540, through #1566's merge. The base now also carries the Axum serving line (#1613, #1616, #1617, #1615, #1635, #1637 and #1627), which #1533 merged, and #1627's b958107, which decodes the Spin discovery document with Response::json, and #1627's merge of #1625 (006b45e), which pins Wrangler for the Cloudflare smoke and CI. The merge also brings the 12 #1646 commits this PR lacked, from 48a43ae to 461aa0d: dhruv8sh's page-phase lookup and /auction EID work (48a43ae, 82fe088, 1d0a74f, 838586e and his chain merges a061c01, ecf16e8, e1d23a0, edcf4c5 and 9a020e1), the merge 9cad928 of #1641 into #1642, and prk-Jr's "Merge providers-awaited into shared identity" (4ffbaf8) and "Restore Fastly auction browser gating" (461aa0d). Edge cookies guide: a conflict is the request lifecycle paragraph. The merge takes #1646's sentences on positive identity cookies, core expiries and /auction body EIDs, and keeps this PR's closing sentences on the default ec.sliding_refresh = false flow and sliding renewal. Fastly adapter tests: 82fe088 from #1646 removed the navigation-lookups thread-local and the page-lookups argument of apply_edgezero_ec_finalize, since the handler now collects page lookups onto the EC context. This PR's sliding_ec_renews_held_publisher_identity_before_terminal_privacy test drops its two take_navigation_lookups calls and passes no page lookups to finalize. Its configuration has no record store or providers, so no lookups were collected before either, and its assertions are unchanged. It also brings b2d4bfd from #1488, which records the known UID hashes on lookup results with a setter, so the provider IDs the write planner logs are not derived from them. The base now also carries #1506's repin of EdgeZero to rc/identity at d063a8e7 and its merge of main's Fastly SDK 0.13.3 upgrade (#1671): fastly 0.13.3, url 2.5.9 and Viceroy 0.22.0. This PR now stacks on #1661 instead of #1646, so rc/identity can take both as plain merges. #1661 sits on #1656 and #1626, which sit on #1646, so the merge also brings #1626 (provider opt-outs and legacy EID expiry on Fastly and Axum), #1656 (the configurable Edge Cookie browser gate) and #1661 (refusing EC creation when a trusted JA4 contradicts the User-Agent). Cloudflare route tests: both PRs add a test at the end of the file. The merge keeps both, this PR's sliding_ec_configuration_preserves_unsupported_platform_responses and #1661's ec_route_creates_no_record_whatever_the_bot_management_ja4. Fastly sliding EC test: #1617, which now sits below this PR, answers GET /health through the router's probe hook as an operational response, which carries no EC state. This PR's sliding_ec_renews_held_publisher_identity_before_terminal_privacy routes /health through the router and expected EC state on every path but the unsupported EC route, so it now also accepts the liveness probe without EC state. Its check that /health issues no renewal cookie is unchanged. The base now also carries #1627's 4d0c1a2, which renames the generic runtime KV store to trusted_server_runtime_kv, #1488's a610152 and 9104fd3, which add hashed-email intake for the LiveRamp and ID5 identity providers, #1646's aa31559, which gates identity writes for rejected clients, and #1626's d07f789, which withholds a mirrored UID while another source owner is opted out. Settings: this PR's MaxAgeDays and #1488's HashedEmailSource are both added before Ec in settings.rs; the merge keeps both. This PR's head moves to fbe5670, its merge of #1646's aa31559, which models admitted clients in the core sliding tests, finalizes them with the store gate and adds refused_client_gets_no_renewal_or_record_io, and adds the proposal's review log. Taken as the change from the old head 668d501, the new head would replay #1646 commits the base already carries in rebuilt form. The merge takes only fbe5670's own resolution, the change from a plain merge of 668d501 and aa31559 to fbe5670: the sliding tests and the proposal apply cleanly, and its Fastly sliding test port is the one this merge already made.
…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.
| Err(error) if readiness || app::publisher_fallback_methods().contains(method) => { | ||
| // The client sees only the fixed response, so the error that | ||
| // `EdgeZero`'s assembly-error response would have logged is logged here. | ||
| log::error!("application assembly failed: {error:?}"); |
There was a problem hiding this comment.
R1 · P2: Keep startup diagnostics visible when ordinary logging is off
Before this change, failed assembly on Fastly, Cloudflare, and Spin reached EdgeZero’s edgezero::boot target, which remains enabled when ordinary logging is off. The fixed 503 paths now use ordinary targets. Axum likewise replaces a fatal report that could fall back to stderr with an ordinary log on its caught-failure path. Operators can get a generic 503 without the diagnostic needed to recover. Keep one safe boot-target diagnostic at the failure boundary without changing the public response or installing a logger. A malformed-envelope smoke with ordinary logging off would verify this.
| Arc::clone(&state.settings), | ||
| Arc::new(move |request| trace_metadata(&trace_state, request)), | ||
| ))) | ||
| .pre_dispatch_hook(ProbePreDispatchHook::new( |
There was a problem hiding this comment.
R2 · P2: Axum probes still wait on request-time Geo KV
With geo-kv enabled and a KV Geo provider using the direct peer, pinned EdgeZero awaits Geo resolution before reaching this hook (edgezero-adapter-axum/src/service.rs:534). An uncached lookup reads the backend, so a slow lookup can delay /ready or /health past a monitor’s timeout even though the app initialized. The ordinary build does not enable this feature, and the lookup is bounded. Skip Geo for exact GET/HEAD probes after ingress admission, or document this narrow exception if changing the SDK is out of scope. The router parity test does not exercise the native path.
| for _ in 0..options.max_attempts { | ||
| if let Ok(resp) = reqwest::blocking::get(&health_url) | ||
| && resp.status().is_success() | ||
| && if health_path == "/ready" { |
There was a problem hiding this comment.
R3 · P3: Separate app readiness waits from origin waits
The Rust fixture wait still follows redirects, so it can accept a final 200 that did not come directly from /ready. The browser helper rejects redirects, but applies the same stricter rule to the standalone publisher origin; I confirmed it now rejects a redirecting origin that previously passed. Give app readiness its own direct-response policy, preserve the origin’s previous policy, and remove the root-fallback option and liveness default that app callers no longer use.
| cleanup() { | ||
| stop_app | ||
| smoke_stop_process "$ORIGIN_PID" | ||
| smoke_preserve_artifacts "$WORKSPACE" |
There was a problem hiding this comment.
R4 · P3: Don’t let artifact retention prevent workspace cleanup
All four EXIT traps copy artifacts before removing the workspace. When the destination is invalid, set -e stops the trap before removal. I confirmed that a prior exit status of 42 became 1 and the cleanup step was skipped. Report a failed copy separately, always attempt workspace removal, and preserve any existing smoke failure status.
| cp "$CLOUDFLARE_ROOT/wrangler.toml" "$CLOUDFLARE_WORK/wrangler.toml" | ||
| cp "$CLOUDFLARE_ROOT/wrangler.ci.toml" "$CLOUDFLARE_WORK/wrangler.ci.toml" | ||
| ln -s "$CLOUDFLARE_ROOT/build" "$CLOUDFLARE_WORK/build" | ||
| ln -s "$CLOUDFLARE_BUILD_PATH" "$CLOUDFLARE_WORK/build" |
There was a problem hiding this comment.
R5 · P3: Resolve the Cloudflare bundle path before creating the link
The validation checks a relative CLOUDFLARE_BUILD_PATH against the caller’s directory, but Wrangler resolves the symlink target relative to the temporary workspace. A valid repo-relative override passes the check and then produces a broken link. Resolve the selected directory before validating and linking it, and name the actual override in the missing-bundle error. CI uses an absolute override.
| 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.
| fi | ||
| local startup_state=ready | ||
| [ "$expected_status" != 503 ] || startup_state=unavailable | ||
| smoke_wait_http "http://127.0.0.1:$port/health" 200 \ |
There was a problem hiding this comment.
R10 · Low, maintenance: Share the repeated smoke HTTP controls
All four smoke runners copy the probe waits, origin counts, and auth/publisher controls. Fastly also waits for liveness twice in the missing-config case. Move the repeated HTTP sequence into scripts/smoke-common.sh and keep process setup and diagnostics adapter-specific.
| 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.
| | `axum` | development | real | exit 1 | no | multiple | outermost sanitize | none | | ||
| | Adapter | Release status | Liveness | Startup failure | Readiness (ready/failed) | Provider fan-out | Trusted-client-IP handling | Request normalization | | ||
| | ------- | -------------- | -------- | --------------- | ------------------------ | ---------------- | -------------------------- | --------------------- | | ||
| | `axum` | development | `200` | `503` | `200` / `503` | multiple | outermost sanitize | none | |
There was a problem hiding this comment.
R12 · Low, docs convention: Keep probe status values in the API reference
The five secondary guides repeat the new probe status columns. CONTRIBUTING.md:146–147 says not to copy volatile matrices, and the spec gives ownership to the API reference. Keep the links and adapter-specific timing notes in these guides, and keep the exact status values in the API reference.
| in production, before `run_app`. Rename fixture-specific names to describe | ||
| the adapter sink, keep installation idempotent, and preserve the current | ||
| warning/error filtering. Keep fixture-only panic hooks under `test-utils`. | ||
| Do not add a logger dependency or change the general logging format. |
There was a problem hiding this comment.
R13 · Low, historical docs: Mark the adapter-logger instructions as superseded
This checklist and the spec at line 150 still describe installing adapter-owned Cloudflare and Spin loggers. Shipping code uses EdgeZero-managed sinks, and AGENTS.md:290–291 forbids installing another logger. Mark both instructions as superseded without changing the historical verification record.
| Do not add a logger dependency or change the general logging format. | |
| Do not add a logger dependency or change the general logging format. | |
| Superseded: shipping Cloudflare and Spin builds use EdgeZero-managed logging. |
Summary
/health) and application-initialization readiness (/ready) probes, so monitoring can distinguish a running handler from a usable application.503responses while retaining EdgeZero-managed application-wide warn/error logging to the Worker console and Spin stderr, including startup diagnostics; keep probes independent of application authentication, cookies, and configured response headers.Compatibility: GET/HEAD
/readybecomes reserved everywhere, and Cloudflare gains local GET/HEAD/health. Move traffic-admission checks to/ready. On Axum, Cloudflare and Spin,/healthnow stays200after a caught startup failure, as it already did on Fastly, so a check that only reads/healthno longer detects (or, under a process supervisor, restarts) a misconfigured instance; use/ready. Fastly/Axum/Cloudflare startup statuses become503. Readiness does not poll runtime dependencies; ordinary errors after successful startup retain their existing mapping. The fixed startup response covers the supported publisher methods; other methods retain the SDK assembly-error response. Runtime/SDK failures before application dispatch remain outside this contract, including Fastly managed-logger installation failure, which returns EdgeZero JSON500even on/health.Axum production runner (#1531):
initialize_nativewraps a newprepare_native. A failure there (store bindings, the config envelope, secrets, invalid settings, unsupported store consumers, the router build or the deadline) logs one line and installs the failure router, so the process keeps listening: GET/HEAD/healthanswers200, and/readyand every supported route answer the fixed503. Limit: a failure before that router is installed still exits non-zero before listening, including EdgeZero provider preparation (a missing local config file, AppConfig profile or Secrets Manager secret), invalid config extraction limits, the hosting and Geo profile, ingress and the bind. Provider preparation and ingress run inside EdgeZero before the initializer, so keeping those up needs an EdgeZero change; a bind failure cannot serve at all.scripts/smoke-common.shnow runs under macOS bash 3.2: expanding the emptycredentialsarray underset -ufailed withcredentials[@]: unbound variableand stopped every smoke script, so it expands${credentials[@]+"${credentials[@]}"}.Stacked on #1616 (
fix/1556-identity-backend-tls); review the diff against that base.Changes
.github/workflows/health-startup-contract.ymlAGENTS.md.tool-versionsCHANGELOG.mdcrates/trusted-server-adapter-axum/README.mdcrates/trusted-server-adapter-axum/src/app.rscrates/trusted-server-adapter-cloudflare/README.mdcrates/trusted-server-adapter-cloudflare/src/app.rscrates/trusted-server-adapter-fastly/src/app.rscrates/trusted-server-adapter-fastly/src/main.rscrates/trusted-server-adapter-fastly/src/sandbox.rscrates/trusted-server-adapter-spin/README.mdcrates/trusted-server-adapter-spin/src/app.rscrates/trusted-server-cli/src/commands/dev/sandbox_probe.rscrates/trusted-server-core/src/health.rscrates/trusted-server-core/src/lib.rscrates/trusted-server-integration-tests/browser/helpers/infra.tscrates/trusted-server-integration-tests/tests/common/trace_boundary.rscrates/trusted-server-integration-tests/tests/environments/axum.rscrates/trusted-server-integration-tests/tests/environments/cloudflare.rscrates/trusted-server-integration-tests/tests/environments/fastly.rscrates/trusted-server-integration-tests/tests/environments/mod.rscrates/trusted-server-integration-tests/tests/html_eof_runtime.rscrates/trusted-server-integration-tests/tests/parity.rsdocs/guide/api-reference.mddocs/guide/axum-dev.mddocs/guide/cloudflare.mddocs/guide/fastly.mddocs/guide/architecture.mddocs/guide/integrations-overview.mddocs/guide/native-rc-demo.mddocs/guide/spin.mddocs/superpowers/plans/2026-11-16-1142-health-startup-contract.mddocs/superpowers/specs/2026-11-16-1142-health-startup-contract-design.mdscripts/README.mdscripts/smoke-axum.shscripts/smoke-cloudflare.shscripts/smoke-common.shscripts/smoke-fastly.shscripts/smoke-spin.shscripts/test-native-providers.mjs/readyand observe provider snapshots through the authenticated admin route, since probes bypass auth and response headers.crates/trusted-server-adapter-axum/src/main.rscrates/trusted-server-adapter-axum/src/startup.rsinitialize_nativeintoprepare_nativeand a wrapper that installs the failure router on a caught initialization failure.crates/trusted-server-adapter-axum/tests/native_acceptance.rs/readyand assert the failure router after caught initialization failures; a missing prepared store still exits.crates/trusted-server-adapter-axum/tests/startup.rscrates/trusted-server-adapter-axum/tests/routes.rscrates/trusted-server-adapter-cloudflare/tests/routes.rscrates/trusted-server-integration-tests/browser/helpers/wait-for-ready.tsdocs/guide/configuration.mddocs/guide/edgezero.mdCloses
Closes #1142
Spec
Spec: Health and startup-failure contract, including two review rounds.
Implementation and verification: Plan.
Test plan
The checked items and runtime observations below are preserved historical author reports, at the revisions named below or an unrecorded revision. Their underlying local/deployed receipts were unavailable to this audit; they do not certify current head
6d174a883. Hosted CI is separate.cargo test-fastly && cargo test-axumcargo test-fastly-reuse && cargo test-cloudflare && cargo test-spinAGENTS.mdcargo fmt --all -- --checkfastly compute servesmoke with Fastly 16.0.0 / Viceroy 0.21.0test-utils; exact GET and raw-wire HEAD, auth/header controls, diagnostic assertions, and publisher sentinel/rewrite controlsLocal baseline checks passed with Rust 1.98.1 and Node 24.20.0. The review correction in
1a801939eadditionally passed fresh Fastly tests in both modes, target-matched Clippy, real deadline fixtures, Rust/Markdown/docs formatting, README contract-link checks, and added-line domain lint. All 35 hosted checks passed on the prior headdba90aa; hosted results for the updated head are separate. Existing ignored tests are not counted as passing runtime smokes.Checklist
unwrap()in production codelogmacros for production diagnostics