Document GPT diagnostics attribution and correlation evidence - #1025
Document GPT diagnostics attribution and correlation evidence#1025prk-Jr wants to merge 3 commits into
Conversation
Complete the public guide against the behavior merged in #997. Cover the per-auction hb_auction_id correlation token and the targeting boundary that keeps it out of the ad request, badge delivery labels, creative-bridge failure triggers, Ad Manager identifier normalization, and the adInit refresh context. Add troubleshooting for unattributed and competing refreshes, unconfirmed candidate delivery, and missing correlation evidence. Link the guide from the GPT integration page, use the exact ts_console=1 activation example, and drop the integrations overview claim that diagnostics make no attribution claims.
ChristianPavilonis
left a comment
There was a problem hiding this comment.
Automated Review:
Review Summary
Reviewed the documentation-only change against the GPT diagnostics implementation and its surrounding request, delivery, refresh-attribution, correlation, and export behavior. No high-confidence correctness, security, compatibility, or documentation defect was identified.
Findings
P0 / Blockers
None.
P1 / High
None.
P2 / Medium
None.
P3 / Low
None.
CI / Existing Reviews
All reported PR checks are passing. No prior submitted reviews or inline review comments were present at review time. Local documentation formatting could not be run because the repository's documentation dependencies are not installed (prettier: not found); the PR's format-docs CI check is passing.
aram356
left a comment
There was a problem hiding this comment.
Summary
Docs-only completion of the GPT Runtime Diagnostics guide against the #997 behavior. Nearly every added claim verified exactly against source: token minting, format, and gating (publisher.rs), the six targeting keys, all four ts_console directives and cookie attributes, standalone caching and load order, all seven delivery states and badge labels (badges.ts), all eight attribution reasons and every retention constant (store.ts), the Ad Manager identifier normalization (observer.ts), and the Prebid-restores/adInit-clears context asymmetry. Two of the new statements do not match the store's actual behavior and should be corrected before merge; details in the inline comments.
Blocking
🔧 wrench
- Empty-render cycles can still export a delivery claim: the
creative_request_on_empty_cyclerow says the attempt was dropped "instead of claiming delivery", but the stamped selection/response timestamps survive an explicitly empty render and export astrusted_server_selected/trusted_server_response_sent(docs/guide/integrations/gpt-diagnostics.md:527) creative_attempt_unknowndescription incomplete: it also fires on a repeat creative markup request referencing a capacity-evicted attempt, not only on responses and failures (docs/guide/integrations/gpt-diagnostics.md:529)
Non-blocking
♻️ refactor
- State the 30-second bound on late delivery upgrades (docs/guide/integrations/gpt-diagnostics.md:514)
⛏ nitpick
- "one server-side effect" undercounts: module-route availability is also activation-independent (docs/guide/integrations/gpt-diagnostics.md:48)
cache_fetch_failedalso covers body-read failure after an OK status (docs/guide/integrations/gpt-diagnostics.md:229)
🏕 camp site
- Duplicate
w?/h?members inAuctionBidData:crates/trusted-server-js/lib/src/core/types.ts:91-100declares the winning creative width/height pairs twice. Pre-existing on main and outside this diff; worth a one-line cleanup in a follow-up.
CI Status
- GitHub checks: PASS (all 19, including format-docs, cargo fmt, clippy-equivalent analyze jobs, all adapter test suites, vitest, browser and parity integration tests)
- Local re-verification on the PR branch: docs format PASS, docs lint PASS, VitePress build PASS (anchors and links resolve)
An empty render evicts the creative attempt but leaves the selection and response timestamps on the cycle, so those cycles still export a delivery state. Qualify the creative_request_on_empty_cycle row, the not_applicable row, and the attribution-issue preamble to match. Also record that creative_attempt_unknown fires on a repeat markup request against a capacity-evicted attempt, bound late delivery upgrades to the 30-second attempt window, count module-route availability as a separate activation-independent effect, and note the body-read failure path in cache_fetch_failed.
|
All five inline items verified against source and addressed in 69b7d29. Both blocking items are fixed as behavior corrections, not just wording softeners — replies in each thread carry the trace. The first one leaked into two more places than the flagged row, so the On the 🏕 camp-site item: confirmed the duplicate Verification on the updated branch: |
ChristianPavilonis
left a comment
There was a problem hiding this comment.
Automated Review:
Review Summary
Reviewed the documentation-only changes at 69b7d29ed2d647a4c357bd137d32a349dee5f68a against the GPT Runtime Diagnostics implementation and the current PR feedback. No high-confidence correctness, security, compatibility, or documentation defect was identified.
Findings
P0 / Blockers
None.
P1 / High
None.
P2 / Medium
None.
P3 / Low
None.
CI / Existing Reviews
All reported required PR checks are passing, including format-docs. Local documentation formatting could not run because the documentation dependencies are not installed (prettier: not found). Existing inline review feedback was addressed in the current head; no additional inline comments are submitted.
Summary
hb_auction_idcorrelation token published intowindow.tsjs.bids, and the targeting boundary that keeps it out of the GAM ad request.Changes
docs/guide/integrations/gpt-diagnostics.mdadInitrefresh scoped context alongside Prebid's; three new troubleshooting entries for unattributed/competing refreshes,candidate_unconfirmeddelivery, and missing correlation evidence (all eight attribution reasons); exact?ts_console=1activation and?ts_console=0deactivation examplesdocs/guide/integrations/gpt.mddocs/guide/integrations-overview.mdCloses
Closes #1014
Test plan
cd docs && npm run formatcd docs && npm run lintcd docs && npm run build(VitePress build succeeds;#auction-correlation-tokenanchor and sidebar/integration links resolve in the built output)cargo fmt --all -- --checkcd crates/trusted-server-js/lib && npm run formatcargo test-fastly && cargo test-axum— not run: no Rust source changedcargo clippy-fastly && cargo clippy-axum— not run: no Rust source changedcd crates/trusted-server-js/lib && npx vitest run— not run: no JS source changedcrates/trusted-server-js/lib/src/core/types.tsand.../gpt_diagnostics/store.ts; token minting and gating againstcrates/trusted-server-core/src/publisher.rs; targeting keys againstcrates/trusted-server-js/lib/src/integrations/gpt/index.ts; badge labels against.../gpt_diagnostics/badges.ts; identifier caps against.../gpt_diagnostics/observer.tsChecklist
unwrap()in production code — useexpect("should ...")(documentation only; no code changed)tracingmacros (notprintln!) (documentation only; no code changed)publisher.example.comand a fictional token value