Skip to content

Add docs audit severities, CI report upload, and dead Pro-link cleanup#61

Open
justin808 wants to merge 1 commit intomainfrom
jg-codex/docs-audit-severity-and-ci
Open

Add docs audit severities, CI report upload, and dead Pro-link cleanup#61
justin808 wants to merge 1 commit intomainfrom
jg-codex/docs-audit-severity-and-ci

Conversation

@justin808
Copy link
Copy Markdown
Member

@justin808 justin808 commented Mar 26, 2026

Closes #12
Closes #13
Closes #59

Summary

  • rewrite scripts/audit-docs.mjs to support severity levels (error, warn, info)
  • ignore fenced code blocks for placeholder detection and narrow version-floor checks to React on Rails context
  • fail CI only on error-level audit findings, while uploading the report as an artifact and summarizing counts in the workflow summary
  • replace dead pro.reactonrails.com references with the canonical Pro docs destination in both prepared docs output and the site Pro page

Verification

  • npm run prepare && npm run audit:docs -- --output VALIDATION_REPORT_CI.md --fail-on error && npm run build
  • audit now reports Errors: 0 on the prepared docs set
  • Docusaurus still reports existing non-blocking broken link/anchor warnings from generated docs content, unchanged by this PR

Note

Medium Risk
Medium risk because it changes CI gating behavior and rewrites docs validation logic, which could introduce unexpected build failures or miss/over-report findings. No production runtime or security-sensitive code is modified.

Overview
Adds a severity-based docs audit (error/warn/info) that ignores fenced code blocks, narrows version-floor checks to React-on-Rails-context mentions, and produces richer report/summary counts with optional failure via --fail-on.

Updates the site build workflow to run this audit, upload the generated report as an artifact, append key metrics to the GitHub Actions step summary, and fail the job only when blocking (error-level) findings are present.

Cleans up dead pro.reactonrails.com links by rewriting them to the canonical Pro docs URL during docs preparation and by updating the Docusaurus Pro page CTA to point at /docs/pro.

Written by Cursor Bugbot for commit 7cfa4f7. This will update automatically on new commits. Configure here.

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 26, 2026

Warning

Rate limit exceeded

@justin808 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 8 minutes and 34 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: beb0317a-3189-4f4f-92e5-16964cd4619c

📥 Commits

Reviewing files that changed from the base of the PR and between b02fe8f and 7cfa4f7.

📒 Files selected for processing (4)
  • .github/workflows/site-build-deploy.yml
  • prototypes/docusaurus/src/pages/pro.tsx
  • scripts/audit-docs.mjs
  • scripts/prepare-docs.mjs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jg-codex/docs-audit-severity-and-ci

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

Cloudflare preview deployed.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Missing blank line between report header and body
    • Added an explicit newline between the joined header and body so the Markdown section heading is separated from the first page entry by a blank line.

Create PR

Or push these changes by commenting:

@cursor push 26ab85dc5e
Preview (26ab85dc5e)
diff --git a/scripts/audit-docs.mjs b/scripts/audit-docs.mjs
--- a/scripts/audit-docs.mjs
+++ b/scripts/audit-docs.mjs
@@ -309,7 +309,7 @@
     })
     .join("\n");
 
-  return `${header.join("\n")}${body}`;
+  return `${header.join("\n")}\n${body}`;
 }
 
 function shouldFailAudit(pages) {

.join("\n");

return `${summary.join("\n")}\n${body}`;
return `${header.join("\n")}${body}`;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing blank line between report header and body

Low Severity

The old buildReport used `${summary.join("\n")}\n${body}` which placed a blank line between the "## Page-by-page comments" heading and the first page entry. The new code uses `${header.join("\n")}${body}`, dropping the extra \n. Since the header array ends with "", join("\n") produces a trailing single newline, so the section heading runs directly into the first ### page entry with no separating blank line. This is a formatting regression in the generated Markdown report.

Fix in Cursor Fix in Web

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

Labels

None yet

Projects

None yet

1 participant