feat(paid-keyword-optimizer): surface pageRecommendation at the opportunity level#2741
Open
markomako wants to merge 1 commit into
Open
feat(paid-keyword-optimizer): surface pageRecommendation at the opportunity level#2741markomako wants to merge 1 commit into
markomako wants to merge 1 commit into
Conversation
…tunity level mystique's ad-intent-gap crew now emits a strategist-reconciled, play-aware pageRecommendation block in the guidance SQS body (inferredPlay, primary + rankedActions with lever/alternatives). Surface it into the ad-intent-mismatch opportunity's data (alongside portfolioMetrics/resolvedPageHeading/pageTopics), nullish-coalesced to null so older mystique payloads and skipped/failed strategist passes degrade cleanly. Producer side: experience-platform/mystique PR #3111. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
Consumer side of the new ad-intent strategist output. mystique's
ad-intent-gapcrew now emits a strategist-reconciled, play-awarepageRecommendationblock in the guidance SQS body —inferredPlay,playConfidence, a lever-firstprimaryaction,rankedActions, andalternatives. This surfaces it at the opportunity level:mapToKeywordOptimizerOpportunitynow readsguidanceBody.pageRecommendationand includes it in thead-intent-mismatchopportunity'sdata(alongsideportfolioMetrics,resolvedPageHeading,pageTopics).Changes
src/paid-keyword-optimizer/guidance-opportunity-mapper.js— readpageRecommendation(nullish-coalesced tonull) and add it toopportunity.data; JSDoc updated.test/audits/paid-keyword-optimizer/opportunity-mapper.test.js— passthrough test (present) + default-to-null test (absent and explicitnull).Backward compatibility
Additive and null-safe: older mystique payloads (no
pageRecommendationkey) and skipped/failed strategist passes (pageRecommendation: null) both collapse tonullvia?? null— no consumer breakage. The opportunitydataobject is free-form JSON (no per-type schema), so no schema change is needed.guidance-opportunity-mapper.jsstays at 100% coverage (191 passing in the paid-keyword-optimizer suite).Producer side
experience-platform/mystique PR #3111 —
feat(ad-intent-gap): brand context + ad-copy/misaligned-spend signals + SEM-strategist page recommendation(https://git.corp.adobe.com/experience-platform/mystique/pull/3111). That PR adds thepageRecommendationfield to the emitted guidance body; this PR is what makes it visible on the opportunity. The SQS contract was verified compatible (no schema validation on the consumer path) before this change.🤖 Generated with Claude Code