fix(semantic-value-visibility): use CODE_CHANGE as suggestion type#2481
Merged
yevheniia-severinovska merged 1 commit intomainfrom May 6, 2026
Merged
fix(semantic-value-visibility): use CODE_CHANGE as suggestion type#2481yevheniia-severinovska merged 1 commit intomainfrom
yevheniia-severinovska merged 1 commit intomainfrom
Conversation
The guidance handler set `type: 'SUGGESTION_CODE'`, which is not a valid suggestion type. Valid values: CODE_CHANGE, CONTENT_UPDATE, REDIRECT_UPDATE, METADATA_UPDATE, AI_INSIGHTS, CONFIG_UPDATE. Result on PROD: opportunity is created but all Mystique-returned suggestions fail to persist with `ValidationError2: type is invalid`. Replace with `CODE_CHANGE` — matches the pattern used by other Tokowaka HTML-injection handlers (summarization, toc, headings, hreflang, canonical, csp, structured-data). Image-enrichment generates `<section data-llm-shadow>` HTML, same shape as those handlers. Discovered during prod debugging session with Daniel.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
danieljchuser
approved these changes
May 6, 2026
solaris007
pushed a commit
that referenced
this pull request
May 6, 2026
## [1.432.2](v1.432.1...v1.432.2) (2026-05-06) ### Bug Fixes * **semantic-value-visibility:** use CODE_CHANGE as suggestion type ([#2481](#2481)) ([b99830b](b99830b))
Member
|
🎉 This PR is included in version 1.432.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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
Fixes
ValidationError2: type is invalidon PROD: the guidance handler settype: 'SUGGESTION_CODE', which is not in the suggestion type enum. As a result, opportunities are created but all Mystique-returned suggestions fail to persist.Discovered during a prod debugging session with Daniel.
Fix
Replace
'SUGGESTION_CODE'with'CODE_CHANGE'— matches the pattern used by other Tokowaka HTML-injection handlers:src/summarization/guidance-handler.js:52src/toc/handler.js:454src/headings/handler.js:545src/hreflang/handler.js:293src/canonical/handler.js:675src/csp/csp.js:196src/structured-data/handler.js:133Image-enrichment generates
<section data-llm-shadow>...HTML, same shape as those handlers.CONTENT_UPDATE(used byfaqs,wikipedia-analysis) is for text/copy rewrites and does not fit HTML injection.Files changed
src/semantic-value-visibility/guidance-handler.js:110test/audits/semantic-value-visibility/guidance-handler.test.js:187Test plan
npx mocha test/audits/semantic-value-visibility/guidance-handler.test.jspasses (11 tests)type: 'CODE_CHANGE'Related
src/image-enrichment/guidance-handler.js.🤖 Generated with Claude Code