Skip to content

Complete client CWV loading, reservation and GPT initial delivery - #1460

Draft
ChristianPavilonis wants to merge 15 commits into
mainfrom
issue-854-publisher-slot-registration
Draft

ChristianPavilonis wants to merge 15 commits into
mainfrom
issue-854-publisher-slot-registration

Conversation

@ChristianPavilonis

@ChristianPavilonis ChristianPavilonis commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Status

Draft recovery candidate. Do not merge or close the issue yet.

The cacheable unified candidate is pushed at dec05bdc9c461a8e43c19d5f51be68e520ebb178. It improves the reproduced cold/warm lab regression, but acceptance of synchronous loading and the changed critical-script outage boundary is still pending. Dedicated real-GPT inventory is missing. The PR remains draft, with no review requests or issue-closing statement.

The earlier full CWV contract still requires deferred loading and rejects this candidate with loading must exercise its intended production loading mode. It has not been rewritten to make a diagnostic pass count as full acceptance. Framework/live consumer migration and the final acceptance matrix are deferred until the architecture decision. Hosted checks may therefore fail the unmigrated contract; full hosted success is not claimed.

Changes

  • Preserve publisher-registered initial delivery, explicit payload admission, native-slot cancellation/destruction, targeting retirement and navigation generations. This is opt-in publisher cooperation, not transparent duplicate prevention for unchanged pages.
  • Preserve explicit responsive slot-space reservation and its stable publisher-wrapper requirement. No format-derived guessed height or general zero-CLS promise.
  • Use the existing versioned synchronous unified runtime for the supported GPT profile instead of embedding both raw and compiled early initializers in every HTML response.
  • Keep configuration before the runtime, full GPT APIs before subsequent publisher scripts, actual CSP/diagnostics/trace handling, attribution/APS attributes and existing separately deferred integration order.
  • Retain provisional initialization for other browser-module profiles unless actual enforced CSP requires omission. Keep implementation/handover code rather than expanding this into source or executable-size cleanup.
  • Add two explicit test-only diagnostic scopes. Neither can satisfy the full acceptance verifier. No production loading flag, retry, codec or dependency is added.

Matched diagnostic measurements

Eighty measurements use pinned original main 51730bdaf841e4d7bb96c2258e5e98169bdff9a7, four alternating arms, two viewports and five samples per group. CPU is 4x, latency 100 ms, download 1,600 kbit/s and upload 750 kbit/s, with zero artificial runtime hold. The transport is uncompressed fictional loopback HTTP, not real GPT/GAM or field CWV.

Baseline to combined medians:

Condition Viewport FCP/LCP, ms First visible ad estimate, ms
Cold 390x844 948 to 824 1,345.7 to 1,231.9
Cold 1280x1000 956 to 828 1,350.0 to 1,208.7
Warm 390x844 348 to 168 564.8 to 395.1
Warm 1280x1000 352 to 152 563.0 to 382.2

The candidate document is 2,104 bytes instead of the previous candidate's 128,941 bytes. Warm runs demonstrate real HTTP runtime cache hits and zero runtime transfer bytes. Each measurement checks one native fixture request, candidate targeting and a visible creative. Controlled CLS remains zero with the configured reservation.

All 14 production JS modules are byte-identical. Re-exporting the committed source proves all 11 servable files per arm and production source fingerprints match the measured artifacts. The screen retains its original tooling hashes; the later outage extension is separately executed, not relabeled as another timing run. Production compressed-delivery magnitude remains unverified.

Focused outage proof

Four separate browser cases cover normal and old-hash/self CSP success and critical-unified HTTP 404 under each policy. Success has working APIs, a single queue callback/request and visible creative. Failure has no TS initialization/shim/renderer APIs, no queue drain, one 404 without retry, zero native requests/delivery, completed parsing and only the declared core-dependent publisher error. CSP violations remain zero.

This differs from the previous inline/deferred design, where a failed deferred GPT asset left early rendering available. The diagnostic explicitly records changedOutageBehaviorApproved=false and fullAcceptancePassed=false. Observation is not acceptance of the new boundary.

Checks

Fresh checks pass:

  • 3,376 native core tests, 20 native integrations and 30 doctests.
  • 60 Axum tests and 28 cross-adapter parity tests.
  • All eight target-specific Clippy aliases, adapter test aliases, native digest lint and native/actual Axum/Fastly EOF-auction checks. All 23 selected validation-script gates pass, including build, stamp and Rust formatting.
  • 80 selected Node tests, zero skips, plus 16 compiled-IIFE startup tests.
  • Wasm clock lint, Node pins, changed-domain lint, scoped ESLint/formatting and docs build.
  • Two independent read-only cross-reviews, with no additional correctness findings.

Existing ignored tests remain ignored. Previous broad JS results are reused for unchanged production JS inputs, not reported as a fresh full suite. Standalone TypeScript's previously recorded inherited failures remain disclosed. The new candidate's complete framework and real-GPT acceptance have not run. The existing full CWV correctness scope exits 1 with zero completed samples because its deferral expectation is intentionally unmigrated.

Remaining decisions and proof

  1. Accept synchronous loading with documented blocking dependencies, as issue Client CWV: defer tsjs bundle, CLS min-height injection, disableInitialLoad #854 permits, or retain the stricter parser-progress requirement and revise the design.
  2. Accept the observed sole-critical-script outage boundary, or require the previous inline fallback guarantee and revise the design.
  3. Once the contract is settled, migrate the affected full controls/framework/live consumers and run the final agreed matrix. Add deployment-relevant encoded delivery only where needed for those claims.
  4. Supply owner-authorized dedicated GAM inventory, known TS/ordinary creative IDs and visible markers. Run genuine original-main failure reproduction and candidate real-GPT delivery. Missing inventory remains blocked, never skipped success.

No deployment, publisher activation or Google traffic is authorized by these diagnostic runs. Keep this PR draft even if later checks pass unless explicitly instructed otherwise.

Evidence

Defer supported GPT runtime with early APIs and CSP-safe synchronous fallback. Add explicit responsive reservation, measured browser contracts, framework coverage and validation records for #854.
@ChristianPavilonis ChristianPavilonis changed the title Add opt-in publisher-registered GPT initial delivery Complete client CWV loading, reservation and GPT initial delivery Oct 29, 2026
Keep issue 854 open: functional checks pass, but warm-cache paint and ad startup regress and dedicated real-GPT inventory is unavailable. Record all 200 measurement rows and exact-byte reuse proof. Canonicalize artifact fingerprints and make interrupted live runs fail without retaining stale success.
@ChristianPavilonis

Copy link
Copy Markdown
Collaborator Author

Pushed 24a438e and updated the description and validation records. The matched tests expose a warm-cache regression: throttled mobile FCP/LCP rises from 348 to 756 ms and the visible-ad estimate from 550 to 1,008 ms, despite genuine runtime cache hits. Local functional checks pass, but that performance issue and missing dedicated real-GPT/GAM inventory prevent closure. This stays in draft without an issue-closing keyword or review requests until those blockers are resolved. The validation record and all 200 measurement rows are linked in the description.

Address the four hosted CodeQL fixture findings without suppressions. Connect using trusted origin-map fields, avoid reflecting request data in tests, and compare parsed configuration settings. Node82 and cold4/warm32 browser checks pass; emitted configurations and production assets are unchanged.
Adopt the approved synchronous unified loading and no-fallback outage contract in the full CWV and publisher acceptance consumers.

Preserve registered trace correlation, bind exported JavaScript to current sources and selected runtime bytes, invalidate stale acceptance journals, and verify marker visibility across frame boundaries.

Record passing scoped verification and byte-checked measurement reuse without relabeling the failed controller attempt or claiming real-GPT acceptance.
Keep pending publisher registrations in the same navigation generation on
explicit page-bids retries, while real pathname changes still retire old
work. Cover the failure and recovery through source and browser regressions.

Generate the existing standalone bootstrap from shared registration and
targeting-cleanup source without adding a runtime artifact or dependency.
Share synchronous-runtime ordering assertions across framework/live specs.

Validation includes 2,215 JS tests, 136 Node tests, 111 offline browser
cases, 26 CWV cases, 40 Rust/Next.js cases, core and adapter tests, all
Clippy aliases and the production WASM build. Standalone TypeScript keeps
315 inherited diagnostics with no new signatures. Real-GPT delivery and
full repeated performance acceptance remain unverified.
retainPublisherSlotMappings(ts, ts.divToSlotId, ts.prevSlotTargetingKeys);
try {
const auctionId = candidate == null ? void 0 : candidate.hb_auction_id;
const trace = (_f = (_e = getTraceBridge == null ? void 0 : getTraceBridge()) == null ? void 0 : _e.opportunity(slot, auctionId)) != null ? _f : { auctionId };

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.

Client CWV: defer tsjs bundle, CLS min-height injection, disableInitialLoad

3 participants