Skip to content

test(seo): verify article hreflang parity for bilingual releases#1507

Merged
fermatmind merged 2 commits into
mainfrom
codex/article-hreflang-parity-verifier
Jul 1, 2026
Merged

test(seo): verify article hreflang parity for bilingual releases#1507
fermatmind merged 2 commits into
mainfrom
codex/article-hreflang-parity-verifier

Conversation

@fermatmind

Copy link
Copy Markdown
Owner

What changed

  • Added --expect-hreflang=en=<url>,zh-CN=<url>,x-default=<url> to the public article release verifier.
  • Added exact hreflang cluster validation for missing, mismatched, duplicate, and unexpected alternate links.
  • Extended the public article release smoke contract to cover bilingual hreflang pass/fail cases while preserving the existing no-hreflang hold check.

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.ts attempted; blocked by pnpm ignored-builds install gate.
  • pnpm exec vitest run tests/contracts/article-personality-jsonld-projection-gates.contract.test.ts attempted; 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 --noEmit
  • git diff --check

Intentionally deferred

  • No CMS content changes.
  • No schema or hreflang enablement.
  • No URL Truth, Search Channel, GSC, revalidation, or deploy.

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +75 to +76
if (!value || value === true) {
return {};

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@fermatmind fermatmind merged commit 82954a7 into main Jul 1, 2026
6 checks passed
@fermatmind fermatmind deleted the codex/article-hreflang-parity-verifier branch July 1, 2026 04:39
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.

1 participant