new-site/scripts/tests
justin 579919197d trucking: compute coupon discounted prices on the fly (true per A/B arm) + fix CTA URL bug
Two correctness fixes that gate enabling the coupon test:

1. On-the-fly pricing. The coupon block hardcoded '$79 $47' (only true at 40%
   off) — a false claim on the 20/30% arms. Now build_trucking_campaigns.py
   reads api/src/service-catalog.ts (same source checkout uses) and computes
   coupon_price_full / coupon_price_deal per recipient as full - round(full*pct/100),
   exactly matching the server. Service-fee-only; non-discountable services
   (boc3-filing passthrough) get NO price and fall back to percent-only copy.
   Quotes the service the email is ABOUT (mcs150 $79, reactivation $149), not the
   bundle the CTA happens to link to. service-catalog.ts now ships in the worker
   image; helper degrades to percent-only if it can't be read.

2. CTA URL bug (likely a big driver of the zero-click problem). Main campaign
   CTAs render '/order/slug&utm_source=...' (no '?') -> HTTP 404, verified live.
   Deficiency CTAs would double-'?' once a coupon added '?code='. lp_link now
   owns the query (?dot=...&code=...) so every template appends with a leading
   '&' and is valid in all 4 states (main/deficiency x coupon on/off), verified
   against live URLs returning 200.

Deficiency _deal_box now shows real was/now prices (percent-only for boc3).
Tests: 7/7 pass (adds URL-wellformed + price-matches-checkout cases).
2026-06-20 17:43:11 -05:00
..
providers Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
runs Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
screenshots Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
__init__.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
add_savings_table.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
ai_retry.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
block_bounced.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
check_campaign_segments.py Configure trucking deficiency campaign cron env 2026-06-03 23:04:41 -05:00
check_fulfillment_consistency.py test(fulfillment): consistency + intake-completeness checker 2026-06-02 03:29:53 -05:00
debug_submit.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
e2e_checkout.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
e2e_crtc_order.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
e2e_crtc_pipeline.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
e2e_crtc_pricing.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
e2e_crtc_provinces.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
e2e_fcc_compliance.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
e2e_full_order.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
e2e_full_pipeline.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
e2e_standard_delays.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
fix_chat_blocks.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
sa_coupon_test.py trucking: A/B/C coupon price test (20/30/40% off) + SpamAssassin harness 2026-06-20 16:41:47 -05:00
sa_coupon_test_local.py trucking: A/B/C coupon price test (20/30/40% off) + SpamAssassin harness 2026-06-20 16:41:47 -05:00
test_binder.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
test_cms10114.py healthcare: verify CMS-10114 update path, correct NPI Enumerator address, build CMS-10114 filler 2026-06-07 02:04:41 -05:00
test_coupon_ab.py trucking: compute coupon discounted prices on the fly (true per A/B arm) + fix CTA URL bug 2026-06-20 17:43:11 -05:00
test_cpni_calea_variants.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
test_data.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
test_dot_da_binder.py DOT D&A: instant PDF compliance-program binder (49) 2026-06-02 19:28:58 -05:00
test_form_499_initial_smoke.py Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
test_ink_signature.py Add portable Line-us pen-arm support to ink-signature pipeline 2026-06-07 03:45:46 -05:00
test_mcs150_signature_placement.py trucking: stamp e-signature exactly on form signature lines + state authorization gate 2026-06-02 16:44:19 -05:00
test_paper_batch.py healthcare: verify CMS-10114 update path, correct NPI Enumerator address, build CMS-10114 filler 2026-06-07 02:04:41 -05:00
test_signature_placement.py trucking: stamp e-signature exactly on form signature lines + state authorization gate 2026-06-02 16:44:19 -05:00