Skip to content

test(blog): normalize feed tree filenames in snapshots (AI-assisted) - #12937

Draft
haranishi wants to merge 1 commit into
meta:mainfrom
haranishi:test/feed-tree-unicode
Draft

haranishi wants to merge 1 commit into
meta:mainfrom
haranishi:test/feed-tree-unicode

Conversation

@haranishi

@haranishi haranishi commented Nov 10, 2026 •

Copy link
Copy Markdown

Pre-flight checklist

  • The Contributing Guidelines on pull requests were checked during preparation.
  • If this is a code change: existing tests verify the behavior before and after the change.
  • New API or substantial change: not applicable; test assertions only.

Motivation

Six existing blog feed tests fail on an HFS+ checkout because directory entries for héllô use decomposed Unicode, while their tree snapshots use the canonically equivalent composed spelling. Atom, RSS and JSON each fail both tree assertions.

Normalize the two directory-tree strings to NFC before comparing them. This changes only filesystem spelling in those assertions. Stored snapshots, fixtures, feed output, write-call assertions and production code are untouched. No tests are skipped or disabled, and normalization is not applied globally.

Test Plan

Tested on macOS with an HFS+ checkout, Node.js 26.13.0 and pnpm 12.3.4 against upstream c00f04e2376e057090d65d6bfb6a82d49ea3eca6.

  • Before the change, pnpm test packages/docusaurus-plugin-content-blog/src/__tests__/feed.test.ts: 16 passed, 6 failed; the six tree diffs contain only the composed/decomposed filename spelling.
  • After the change, the same command: 22 passed, 0 failed.
  • Removing normalization restores the same 6 failures. Restoring it passes all 22 tests.
  • pnpm test: 3,228 passed, 0 failed, across all 205 test files.
  • pnpm build:packages: passes (36 packages).
  • pnpm typecheck:tests: passes.
  • pnpm --filter website typecheck: passes.
  • pnpm lint: passes, with existing warnings and no errors.

Combined locally with the independent dev-server typing and bundler-error-source fixes: 3,237 tests passed, as did builds, typechecks and lint. Other operating systems and upstream PR CI have not been run.

Test links

Deploy preview: https://deploy-preview-12937--docusaurus-2.netlify.app/.

No UI changes. The affected assertions are in packages/docusaurus-plugin-content-blog/src/__tests__/feed.test.ts.

Related issues/PRs

#12555 changed feed URL encoding, and #12693 changed Argos feed text snapshots. This patch affects neither; it only makes the unit tests' filesystem tree comparisons tolerate canonical Unicode normalization.

AI assistance: this patch and draft description were prepared with Codex. Validation was run locally with Codex (AI-assisted); no independent human review is claimed.

@coderabbitai

coderabbitai Bot commented Nov 10, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@meta-cla

meta-cla Bot commented Nov 10, 2026

Copy link
Copy Markdown

Hi @haranishi!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@netlify

netlify Bot commented Nov 10, 2026

Copy link
Copy Markdown

✅ [V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit 958cb41
🔍 Latest deploy log https://app.netlify.com/projects/docusaurus-2/deploys/6af291e2b0f4cfc554405df4
😎 Deploy Preview https://deploy-preview-12937--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@meta-cla

meta-cla Bot commented Nov 10, 2026

Copy link
Copy Markdown

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Signed Facebook CLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant