Skip to content

test(public): regression-guard every public/*.html page against editorial / submission-prep voice - #206

Open
nish3451 wants to merge 24 commits into
mainfrom
fix/lane1-reaffirm-no-editorial-copy-on-public
Open

test(public): regression-guard every public/*.html page against editorial / submission-prep voice#206
nish3451 wants to merge 24 commits into
mainfrom
fix/lane1-reaffirm-no-editorial-copy-on-public

Conversation

@nish3451

@nish3451 nish3451 commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Closes (lane) item [unreviewed-by-opus] Internal editorial and submission-prep notes are live as visible copy on four public app pages (item id de469a3800).

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 on e18c176 (origin/main).

The original editorial / submission-prep rewrite landed on main via PR #186 (fix/lane1-submission-prep-notes-visible-copy, commit 2dc939f4 → merge cc7ce142) on 2026-08-17 and the live tinystudio.in deploy 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 — walks public/, 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 into npm test and npm run ci.
  • package.json — inserts the new test right after test-public-brand-tagline in both scripts.test and scripts.ci.

The two pre-existing narrower guards remain in place:

Verification

  • 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 https://tinystudio.in/ family (13 URLs) sweep → 0 hits for any tracked editorial / submission-prep fragment

Lane report

.lane/reports/fix-lane1-reaffirm-no-editorial-copy-on-public.md

Summary by CodeRabbit

  • Bug Fixes

    • Added automated checks to ensure public pages do not display editorial or submission-preparation text.
    • Expanded coverage across all public HTML pages, with clear failures when prohibited content is detected.
  • Tests

    • Integrated the public-content validation into standard test and CI workflows.
    • Added checks confirming expected public pages are present and accounted for.

Greptile Summary

The PR adds a whole-tree regression test intended to keep internal editorial and submission-preparation language out of public HTML pages.

  • Enumerates the expected public-page set and scans every discovered HTML document.
  • Wires the new guard into both the standard test and CI command chains.
  • Documents the prior production-copy remediation and its verification.

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

Filename Overview
scripts/test-public-no-editorial-or-submission-prep-copy.mjs Adds the public-copy regression guard, but the two previously reported defects remain in the current implementation.
package.json Adds the new guard to both test and CI command chains.
.lane/reports/fix-lane1-reaffirm-no-editorial-copy-on-public.md Records the remediation history, expanded regression coverage, and validation results.

Reviews (2): Last reviewed commit: "Merge branch 'main' into fix/lane1-reaff..." | Re-trigger Greptile

…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
@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.

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Review Change Stack

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Free

Run ID: 82542b81-5f36-45da-93bd-0d142820f2c0

📥 Commits

Reviewing files that changed from the base of the PR and between e18c176 and d51c6ba.

📒 Files selected for processing (3)
  • .lane/reports/fix-lane1-reaffirm-no-editorial-copy-on-public.md
  • package.json
  • scripts/test-public-no-editorial-or-submission-prep-copy.mjs

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The 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 npm test and CI, and records validation results.

Changes

Public Copy Regression Guard

Layer / File(s) Summary
Public HTML scanning and validation
scripts/test-public-no-editorial-or-submission-prep-copy.mjs
The script recursively discovers public HTML pages, checks expected page coverage, scans all content including metadata and JSON-LD for 34 forbidden fragments, and reports failures.
Test and CI integration
package.json, scripts/test-public-no-editorial-or-submission-prep-copy.mjs, .lane/reports/fix-lane1-reaffirm-no-editorial-copy-on-public.md
The check runs in npm test and npm run ci. The report records the regression guard, wiring, and validation results.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to d51c6

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 Free

Your 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 @coderabbitai help to get the list of available commands.

}

console.log("C. npm test/ci wiring")
const pkg = JSON.parse(read("package.json"))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 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.

Suggested change
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.

Fix in Claude Code Fix in Codex Fix in Cursor

Comment on lines +69 to +74
"app store connect",
"appstoreconnect",
"submission",
"submitted",
"submitting",
"reviewer",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 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.

Fix in Claude Code Fix in Codex Fix in Cursor

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.

1 participant