test(seo): verify article hreflang parity for bilingual releases#1507
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 97b7f1195d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (!value || value === true) { | ||
| return {}; |
There was a problem hiding this comment.
Require values for --expect-hreflang
When an operator passes --expect-hreflang without a value, or with an empty value, this returns {} and expectedHreflangEntries() skips the check entirely, so the release verifier can pass an article that has no alternate links even though the expectation flag was supplied. Unlike --expect-title/--expect-canonical, there is no boolean/default cluster for hreflang, so this should fail fast instead of silently disabling the new closeout gate.
Useful? React with 👍 / 👎.
What changed
--expect-hreflang=en=<url>,zh-CN=<url>,x-default=<url>to the public article release verifier.Why
Daily bilingual article releases need a precise public closeout check once hreflang gates are enabled, without weakening the existing hold-mode verifier.
Validation
pnpm exec vitest run tests/contracts/public-article-release-smoke.contract.test.tsattempted; blocked by pnpm ignored-builds install gate.pnpm exec vitest run tests/contracts/article-personality-jsonld-projection-gates.contract.test.tsattempted; blocked by pnpm ignored-builds install gate../node_modules/.bin/vitest run tests/contracts/public-article-release-smoke.contract.test.ts./node_modules/.bin/vitest run tests/contracts/article-personality-jsonld-projection-gates.contract.test.ts./node_modules/.bin/tsc --noEmitgit diff --checkIntentionally deferred
Repository rule impact
This changes the article SEO verification tool only. CMS/backend remains the authority for article content and hreflang gate state; no frontend editorial fallback is introduced.