Prevent accidental Prebid Server stored requests - #1159
Draft
ChristianPavilonis wants to merge 1 commit into
Draft
Prevent accidental Prebid Server stored requests#1159ChristianPavilonis wants to merge 1 commit into
ChristianPavilonis wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
trustedServer.params.storedRequestintent:falsedisables stored fallback,truepermits it, and omission preserves legacy behavior. Filter demandless PBS impressions after server-side parameter overrides without suppressing eligible Amazon Publisher Services (APS) or other providers.Changes
Changed files
crates/trusted-server-core/src/auction/routing.rscrates/trusted-server-core/src/auction/openrtb.rscrates/trusted-server-core/src/auction/openrtb/tests.rscrates/trusted-server-core/src/auction/orchestrator.rscrates/trusted-server-core/src/auction/formats.rscrates/trusted-server-js/lib/src/integrations/prebid/index.tsfalseand preserves authored intent in live ad units and immutable refresh snapshots.crates/trusted-server-js/lib/test/integrations/prebid/index.test.tscrates/trusted-server-js/lib/test/core/auction.test.tsnullfor server validation.crates/trusted-server-js/lib/test/prebid-artifact-integration.test.mjsdocs/guide/api-reference.mddocs/guide/integrations/prebid.mddocs/guide/auction-orchestration.mdCHANGELOG.mddocs/superpowers/plans/2026-09-10-pbs-stored-request-intent.mdScope
This touches 14 files because the intent must survive browser generation, refresh reconstruction, server routing, and final request construction. Most additions are regression tests and documentation; changing only the router would leave a second stored-request fallback in the request builder.
No dependencies, adapter implementations, provider configuration, browser provider selectors, or explicit stored IDs are changed. Legacy inference and intentional stored-demand fanout remain supported. PBS
all_eligibleconfiguration remains rejected by the existing compiler, so its boundary test is retained rather than enabling a new configuration mode.Deployment
Deploy server support everywhere before serving the new JavaScript. The old router rejects unknown envelope fields and can drop valid inline demand when it receives
storedRequest.Rust artifacts embed the JavaScript bundles. First prepare a server-support-only build retaining old JS emission, then distribute the full build. Keep compatible server admission during rollback while browsers may retain the new JS. Existing legacy callers and intentional stored requests can still reference missing slot-code IDs; this change does not eliminate unrelated PBS validation errors.
Closes
Closes #1086
Test plan
Meaningful failing-before assertions were captured for explicit intent admission, generated JS serialization, and the remaining post-override fallback. They pass after the fix. Independent correctness review found no issues.
cargo test-fastly && cargo test-axumcargo test-cloudflare && cargo test-spin./scripts/test-cli.shcargo clippy-fastly && cargo clippy-axumcargo clippy-cloudflare && cargo clippy-cloudflare-wasmcargo clippy-spin-native && cargo clippy-spin-wasmcargo fmt --all -- --checkcd crates/trusted-server-js/lib && npx vitest run, 923 tests passednpm run lint,npm run format, andnode build-all.mjscd docs && npm run format && npm run buildgit diff --checkcargo build --package trusted-server-adapter-fastly --release --target wasm32-wasip1fastly compute serveFastly tests ran through Viceroy; Cloudflare and Spin production WASM paths passed Clippy. The full Rust suites passed with 10 pre-existing Fastly tests/doctests ignored. After a mechanical Clippy fix and a test-only example-domain correction, all six Clippy checks and focused routing/OpenRTB tests were rerun successfully; the full suites were not repeated after those two edits. No live PBS service was contacted.
Checklist
unwrap()in production code; useexpect("should ...")loginstrumentation conventions preserved; noprintln!added