Parent epic
#532
Description
Write Viceroy-based integration tests covering the full identity lifecycle across multiple handlers.
Scope: tests/ (integration test crate or new test module)
Acceptance criteria
- Full flow: Page load → EC generated → pixel sync writes partner UID →
/identify returns UID → auction includes EID.
- Consent withdrawal: Denied consent clears EC cookie + writes KV tombstone in same request; subsequent
/identify returns 403 (consent denied → §11.4); batch sync returns consent_withdrawn within tombstone TTL.
- KV create failure: EC cookie still set when
create_or_revive() fails. /identify returns 200 with degraded: false, empty uids/eids.
- KV read failure:
/identify returns 200 with degraded: true, empty uids/eids.
- Concurrent writes: Two simultaneous EC creates resolve without data loss (CAS retry).
- Rate limits: Pixel sync
429 after sync_rate_limit exceeded; batch sync 429 after batch_rate_limit exceeded.
- Pull sync no-op: Partner returning
{ "uid": null } → no KV write, no error log.
- All tests pass under
cargo test --workspace with Viceroy.
Spec ref
docs/internal/ssc_technical_spec.md §18.2
Parent epic
#532
Description
Write Viceroy-based integration tests covering the full identity lifecycle across multiple handlers.
Scope:
tests/(integration test crate or new test module)Acceptance criteria
/identifyreturns UID → auction includes EID./identifyreturns403(consent denied → §11.4); batch sync returnsconsent_withdrawnwithin tombstone TTL.create_or_revive()fails./identifyreturns200withdegraded: false, emptyuids/eids./identifyreturns200withdegraded: true, emptyuids/eids.429aftersync_rate_limitexceeded; batch sync429afterbatch_rate_limitexceeded.{ "uid": null }→ no KV write, no error log.cargo test --workspacewith Viceroy.Spec ref
docs/internal/ssc_technical_spec.md§18.2