Skip to content

Honor all decoded US GPP opt-outs - #1714

Open
prk-Jr wants to merge 11 commits into
feat/1598-ec-route-fastlyfrom
fix/1695-us-gpp-opt-out-fields
Open

prk-Jr wants to merge 11 commits into
feat/1598-ec-route-fastlyfrom
fix/1695-us-gpp-opt-out-fields

Conversation

@prk-Jr

@prk-Jr prk-Jr commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Honor the explicit US GPP refusal signals specified by #1695. Sale, sharing, targeted-advertising, known-child NoConsent and supported GPC signals contribute to GppConsent.us_opt_out; both EC creation and explicit withdrawal consume that aggregate.

Under configured US-state consent rules, a decoded refusal prevents a new Edge Cookie and expires a held EC. The existing EC eligibility gate also withholds EC/partner identifiers and browser EIDs from server-side auctions before the separate TCF/GDPR filter.

Policy and rollout

Known-child value 1 (NoConsent) participates without an independent age check. If a CMP encodes this value for an adult reader, it causes the same refusal and withdrawal under the configured US-state rules. Publishers should check their CMP's actual encoding before upgrading. The Prebid guide and Unreleased changelog now document this consequence.

This implements #1695's explicit-refusal rule, not every Prebid MSPA activity control. Known-child values 0 (Not Applicable) and 2 (Consent) are not refusals here; invalid value 3 retains the dependency's existing NotApplicable behavior. Broader activity-control parity needs a separate policy/spec decision.

Stack and review corrections

  • Actual base: feat/1598-ec-route-fastly (8f96b3512111c159aecd6d8a5b57ee77d0b404c1). This PR is part of the identity stack.
  • The current stack already migrates the ec/consent_update.rs test reader to us_opt_out; the earlier outstanding-migration note no longer applies.
  • Review corrections share test-only bit packing and GPC capability metadata, update stale sale-only test wording, add the requested changelog entry, and explain the known-child rollout consequence. They do not change runtime behavior or the public API used by downstream Honor explicit refusals across jurisdictions #1717.
  • SDK-decoded named-field assertions and no-refusal controls remain intact for National v1/v2 and every supported state section.

Validation

  • Review-fix revision: eb7a187ee6026165f2a7ede319130715cb233323 (signed; GitHub Verified).
  • All required local gates passed: eight adapter/CLI/codegen lint aliases; all five adapter test aliases; parity; native digest; JS build/Vitest; formatting; documentation/script/domain/environment guards; deadline fixtures; fresh production builds and startup smokes on Fastly, Axum, Cloudflare and Spin.
  • 132 targeted consent tests pass. Before/after fixture helpers emit identical bytes for all 334 compared cases.
  • All 34 hosted checks passed on this exact revision, including browser/integration/trace and Fastly EC lifecycle acceptance.

No deployment or live CMP/vendor qualification is claimed. Rustdoc completes with 31 existing documentation warnings.

Closes #1695

@prk-Jr prk-Jr self-assigned this Nov 30, 2026
@prk-Jr
prk-Jr marked this pull request as ready for review December 1, 2026 11:14
@prk-Jr
prk-Jr added this pull request to stack #1719 December 1, 2026 13:25

@ChristianPavilonis ChristianPavilonis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 83e447d05 against main (db36dc0ec).

Approving so I'm not blocking, on the understanding that you'll handle the comments before merging. The field mapping checks out against iab_gpp 0.1.2 for every supported section, including the three without GPC (VA, UT, FL).

R1 · Nonblocking: please add a CHANGELOG entry. Out of the diff, so here instead of inline. Operators will see this: US-state readers whose GPP refuses sharing, targeted ads or known-child consent, or sets GPC, stop getting a new EC, and a held EC is expired on the next request. Recent user-visible fixes (#1516, #1493, #1429) added a ### Fixed bullet under [Unreleased]. One referencing #1695 would do.

Question, not blocking: Prebid's MSPA activity controls deny more cases than this does (for example any applicable under-13 value, including 2, and PersonalDataConsents == 2). This follows #1695's narrower rule. Do we want Prebid parity later?

Reminder, as you noted: ec/consent_update.rs:480 on rc/identity still reads us_sale_opt_out, so RC tests won't compile until that's renamed.

Checks: cargo test -p trusted-server-core --lib consent:: (125 passed), native clippy on core, rustfmt.

PR #1714 moves from main onto PR #1662's branch, the top of the identity chain trunk. PR #1662's head brings the identity integration chain as of round 12 wave A.

The merge is textually clean.

crates/trusted-server-core/src/ec/consent_update.rs (merged clean, failed to compile): the chain's consent-update snapshot test reads the decoded US opt-out through the old GppConsent.us_sale_opt_out field, which #1714 renames to us_opt_out. The resolution renames that one test reader. The test's opt-out snapshot sets sale opt-out, so its expectation is unchanged.

@dhruv8sh dhruv8sh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

This PR widens the GPP US signal from sale_opt_out only to any explicit sale, sharing or targeted-advertising opt-out, a known-child NoConsent, or an asserted GPC subsection, across UsNat v1/v2 and all 16 state sections. It also renames GppConsent::us_sale_opt_out to us_opt_out. The aggregation logic is correct and consistent with the existing "any refusal wins, otherwise a decodable section means Some(false)" rule. The generated-fixture tests are thorough: each one checks the decoded field by name, so a bit-offset mistake can't pass silently. One policy concern is worth confirming before merge: known-child NoConsent now also counts as an explicit EC withdrawal.

Non-blocking

🤔 thinking / ⛏ nitpick

  • Known-child NoConsent now triggers EC withdrawal for every user — see inline at crates/trusted-server-core/src/consent/gpp.rs:365
  • Missing blank line between test functions — see inline at crates/trusted-server-core/src/consent/gpp.rs:919

👍 praise

  • Fixture generator asserts the decoded field by name — see inline at crates/trusted-server-core/src/consent/gpp.rs:804

Cross-cutting / body-level findings

  • 🏕 Stale sale_opt_out wording in consent/mod.rs tests: ec_allowed_us_state_gpp_no_sale_opt_out (line 1436) and the assertion messages at lines 1449 and 1467 still describe the signal as sale_opt_out=false/true, but the field is now the aggregate us_opt_out. Renaming them, e.g. to ec_allowed_us_state_gpp_no_us_opt_out and "GPP US opt-out=false should allow EC", would keep the tests consistent with the rename this PR already made to decodes_us_opt_out_not_opted_out.

PR #1662'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.
@aram356
aram356 removed this pull request from stack #1719 December 1, 2026 23:13
@aram356
aram356 changed the base branch from main to feat/1598-ec-route-fastly December 1, 2026 23:13
aram356 added a commit that referenced this pull request Dec 1, 2026
One octopus merge of the round 12 tips into rc/identity c3e3366. It is a single octopus because the RC already holds every sibling's old head, so each tip's new head merges in alongside the others rather than as a chain of merges. The tree is the automatic merge of the RC and all tips, with no resolution: every tip pair, their union and the merge into the RC are clean.

Tips, in parent order after the RC:

- PR #1503 at 4225024
- PR #1653 at 4bd4903
- PR #1654 at 95cf3e8
- PR #1655 at 05c509d
- PR #1622 at afe5217
- PR #1660 at c1a05d7
- PR #1666 at 108b122
- PR #1659 at 5fb8190
- PR #1709 at 6d152f6
- PR #1710 at dcceeee
- PR #1713 at cae7801
- PR #1557 at 302e972

PR #1659 sits above PR #1718, so it carries PR #1714, PR #1717 and PR #1718.
@aram356
aram356 added this pull request to stack #1721 December 1, 2026 23:14
@aram356

aram356 commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator

Round 12 identity realignment: rc/identity is now at db7dce634, and EdgeZero is pinned to its rc/identity at 8a73c097. This branch fast-forwarded from 83e447d05 to 89b2ccc6a:

The base moved from main to feat/1598-ec-route-fastly, the identity chain's trunk, so the diff shows only this fix on top of the chain. One chain test in ec/consent_update.rs now reads us_opt_out. #1717 stays stacked on this PR; GitHub stack 1719 was replaced by stack 1721 (#1714, #1717, #1718, #1659).

Each merge message says what it carries and how any conflict was resolved.

PR #1662's new head brings #1535's owner fix that keeps mirrored GPP consent through transient CMP not-ready states (#1678), #1535's move of the consent-update test host to publisher.example.com for the URL-host lint and #1540's allow-domain marks on the deployment guide's reference links. The merge is clean.
PR #1662's new head brings #1506's move of the five auction endpoint test requests from test-publisher.com to publisher.example.com, for the URL-host lint. The merge is clean.
PR #1662's new head brings #1662's consent-string comment on the EC route fixture, plus #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, #1625's shared Wrangler installer for CI, #1639's pull reserve boundary check and wording, #1613's conformance doc alignment, #1616's certificate policy and pull-sync fixture corrections, #1617's preserved startup diagnostics and hardened runtime checks, #1635's complete startup evidence in native fixtures, #1637's shared readable non-Unicode Geo fixture, #1627's Spin store reads and retained runtime coverage, #1535's Sourcepoint consent mirror deduplication and consent update coverage, #1636's stronger after-response body and drain checks, #1626's enforcement of stored and carried provider opt-outs, #1656's strict browser gate wording and #1661's grouped QUIC JA4 fixture. 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.
@aram356

aram356 commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Round 15 identity realignment: rc/identity is now at 391a08578, and EdgeZero is pinned to its rc/identity at ef5cbf308. This branch fast-forwarded from 11c3cd0fe to b268b9f22:

Each merge message says what it carries and how any conflict was resolved.

Carries #1533's Axum startup-test port fix (779e446) and nothing
else. Owner commits pushed to other chain PRs since round 15 come in
with the next round.
@aram356

aram356 commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Cascade of #1533's Axum startup-test port fix (779e44673): 20ce0e7d2 merges it into this PR. There were no conflicts and nothing else changed. The fix moves free_loopback_port in crates/trusted-server-adapter-axum/tests/routes.rs below the ephemeral port range, and #1533's note has the details. Owner commits pushed to other chain PRs since round 15 come in with the next round. rc/identity is now 62f8e41e2.

@aram356

aram356 commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Merged #1627's runtime KV removal (7c2b84f45) into this branch as 5eb4e7a9f, on top of 20ce0e7d2.

At the maintainer's request, that commit removes the generic runtime KV store trusted_server_runtime_kv. Nothing reads or writes it, and the managed Fastly deploy made every service provision and pay for it. edgezero.toml and the Fastly Hooks::stores() now declare only trusted_server_kv, and RuntimeServices::kv_store() is unavailable on every adapter.

Only that commit was merged, not the base branch's new head. Conflicts were resolved in edgezero.toml, the Fastly Hooks::stores() in app.rs, fastly.toml, the Viceroy template, the integration tests' config.rs, trusted-server.example.toml, docs/guide/architecture.md and docs/guide/edgezero.md. Only trusted_server_kv stays declared, this branch's record-store comment and local seeds are kept, and the runtime-KV lines are dropped. The Axum README and docs/guide/axum-dev.md keep this branch's Axum wording.

Checks on this head: no reference to the removed store remains and cargo fmt --check passes; clippy-fastly, clippy-axum, clippy-cloudflare and clippy-spin-native pass. rc/identity (b9dc3153e) passed the full CI gate list with the removal.

PR #1662's new head brings #1487's change that strips `ts-eids` from publisher-origin requests unless the operator opts in and #1646's fix that preserves filter headers through identity finalization. The merge is clean.
@aram356

aram356 commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Round 17 identity realignment: rc/identity is now at 0ed862633, and EdgeZero stays pinned to its rc/identity at ef5cbf308. This branch fast-forwarded from 5eb4e7a9f to e8416655e:

Each merge message says what it carries and how any conflict was resolved.

@prk-Jr

prk-Jr commented Dec 4, 2026

Copy link
Copy Markdown
Collaborator Author

Addressed the body-level feedback from both approved reviews in eb7a187ee.

  • Added the requested Unreleased Fixed entry referencing Treat every US GPP opt-out field as an opt-out #1695, including the operator impact: applicable refusals block EC creation and expire a held EC under the configured US-state rules.
  • Renamed stale sale-only test names and messages to describe the aggregate US opt-out flag.
  • Kept Treat every US GPP opt-out field as an opt-out #1695's explicit-refusal policy. Known-child NoConsent (1) participates without an independent age check; the guide, changelog and PR description now explain the conditional adult-CMP encoding consequence. Full Prebid MSPA activity-control parity would require a separate policy/spec decision; it is not implemented here.
  • The current stacked branch already migrated the ec/consent_update.rs assertion to us_opt_out. It compiles and passes with the current core tests; no additional RC edit is required. The source API and runtime behavior remain compatible with downstream Honor explicit refusals across jurisdictions #1717.
  • Corrected the PR description's stale main/base and outstanding-migration claims to the current feat/1598-ec-route-fastly base.

All required local gates passed, including fresh production startup smokes on all four adapters; all 34 hosted checks passed on this commit. The 334-case before/after fixture comparison is byte-identical. Rustdoc completed with existing documentation warnings; this does not claim live CMP/vendor qualification.

@aram356

aram356 commented Dec 4, 2026

Copy link
Copy Markdown
Collaborator

Merged #1614's /_ts/ local answers (48930c270) into this branch as 04ba7a917, on top of eb7a187ee.

Trusted Server owns the /_ts/ namespace (#1740). A request for /_ts or any /_ts/ path that no route handles now gets a local 404 on Fastly, Axum, Cloudflare and Spin, and never reaches the publisher origin. The path is matched after percent-decoding. Paths outside the namespace, such as /_tsx or /articles/_ts/x, still go to the publisher origin, and every routed /_ts/ path answers as before.

This merge takes #1662's new head (1e8c9997f), which carries 48930c270 and nothing else new to this branch. It was clean.

Checks on this head: no conflict markers; cargo fmt --all -- --check passes; the merge adds exactly #1614's change to this branch's files; it merges cleanly with every lower head in its stack; clippy-fastly, clippy-axum, clippy-cloudflare and clippy-spin-native pass. rc/identity (e72407155) passed the full CI gate list with the change.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Treat every US GPP opt-out field as an opt-out

4 participants