Skip to content

ci: build the PWA plugin in FIPS mode, to reproduce its empty precache - #13020

Merged
slorber merged 1 commit into
mainfrom
claude/pwa-fips-repro
Nov 12, 2026
Merged

slorber merged 1 commit into
mainfrom
claude/pwa-fips-repro

Conversation

@slorber

@slorber slorber commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

Reproduces a bug of @docusaurus/plugin-pwa in FIPS mode (#10963), fixed by #13012 stacked on top. The Build FIPS check of this PR is expected to fail.

In FIPS mode, Node.js rejects MD5. The PWA plugin calls Workbox to list the files that the service worker precaches for offline mode, and Workbox hashes each file with MD5 (hardcoded, no option to change it: GoogleChrome/workbox#3366).

Workbox doesn't fail: it catches the error, returns it as a warning that the plugin ignores, and writes an empty list. The site builds successfully, but offline mode silently precaches nothing.

This PR adds the PWA plugin to the Build FIPS test site, and a step checking that the built sw.js precaches files. A successful build isn't enough to catch this bug.

Test Plan

The new Check the PWA precache manifest step of the Build FIPS workflow should fail with The service worker precaches no file.

Test links

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

Related issues/PRs

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • The FIPS build now checks that the generated service worker contains 64-character hexadecimal revision identifiers and fails if none are found, making missing revision data visible in the build result.
    • The generated test site now includes progressive web app support, using a plugin version that matches the site’s Docusaurus core version. This ensures the test site’s build configuration includes the PWA plugin.

@slorber
slorber requested a review from Josh-Cena as a code owner November 12, 2026 18:00
@slorber slorber added the pr: maintenance This PR does not produce any behavior differences to end users when upgrading. label Nov 12, 2026
@meta-cla meta-cla Bot added the CLA Signed Signed Facebook CLA label Nov 12, 2026
@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The FIPS build workflow adds the PWA plugin to its generated test site. After the build, it counts 64-character hexadecimal revision values in the generated service worker and fails if none are found.

Changes: FIPS PWA precache verification

Layer / File(s) Summary
Configure and verify PWA build
.github/workflows/build-fips.yml
The workflow installs @docusaurus/plugin-pwa at the generated project's @docusaurus/core version and configures the site to load the plugin. After the build, it counts matching revision values in build/sw.js and fails if the count is zero.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Possibly related PRs

Merge Risk: Minimal · up to 72fdb

This PR only changes a CI workflow to reproduce a known FIPS-mode problem in the PWA plugin. It does not affect shipped behavior. The Build FIPS check is expected to fail until the stacked fix lands.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: building the PWA plugin in FIPS mode to reproduce the empty precache. The raw summary confirms the workflow adds @docusaurus/plugin-pwa to the FIPS test site and check…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: building the PWA plugin in FIPS mode to reproduce the empty precache. The raw summary confirms the workflow adds @docusaurus/plugin-pwa to the FIPS test site and checks sw.js for 64-character hex revisions. The objectives say the PR reproduces the MD5/FIPS precache issue (#10963), which the title matches. The title is specific and uses the conventional 'ci:' prefix, so it passes.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • 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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 18051695-4013-4903-af84-3aa16f1f1401
Commits

Reviewing files that changed from the base of the PR and between d20956b and 72fdbb3.

Files selected for processing: 1

  • .github/workflows/build-fips.yml

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

@netlify

netlify Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

✅ [V2]

Name Link
🔨 Latest commit 72fdbb3
🔍 Latest deploy log https://app.netlify.com/projects/docusaurus-2/deploys/6af6364ec35bd14f5c2e7ead
😎 Deploy Preview https://deploy-preview-13020--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.

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO Report
/ 🟠 77 🟢 98 🟢 100 🟢 100 Report
/docs/installation 🟠 60 🟢 97 🟢 100 🟢 100 Report
/docs/category/getting-started 🟠 74 🟢 100 🟢 100 🟠 86 Report
/blog 🟠 70 🟢 96 🟢 100 🟠 86 Report
/blog/preparing-your-site-for-docusaurus-v3 🟠 72 🟢 92 🟢 100 🟢 100 Report
/blog/tags/release 🟠 71 🟢 96 🟢 100 🟠 86 Report
/blog/tags 🟠 74 🟢 100 🟢 100 🟠 86 Report

Workbox hashes the precached files with MD5. In FIPS mode, it doesn't
fail the build: it only warns, and the service worker precaches nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@slorber
slorber force-pushed the claude/pwa-fips-repro branch from d20956b to 72fdbb3 Compare November 12, 2026 21:57
@slorber
slorber merged commit 1afe748 into main Nov 12, 2026
20 of 21 checks passed
@slorber
slorber deleted the claude/pwa-fips-repro branch November 12, 2026 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Signed Facebook CLA pr: maintenance This PR does not produce any behavior differences to end users when upgrading.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant