Skip to content

docs(scripts): add scripts/README.md cataloguing every npm script - #230

Open
nastaso wants to merge 1 commit into
mainfrom
docs/scripts-readme
Open

docs(scripts): add scripts/README.md cataloguing every npm script#230
nastaso wants to merge 1 commit into
mainfrom
docs/scripts-readme

Conversation

@nastaso

@nastaso nastaso commented Aug 5, 2026

Copy link
Copy Markdown
Owner

What does this PR do?

Closes #196. Adds scripts/README.md: every scripts/*.mjs file (24 total), grouped by purpose (question bank, SEO/asset generation, build guards, CSP/headers, indexing/monitoring, one-off maintenance), mapping npm-script name -> file -> one-line description, plus a short note on the two committed baseline JSON files those scripts read.

Descriptions are checked against each script's actual body (not just its header comment or filename) - generated from reading all 24 files in full, cross-checked against package.json's script list and the three GitHub workflow files that invoke a few scripts directly (no npm-script wrapper): monitor-sitemap.mjs/monitor-stats-rpc.mjs via monitor-production.yml, ping-indexnow.mjs via indexnow.yml. Two scripts (cleanup-orphaned-attempts.mjs, verify-delete-cascade.mjs) have no npm-script or CI wiring at all - confirmed by grep, documented as owner-run manual tools.

A finding along the way, flagged not fixed

Codex's audit (spot-checking 3 random table rows against the real source, lens: does the description match the code, not just the filename/comment) turned up a real gap in verify-delete-cascade.mjs itself, independent of this documentation: its "other user's rows are UNCHANGED" check only fails on a count decrease, not an increase, and per-table seed failures are non-fatal by design - so a table whose seed insert silently failed would report 0 before and after and pass as "unchanged" without ever actually being exercised. I verified this myself by reading the exact lines. This is a gap in the verification script's own rigor, not something this PR should fix (out of scope for a docs-only change, and it's a security/data-integrity-adjacent script I have no mandate to touch here) - left a NEEDS-ALEX note directly on that table row with the exact line numbers so it doesn't get lost.

Testing

  • npm run build: stays green (this file is documentation only, not wired into any build step).
  • Every file the table names verified to exist under scripts/ via test -f, both directions (every real file covered, every named file real).
  • Every npm-script name the table cites verified to exist in package.json via grep.

Checklist

  • npm run build stays green
  • Every file named exists under scripts/, mechanically verified
  • Every npm-script name named exists in package.json, mechanically verified
  • No production code changed

Groups all 24 scripts/*.mjs by purpose (question bank, SEO/asset
generation, build guards, CSP/headers, indexing/monitoring, one-off
maintenance), mapping each npm-script name -> file -> description.
Descriptions checked against each script's actual body, not just its
header comment or filename.

Closes #196.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying cloudcertprep with  Cloudflare Pages  Cloudflare Pages

Latest commit: 84975eb
Status: ✅  Deploy successful!
Preview URL: https://e412f924.cloudcertprep.pages.dev
Branch Preview URL: https://docs-scripts-readme.cloudcertprep.pages.dev

View logs

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.

docs(scripts): add scripts/README.md cataloguing every npm script

1 participant