test(public): regression-guard every public/*.html page against editorial / submission-prep voice - #206
test(public): regression-guard every public/*.html page against editorial / submission-prep voice#206nish3451 wants to merge 24 commits into
Conversation
…rial / submission-prep voice The item '[unreviewed-by-opus] Internal editorial and submission-prep notes are live as visible copy on four public app pages' (item id de469a3800) was closed on main by PR #186 (commit 2dc939f → merge cc7ce14) on 2026-08-17. Both the local main (HEAD e18c176) and the live tinystudio.in deploy carry only visitor-facing copy on the four named app pages and on every other public page. This branch adds an explicit whole-tree CI guard so a reintroduction on any other public page (home, 404, terms, privacy hub, privacy-choices, support, contact, per-app support pages) fails straight away instead of being silently missed: - scripts/test-public-no-editorial-or-submission-prep-copy.mjs walks public/, asserts the page set is intact (13 known pages expected), forbids 34 case-insensitive fragments spanning the full editorial/submission voice that has ever leaked before ('launch', 'submission', 'reviewer', 'staging', 'app store connect', 'app store metadata', 'where to go next', 'current build', 'in the meantime', 'should be updated before', 'before that version is submitted', 'getting ready', ...), and asserts the test is wired into both npm test and npm run ci. - package.json: insert the new test right after test-public-brand-tagline in both scripts.test and scripts.ci. Pre-existing narrower tests (test-public-app-copy-voice for the 4 named pages, test-public-support-contact-voice for support/contact) remain in place as per-area coverage; this one extends the constraint to every other public page. Validation: - node scripts/test-public-no-editorial-or-submission-prep-copy.mjs: 458 checks, 0 failures - node scripts/test-public-app-copy-voice.mjs: 62 checks, 0 failures - node scripts/test-public-support-contact-voice.mjs: 42 checks, 0 failures - node scripts/test-public-meta-descriptions.mjs: 98 checks, 0 failures - node scripts/test-public-footer-copy.mjs: 146 checks, 0 failures - git diff --check: clean - Live tinystudio.in family sweep: 0 hits for any tracked fragment Lane report: .lane/reports/fix-lane1-reaffirm-no-editorial-copy-on-public.md
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe change adds a whole-tree regression test for forbidden editorial and submission-preparation copy on public HTML pages. It verifies page coverage, scans page content, wires the test into ChangesPublic Copy Regression Guard
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This change adds CI checks to prevent editorial or submission-preparation copy from returning to public pages; no actionable merge-blocking risk remains beyond normal checks and review. Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
| } | ||
|
|
||
| console.log("C. npm test/ci wiring") | ||
| const pkg = JSON.parse(read("package.json")) |
There was a problem hiding this comment.
Working-directory-sensitive manifest lookup
Direct invocation outside the repository root scans the intended public tree but resolves package.json from the caller's working directory, producing an ENOENT exception or wiring results from an unrelated manifest.
| const pkg = JSON.parse(read("package.json")) | |
| const pkg = JSON.parse(read(join(ROOT, "package.json"))) |
Prompt To Fix With AI
This is a comment left during a code review.
Path: scripts/test-public-no-editorial-or-submission-prep-copy.mjs
Line: 138
Comment:
**Working-directory-sensitive manifest lookup**
Direct invocation outside the repository root scans the intended public tree but resolves `package.json` from the caller's working directory, producing an `ENOENT` exception or wiring results from an unrelated manifest.
```suggestion
const pkg = JSON.parse(read(join(ROOT, "package.json")))
```
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| "app store connect", | ||
| "appstoreconnect", | ||
| "submission", | ||
| "submitted", | ||
| "submitting", | ||
| "reviewer", |
There was a problem hiding this comment.
Common words trigger the guard
The site-wide, case-insensitive substring checks classify ordinary visitor-facing words such as submission, submitted, reviewer, and staging as editorial voice, so valid policy, support, or product copy using those terms fails npm test and CI.
Prompt To Fix With AI
This is a comment left during a code review.
Path: scripts/test-public-no-editorial-or-submission-prep-copy.mjs
Line: 69-74
Comment:
**Common words trigger the guard**
The site-wide, case-insensitive substring checks classify ordinary visitor-facing words such as `submission`, `submitted`, `reviewer`, and `staging` as editorial voice, so valid policy, support, or product copy using those terms fails `npm test` and CI.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Closes (lane) item
[unreviewed-by-opus] Internal editorial and submission-prep notes are live as visible copy on four public app pages(item idde469a3800).What was live
The four named app pages —
public/drishti/index.html,public/drishti/privacy/index.html,public/promptly/index.html,public/promptly/privacy/index.html— and every other public HTML page already carry only visitor-facing copy one18c176(origin/main).The original editorial / submission-prep rewrite landed on main via PR #186 (
fix/lane1-submission-prep-notes-visible-copy, commit2dc939f4→ mergecc7ce142) on 2026-08-17 and the livetinystudio.indeploy is now healthy again (PRs #198/#199/#200 unblocked Cloudflare Pages).What this branch adds
A whole-tree CI guard so a reintroduction of any of the editorial / submission-prep voice on any public page fails CI instead of being silently missed:
scripts/test-public-no-editorial-or-submission-prep-copy.mjs— walkspublic/, asserts the page set is intact (13 known pages expected), and forbids 34 case-insensitive fragments spanning the full voice that has ever leaked before:launch,release,submission,reviewer,staging,app store connect/appstoreconnect,app store metadata,where to go next,current build,in the meantime,should be updated before,before that version is submitted,getting ready, etc. Also asserts the test is wired intonpm testandnpm run ci.package.json— inserts the new test right aftertest-public-brand-taglinein bothscripts.testandscripts.ci.The two pre-existing narrower guards remain in place:
scripts/test-public-app-copy-voice.mjs— 4 pages, 13 fragments (PR fix(public): remove internal editorial and submission-prep copy from the four app pages #28 / fix(public): replace internal submission-prep notes visible on four pages #186 coverage).scripts/test-public-support-contact-voice.mjs— 2 pages, 13 fragments (PR fix(public): replace App Store Connect submission voice on the studio support and contact pages #31 coverage).Verification
node scripts/test-public-no-editorial-or-submission-prep-copy.mjs→ 458 checks, 0 failuresnode scripts/test-public-app-copy-voice.mjs→ 62 checks, 0 failuresnode scripts/test-public-support-contact-voice.mjs→ 42 checks, 0 failuresnode scripts/test-public-meta-descriptions.mjs→ 98 checks, 0 failuresnode scripts/test-public-footer-copy.mjs→ 146 checks, 0 failuresgit diff --check→ cleanhttps://tinystudio.in/family (13 URLs) sweep → 0 hits for any tracked editorial / submission-prep fragmentLane report
.lane/reports/fix-lane1-reaffirm-no-editorial-copy-on-public.mdSummary by CodeRabbit
Bug Fixes
Tests
Greptile Summary
The PR adds a whole-tree regression test intended to keep internal editorial and submission-preparation language out of public HTML pages.
Confidence Score: 3/5
The PR does not appear safe to merge until the guard stops rejecting legitimate visitor-facing vocabulary and resolves its manifest independently of the caller’s working directory.
The current guard still performs context-free whole-document matches for generic words such as “submission” and “staging,” so valid copy can fail the required test and CI workflows; its package.json self-check also remains dependent on process.cwd(), making direct invocation outside the repository root fail or inspect the wrong manifest.
Files Needing Attention: scripts/test-public-no-editorial-or-submission-prep-copy.mjs
Important Files Changed
Reviews (2): Last reviewed commit: "Merge branch 'main' into fix/lane1-reaff..." | Re-trigger Greptile