Skip to content

Load the decoupled prebid shim in the APS renderer browser spec - #988

Open
aram356 wants to merge 1 commit into
fix/aps-renderer-requestid-registrationfrom
fix/aps-renderer-spec-decoupled-shim
Open

Load the decoupled prebid shim in the APS renderer browser spec#988
aram356 wants to merge 1 commit into
fix/aps-renderer-requestid-registrationfrom
fix/aps-renderer-spec-decoupled-shim

Conversation

@aram356

@aram356 aram356 commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Fixes #989. Stacked on #963. Fixes the browser integration failure that appears wherever #963's APS renderer spec meets #967's prebid decoupling (currently rc/july).

Problem

aps-renderer.spec.ts ("renders a trustedServer adapter bid using Prebid's generated GAM ad ID") loads the external Prebid bundle and relies on it carrying the tsjs shim — which is what registers the trustedServer bid adapter. After #967 the external bundle is pure Prebid.js and the shim ships as the separately served tsjs-prebid.js deferred module. With no adapter registered the in-page auction never completes and the test times out at 30s. On rc/july the "Integration Tests" workflow has been red since the #967 merge (78632fe33); this spec doesn't exist on #967's branch, so its own CI never caught it.

Fix

Detect which world the built bundle is from via the window.__tsjs_prebid_bundle manifest stamp (only the decoupled bundle stamps it) and load dist/tsjs-prebid.js after the external bundle — the same script order the server serves.

Test-only change; no runtime code touched.

The APS adapter spec loads the external Prebid bundle and assumed it
carries the tsjs shim (and the trustedServer adapter) inside it. Once
the shim is decoupled (PR #967) the external bundle is pure Prebid.js,
no adapter ever registers, and the in-page auction times out.

Detect the decoupled world through the window.__tsjs_prebid_bundle
manifest stamp and load dist/tsjs-prebid.js after the external bundle,
matching the script order the server actually serves. On a coupled
bundle the stamp is absent and the spec behaves exactly as before.
aram356 added a commit that referenced this pull request Aug 1, 2026
Brings in the #988 browser-spec fix through its PR lineage and, because
#988 stacks on #963's head, refreshes rc's stale #963 absorption with
the July 29-30 rework:
- bid.meta second descriptor carrier and bidAccepted registration
  replacing the requestId stash (prebid shim and Rust provider)
- Hardened APS auction delivery: sanitized publisher page identity
  (query/fragment stripped), delivery drop telemetry with
  dropped_winner_count/reasons, imp disposition counters
- ProviderLaunchState/ProviderRequestOutcome orchestrator refactor with
  parse_state threading and Immediate outcomes
- as_aps() Option accessor, fail-closed render-bridge stop, responsive
  slot-root helpers, case-insensitive APS exclusion tests

Preserved rc-only systems the #963 branch predates: #956 opt-in creative
processing (process_auction_creative, sanitize_creatives), #967
decoupled prebid shim (public markWinningBidAsUsed instead of prebid.js
internals), #948/#912 GPT sync, #865 platform timeout canonicalization
(restored at both launch paths and both mediator paths, with the
duplicate backend-name pre/post-launch guards and their test suite
ported to the new provider API), and the provider-validation startup
checks.
aram356 added a commit that referenced this pull request Aug 1, 2026
…c/july

Adopts main's finalized #974 GPT diagnostics (standalone ts_console-gated
module, finalize_response wiring, updated overlay/store/badges/binding)
over rc's earlier absorbed copy, and #984's whole-package eslint gate
(eslint . --max-warnings=0). Keeps rc-only content where the two lint
passes collided: the #963/#967/#988 test rewrites in the prebid, APS,
request, and ad_init suites, the GptSlotHandoff type, and the
unexpected-origin-304 guard alongside main's diagnostics finalize call
in publisher.rs.
@aram356 aram356 self-assigned this Aug 2, 2026
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.

1 participant