Add trial promotion abuse guard#320
Open
katlark wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@algora-pbc /claim #20
Reviewer Path
trial-promotion-abuse-guard/requirements-map.mdfor issue coverage and scope boundaries.trial-promotion-abuse-guard/index.jsandtrial-promotion-abuse-guard/test.jsfor the guard logic and regression checks.trial-promotion-abuse-guard/reports/promotion-abuse-report.mdandtrial-promotion-abuse-guard/reports/demo.mp4for the short finance-review demo.Summary
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 checkcd trial-promotion-abuse-guard && npm testcd trial-promotion-abuse-guard && npm run demoffprobe -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.mp4git diff --checkDemo Artifacts
trial-promotion-abuse-guard/reports/demo.mp4- H.264, 960x540, 9 secondstrial-promotion-abuse-guard/reports/summary.pngtrial-promotion-abuse-guard/reports/summary.svgtrial-promotion-abuse-guard/reports/promotion-abuse-packet.jsontrial-promotion-abuse-guard/reports/promotion-abuse-report.md