Skip to content

Add trial promotion abuse guard#320

Open
katlark wants to merge 1 commit into
SCIBASE-AI:mainfrom
katlark:katlark/trial-promotion-abuse-guard
Open

Add trial promotion abuse guard#320
katlark wants to merge 1 commit into
SCIBASE-AI:mainfrom
katlark:katlark/trial-promotion-abuse-guard

Conversation

@katlark
Copy link
Copy Markdown

@katlark katlark commented May 21, 2026

@algora-pbc /claim #20

Reviewer Path

  • Start with trial-promotion-abuse-guard/requirements-map.md for issue coverage and scope boundaries.
  • Inspect trial-promotion-abuse-guard/index.js and trial-promotion-abuse-guard/test.js for the guard logic and regression checks.
  • Use trial-promotion-abuse-guard/reports/promotion-abuse-report.md and trial-promotion-abuse-guard/reports/demo.mp4 for the short finance-review demo.

Summary

  • Add a self-contained trial and promotion abuse guard for Revenue Infrastructure.
  • Detect repeat free-trial attempts by institution domain and payment fingerprint.
  • Reject disposable-domain trials before they enter subscription reporting.
  • Hold coupon stacks that exceed promotion policy or discount caps.
  • Hold consortium discounts unless active roster evidence is present.
  • Hold trial-to-paid conversions until payment verification is complete.
  • Emit deterministic JSON, Markdown, SVG, PNG, and H.264 MP4 reviewer artifacts from synthetic data.

Sponsor Outcome

The sponsor gets a narrow revenue-control slice for a concrete leakage path: trials and discounts are checked before invoice-facing revenue is released. Clean promotions are approved, risky promotions are held or rejected with reason codes, and finance can see the requested discount, approved discount, and prevented leakage in one review packet.

Scope Boundaries

This is not another generic billing ledger, usage meter, payment webhook validator, payment failover module, dispute guard, tax exemption gate, SLA credit module, royalty settlement, revenue forecast, FX reconciliation, procurement control, invoice acceptance gate, sanctions/export-control gate, consortium roster engine, plan-proration module, or compute idempotency meter.

This slice focuses specifically on the trial and promotion boundary before discounts become invoice-facing revenue.

Validation

  • cd trial-promotion-abuse-guard && npm run check
  • cd trial-promotion-abuse-guard && npm test
  • cd trial-promotion-abuse-guard && npm run demo
  • ffprobe -v error -show_entries format=duration,size -show_entries stream=codec_name,width,height -of default=noprint_wrappers=1 trial-promotion-abuse-guard/reports/demo.mp4
  • git diff --check

Demo Artifacts

  • trial-promotion-abuse-guard/reports/demo.mp4 - H.264, 960x540, 9 seconds
  • trial-promotion-abuse-guard/reports/summary.png
  • trial-promotion-abuse-guard/reports/summary.svg
  • trial-promotion-abuse-guard/reports/promotion-abuse-packet.json
  • trial-promotion-abuse-guard/reports/promotion-abuse-report.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant