Skip to content

test: lock in 7-day free trial copy (closes #2290)#2354

Merged
vivekchand merged 1 commit into
mainfrom
fix/gh-clawmetry-2290-trial-7days
May 30, 2026
Merged

test: lock in 7-day free trial copy (closes #2290)#2354
vivekchand merged 1 commit into
mainfrom
fix/gh-clawmetry-2290-trial-7days

Conversation

@vivekchand
Copy link
Copy Markdown
Owner

Closes #2290.

What

Adds a regression test that locks in the 7-day free trial copy across user-facing surfaces. The 14→7 migration is already complete in code (PRD matrix, paywall modal, dashboard.py gate copy, alerts/approvals/notifications templates). This PR adds the guard so a future copy-paste from old marketing material can't quietly reintroduce "14-day" trial language.

How

tests/test_trial_copy_consistency.py scans the user-facing files (PRD.md, dashboard.py, clawmetry/sync.py, clawmetry/templates/partials/paywall_modal.html, clawmetry/templates/tabs/{alerts,approvals,notifications}.html) and asserts four invariants:

  1. No "14 day" / "14-day" appears within 80 chars of "trial" in any user-facing surface (tests/, CHANGELOG, etc. are excluded — they can legitimately reference history).
  2. The PRD pricing matrix line for Trial lists 7 days.
  3. The paywall modal CTA reads "7-day free trial".
  4. dashboard.py mentions "7-day free trial" in ≥ 2 places (Pro-gate error + cloud upgrade link).

Verified the regression catches real flips

$ sed -i 's/\*\*7 days\*\*/\*\*14 days\*\*/' PRD.md
$ pytest tests/test_trial_copy_consistency.py::test_no_14_day_trial_copy_in_user_facing_files
FAILED — Found '14-day' near 'trial' (issue #2290):
  PRD.md:34 -> '... | **Trial** | — | **14 days**, all Pro feature...'

Acceptance criteria from #2290

  • grep -rIn "14[- ]day" returns zero hits in trial contexts (only 14-day token-usage chart references remain — unrelated)
  • grep -rIn "7[- ]day" covers all trial mentions
  • PRD matrix reflects 7-day trial
  • Cross-references companion cloud issue (link to follow) — vivekchand/clawmetry-cloud#1210 tracks the cloud-side TRIAL_DAYS + Stripe trial_period_days flip

Test plan

  • pytest tests/test_trial_copy_consistency.py -v → 4 passed
  • Flip PRD back to "14 days" → test fails with the offending file:line pinpointed

#2290)

Pre-fix: trial copy had drifted from 14 days to 7 days across PRD.md,
dashboard.py, the paywall modal, and the alerts/approvals/notifications
templates. Manual grep confirmed the migration was complete, but nothing
prevents a future copy-paste from old marketing material from quietly
reintroducing "14-day" trial language.

This adds a small regression test that scans the user-facing surfaces
and asserts:
  - No "14 day" / "14-day" appears within 80 chars of "trial"
  - PRD pricing matrix lists Trial as 7 days
  - Paywall modal CTA says "7-day free trial"
  - dashboard.py has ≥2 mentions of "7-day free trial" (gate error + cloud link)

Verified the regression catches a real flip: swapping the PRD line back
to "14 days" makes test_no_14_day_trial_copy_in_user_facing_files fail
with the offending file:line pinpointed.

Closes #2290.
@vivekchand vivekchand merged commit 1ede587 into main May 30, 2026
17 checks passed
@vivekchand vivekchand deleted the fix/gh-clawmetry-2290-trial-7days branch May 30, 2026 11:04
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.

Reduce free trial from 14 days to 7 days (code + copy + PRD)

1 participant