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:
|
Summary
ts-ec) without its stored record, and never drops an existing identity when geo is unavailable.This PR adds tests and test infrastructure only. It changes no production identity behavior and adds identity to no other adapter.
Stacked on #1506 (
spec/edgezero-pr275-migration, baselinecc811fc7aa0d234e447a868af5b8ab4ea359326a). Retarget tomainafter the cutover merges.Changes
.github/workflows/test.ymlcrates/trusted-server-adapter-fastly/src/identity_conformance.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:
ec.ec_storeinstead would break startup for existing Axum, Cloudflare and Spin configs.Order of the remaining work: #1506 → #1600 → #1574, 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
Local checks use Rust 1.98.1, Node 24.20.0 and Viceroy 0.21.0.
cargo test-fastly && cargo test-fastly-reuse && cargo test-axum && cargo test-cloudflare && cargo test-spincargo clippy-cli && cargo clippy-codegencargo fmt --all -- --checkNegative 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!)