Repository navigation
Conversation
|
@jevansnyc Please don't stack on top rc branch this should target of one down stream PRs or main |
A stable ID such as a SharedID or a pull-sync partner's ID is bounded to 30 days in the row and on the mirror, like a vendor token. The spec gives a source a UID lifetime of its own, from 1 to 365 days, with 365 as the default for stable sources, and records how it should meet the finite lifetime work in #1548 and #1715. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PtcLmGQyykYkNRTJ5G9Ydb
Validation clamped every provider-stated expiry to 30 days and the mirror capped every UID's exp at 30 days, so a SharedID or a pull-sync partner's ID left the page after a month although its EC row lasts a year. Add uid_lifetime_days (1 to 365) on [[ec.partners]]. A source with a lifetime keeps each provider-written UID that long from the write and uses the lifetime as its mirror cap. A relative expiry is replaced; an exact vendor expiry still applies when earlier; an expired UID is not revived; the refresh time keeps its 30-day clamp. Without the setting, the sources of an enabled sharedid provider, and a pull-sync partner's source that no enabled provider owns, default to 365 days. Every other source is unchanged. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PtcLmGQyykYkNRTJ5G9Ydb
e49e18c to
ccefdf4
Compare
|
@aram356 Retargeted to One thing for the Generated by Claude Code |
…ntegration chain
|
Merged #1614's Trusted Server owns the This merge takes #1662's new head ( Checks on this head: no conflict markers; |
Summary
__Host-ts-eids-mirrorcookie, like a vendor token. A publisher using Trusted Server for identity only loses it from the page after a month, although the row lasts a year.uid_lifetime_days(1 to 365) on[[ec.partners]]. A source with a lifetime keeps each provider-written UID that long from the write and uses the lifetime as its mirror cap.sharedidprovider, and a pull-sync partner's source that no enabled provider owns, default to 365 days. Every other source behaves as before.Based on
feat/1598-ec-route-fastly(#1662), the top of the identity chain. The new type insettings.rssits away from the code #1655 adds, so the two merge intorc/identitywithout a conflict.Draft for discussion. It overlaps with #1548 and #1715, which bound every provider UID to 30 days from acquisition. The spec's "Related work" section proposes how the two fit together (make that maximum per source). This should not merge before that is agreed with their authors.
Changes
crates/trusted-server-core/src/settings.rsUidLifetimeDays(validated 1 to 365) and the optionaluid_lifetime_dayskey onEcPartner.crates/trusted-server-core/src/ec/registry.rsPartnerConfig::uid_lifetime(): the configured value, else 365 days for a stable source, else none.PartnerRegistry::mark_stable_uids.crates/trusted-server-core/src/ec/coordinator/validate.rscrates/trusted-server-core/src/ec/mirror.rsexpcap is computed per partner from its lifetime, else 30 days.crates/trusted-server-identity-providers/src/lib.rspartner_registrymarks the sources of an enabledsharedidprovider as stable.crates/trusted-server-core/src/ec/finalize.rsec/*.rs,auction/endpoints.rs,adapter-fastly/src/post_delivery.rs)uid_lifetime_days: Nonein hand-builtEcPartnerliterals.docs/guide/configuration.md,docs/guide/edge-cookies.md,trusted-server.example.toml,CHANGELOG.mdsharedid"Kept for" entries now match the code.docs/superpowers/specs/2026-12-03-stable-uid-lifetime-design.mddocs/superpowers/specs/2026-10-30-s2s-eid-collection-design.mdBehaviour change on upgrade: a deployment with an enabled
sharedidprovider keeps SharedID UIDs for 365 days (was 30), and a mirrored pull-sync UID carries a 365-dayexp(was 30).uid_lifetime_days = 30on the partner restores the earlier period.Closes
Closes #1739
Related: #1548, #1715, #1594.
Spec
Spec: docs/superpowers/specs/2026-12-03-stable-uid-lifetime-design.md
The spec has no agent review rounds yet. Its review log says so.
Test plan
cargo test-fastly && cargo test-axumcargo clippy-fastly && cargo clippy-axumcargo fmt --all -- --checkcd crates/trusted-server-js/lib && npx vitest runcd crates/trusted-server-js/lib && npm run formatcd docs && npm run formatcargo build --package trusted-server-adapter-fastly --release --target wasm32-wasip1fastly compute serveRun locally and passing:
cargo test -p trusted-server-core -p trusted-server-identity-providers --target x86_64-unknown-linux-gnu --lib(3964 and 137 tests on the Verify EC route acceptance on Fastly and cap mirrored expiry #1662 base)cargo test-axumcargo clippy-fastly,cargo clippy-axum,cargo clippy-cloudflare,cargo clippy-spin-native,cargo clippy-clicargo fmt --all -- --check,cd docs && npm run format, root markdown prettier checkscripts/lint-wasm-clock.sh,scripts/lint-core-block-on.shNot run locally, left to CI:
cargo test-fastlyandcargo test-fastly-reuse(no Viceroy in the environment used),cargo test-cloudflare,cargo test-spin, the wasm clippy variants for Cloudflare and Spin, the parity integration test, the WASM release build, and the JS suite (no JS change).Checklist
unwrap()in production code — useexpect("should ...")logmacros (notprintln!)Generated by Claude Code