Repository navigation
Conversation
…al before writes The Fastly runner now uses the production native request read and prepare, replacing only the client IP, geo result and JA4-backed device signals that Viceroy cannot supply. Refused scenarios must stop before any write attempt, with a native control proving the check rejects one. Docs describe the failed-geo fixture and record current progress.
Fastly entry point: serve keeps the base's request-local identity lookup slot, dropped before and after the request, and sends through this pull request's with_finalization helper, so the conformance runner and production share one finalization callback. FinalizeInputs now carries the app state, and the conformance runner passes the retained app's state. The runner also drops leftover navigation lookups around each request, as serve does. EC store test support: the module opens to the test-utils feature as this pull request intended. Every test-only double, including the base's new write-failing store, stays behind cfg(test); only the in-memory store is shared. Conformance fixture: the recording store implements the async EcKvStore trait and awaits the in-memory store. Scenario::verify and the native rejection-control tests drive store reads and writes with block_on at their synchronous test boundary, because the adapter runner already blocks inside the Fastly lifecycle. The conditional-write test checks the recording store's create-only insert directly, since the base removed KvIdentityGraph::create_if_absent. Fastly runner: a document navigation now sends Sec-Fetch-Mode: navigate next to Sec-Fetch-Dest: document, and a subresource sends no-cors. The base's page-load write permit requires both headers, as a browser sends them. The integration-tests README says post-delivery work now covers the after-response identity lookups, pull sync among them.
|
For the identity integration chain (#1608), this PR now stacks on #1489, the top of the provider stack, which carries #1506's EdgeZero cutover and #1526's async store.
Tests changed beyond the async conversion: Checked locally at |
Fastly entry point: maybe_identity_graph is gone, as in #1623, so the conflicting hunk takes #1623's side. The conformance hook that #1613 put at the top of maybe_identity_graph is dropped with it, and require_identity_graph keeps #1623's identity-app signature. Fastly identity app: the test-only conformance hook now sits where the adapter picks the identity app's EC record store. While a conformance runner assembles the application, a store named identity-conformance resolves to the runner's recording fixture instead of a Fastly KV store, so the identity app holds the fixture for every request. Production builds are unchanged. Fastly conformance runner: the thread-local holds the recording store rather than a graph, and the runner installs it around assemble_app instead of around each navigation. The identity app captures it at assembly and every request path (EC request state, finalization, identify, batch sync and post-delivery) reads it through the identity app. The scenarios and their assertions are unchanged. Workflow: #1613's conformance steps and #1623's adapter identity guard step merge without overlap.
Workflow: the Axum job keeps both #1613's native identity conformance rejection controls step and #1532's protected CloudFront Geo tests step, in that order, ahead of the finalization harness cleanup step. Fastly conformance runner: the GDPR fixture geo takes #1532's GeoInfo shape, converted as #1532 converted the same literal elsewhere. The empty city becomes None, the continent stays EU, the zero coordinates become a complete zero pair and the zero metro code stays zero. The scenario still resolves to Germany, so the GDPR consent gate and every assertion are unchanged. Fastly identity app: the test-only conformance hook in the identity app's record-store selection is untouched by #1531 and #1532, so the fixture store still reaches every request path through the identity app.
|
For the identity integration chain (#1608), this PR now stacks on #1532 (A4), and its base is
No test is dropped and no assertion changed. All 9 Fastly scenarios and the 9 native rejection controls run. With the hook temporarily disabled, Checked locally at Two failures are macOS-only:
|
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 |
|
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 identity conformance fixture in core test support: RecordingStore, the Scenario contract, and rejection-control tests. It also adds a Fastly runner that drives the production prepare step, the router and the shared with_finalization callback. It also adds a Node launcher that refuses to report success when no tests ran, plus CI wiring. I found no blocking issues. The two non-blocking notes below cover extra CI time and a documented limit on what the suite checks.
Cross-cutting / body-level findings
- 🤔 The launcher step runs
identity_conformance_fastlya second time —cargo test-fastlyin the step before already runsidentity_conformance_fastly. The launcher step runs it again, and the only thing it adds is the guard against a vacuous pass. This is acceptable, but it costs extra CI time. - 📝 The suite stops at response delivery — The documentation says the suite stops at response delivery, so post-delivery writes such as pull sync are not checked. The limit is stated openly. Nothing in the diff tries to steer the reviewer.
- 📝 Points checked during review — These points hold up:
- The production path still uses the same finalize closure through
with_finalization. - The test-only seams compile out of production builds: the
fixture_storeoverride andRequestGeo::fail_lookup. - The
kv_backendtest_support module is now built undertest-utils, and each fake that is not reused is still gated tocfg(test). - The launcher's
--listand pass-count checks hold up when thetest-fastlyalias runs several packages. - The new CI steps run after Node is set up. The native core command uses the host target, which is correct because there is no global build target.
- The production path still uses the same finalize closure through
CI Status
- integration tests: PASS
- integration tests (Fastly EC lifecycle): PASS
- Fastly response diff script: PASS
- cargo test (cross-adapter parity): PASS
- HTML EOF runtime (Fastly): PASS
- CLAUDE.md symlink guard: PASS
- ts dev lint domains (changed lines): PASS
- format-typescript: PASS
- cargo test (ts CLI, native) (ubuntu-latest): PASS
- cargo check (cloudflare native + wasm32-unknown-unknown): PASS
- cargo test: PASS
- browser integration tests: PASS
- trace runtime and browser acceptance: PASS
- CI Node pin guard: PASS
- cargo check/build/test (spin native + wasm32-wasip1): PASS
- docs-proposal scripts: PASS
- cargo fmt: PASS
- format-docs: PASS
- release scripts: PASS
- vitest: PASS
- cargo test (axum native): PASS
- prepare integration artifacts: PASS
- worker-deadlines (cloudflare): PASS
- worker-deadlines (spin): PASS
- cargo test (ts CLI, native) (macos-latest): PASS
|
For the identity integration branch (#1608), I pushed Takes #1532's new head aae1099, 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). The merge is clean. |
ChristianPavilonis
left a comment
There was a problem hiding this comment.
Reviewed this PR against baseline/protected-geo-20261110 at aae1099f7f. No merge blockers for the Fastly suite and shared fixtures. The Fastly conformance wrapper and native rejection controls passed in CI on this head. The inline notes distinguish what the suite verifies today from coverage it does not yet provide. Dogfooding on deployed ingress and the remaining #1586 work are outside this approval.
| // thread left in the request-local slot. | ||
| drop(take_navigation_lookups()); | ||
| let delivery = with_finalization(&inputs, |finalize| { | ||
| FastlyService::new(&self.retained.app).run_request_with_hooks_for_test( |
There was a problem hiding this comment.
R1. Optional follow-up: exercise the registry-aware dispatch path. This invokes the real finalizer through the no-store test entry point, but serve attaches it through send_request_with_registries_and_hooks. The separate PR integration test checks cookie expiry on consent withdrawal, so removing the production callback entirely should already fail CI. If the registry path needs fixture coverage, EdgeZero exposes run_request_with_registries_and_hooks_for_test; using it would bring dispatch setup closer to production without claiming to exercise serve itself.
There was a problem hiding this comment.
This remains an optional follow-up. The correction in 476ee18 keeps the existing runner and describes its scope precisely: it uses the shared production finalizer, but does not claim to run serve or its registry construction. The separate withdrawal integration coverage remains. All required local gates pass; no runtime code changed. I am leaving this thread open rather than claiming the registry-aware path is now exercised.
PR #1532'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. The merge is clean. 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 #1532's new head brings #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 and #1639's pull reserve boundary check and wording. The merge is clean. 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:
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 #1532's new head ( Checks on this head: no conflict markers; |
Summary
ts-ec) without its stored record, and never drops an existing identity when geo is unavailable.Revision status, checked 2026-12-03 12:12 UTC: the maintainer advanced this PR to
71aec397bd, with basebaseline/protected-geo-20261110at3507c128fb476e430fbcf7694ca0b76b39217911and EdgeZeroef5cbf308. Earlier signed review correction476ee189c6remains 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 22 contexts (22 QUEUED); full current-head qualification is assessed separately.This PR adds tests and test infrastructure only. It changes no production identity behavior and adds identity to no other adapter.
Stacked on #1532 (
baseline/protected-geo-20261110), with #1506 carried through the baseline chain (historical cutover baselinecc811fc7aa0d234e447a868af5b8ab4ea359326a). A textual merge trial against the base is clean. Retarget to the appropriate successor after the base merges.#1615, #1616, #1617, #1627, #1635, #1636, #1637 and #1646 now build on this branch. Earlier trial merges at the then-current heads with siblings #1620, #1622 and #1626 were clean; those observations do not qualify the later SDK merge.
Changes
.github/workflows/test.ymlcrates/trusted-server-adapter-fastly/src/identity_conformance.rscrates/trusted-server-adapter-fastly/src/app.rscrates/trusted-server-adapter-fastly/src/main.rscrates/trusted-server-adapter-fastly/src/platform.rscrates/trusted-server-core/src/ec/kv_backend.rstest/test-utilsgates.crates/trusted-server-core/src/test_support.rscrates/trusted-server-core/src/test_support/identity_conformance.rscrates/trusted-server-integration-tests/README.mddocs/superpowers/specs/2026-11-16-identity-conformance-design.mddocs/superpowers/plans/2026-11-16-identity-conformance.mdscripts/test-identity-conformance.mjsscripts/test-identity-conformance.test.mjsCloses
Does not close an issue. This is the first slice of #1586, which cannot close until other planned work lands.
#1586 asks for three things. Where each one stands:
IdentityApp, but has no EC record store at this head (identify, batch sync and admin EC lookup answer 501), so there is nothing to run the suite against yet. #1574's own criteria require running this suite.ec.ec_storeinstead would break startup for existing Axum, Cloudflare and Spin configs.IdentityApp. The remaining gap is Fastly:crates/trusted-server-adapter-fastly/src/main.rsstill imports and callsec_finalize_responsedirectly.#1506 and #1600 (#1623) are already below this PR. Order of the remaining work: #1574 (PR #1646), then the startup check and the SH-5 check. Cloudflare follows in #1588.
Spec
Spec: Identity conformance design
Plan: Identity conformance implementation plan
Both documents include two review rounds. The missing-browser-metadata scenario reflects today's browser gate and must change when #1592 permits absent JA4.
What the suite does not cover
Test plan
Historical results (execution head unrecorded): reported local checks use Rust 1.98.1, Node 24.20.0 and Viceroy 0.21.0. Exact execution SHA and private local receipts are unavailable; current hosted checks are separate.
cargo test-fastly && cargo test-fastly-reuse && cargo test-axum && cargo test-cloudflare && cargo test-spincargo clippy-cli && cargo clippy-codegencargo fmt --all -- --check2415b7d80; this is not current-head qualification.Negative controls. Disconnecting finalization made the suite fail the missing-cookie check. Treating missing geo as consent withdrawal made it fail at "should retain the reader's cookie". Both pass again when restored. Native controls also reject late writes, late failures, expired cookies and tombstones counted as live records.
Headless Chrome. Real Chrome through the local hostname proxy to the publisher page, with
us_privacy=1YNN(Viceroy's default location is a US state that needs a consent signal):ts-ec; consent allowed, refused at the bot gate (ja4=None)ts-ecand a live record for the same IDSec-GPC: 1)The test build differs from the reviewed code only by a one-line fixed JA4 fallback, so this proves the lifecycle mechanics, not the real production ingress. Server-side DataDome protection was disabled in the disposable local config, protected image assets were blocked, and only the HTML document was checked.
The supplemental native core
--all-targets --features test-utilsclippy run reports the pre-existingresult_large_errlint inrun_pre_dispatch_hook, reproduced on the unchanged cutover base. This PR does not touch it.Checklist
unwrap()in production codelogmacros (notprintln!)2415b7d80(25 checks).