Muneerali199rakshak/demo-block-risky → main1 commits13d agoopen on GitHub
92
risk score
Do not deploy. Escalate to the on-call engineer and file a Jira blocker for the touched surface before any merge.
▸Risk score 92/100 is at incident level (recurring incidents on high-incident surface).
▸Escalating to incident queue; deployment is blocked immediately.
▸A blocker will be filed in Jira and an incident note posted to Notion.
How this change scores against your production history — 8 past incident(s) on the touched surface.
Subscriptions & Billing
21 changed lines in this PR
Checkout Flow
24 changed lines in this PR
Data Migrations
9 changed lines in this PR
Payments Gateway
18 changed lines in this PR
High-incident surface: 8 past incidents mapped to the touched modules.
Files touched by past incidents: Change edits 3 file(s) implicated in INC-288, INC-248, INC-231 — high regression risk in the exact failure surface.
AI reasoning layer · confidence HIGH · model Qwen/Qwen3-Next-80B-A3B-Thinking
This PR introduces multiple changes to billing and payment systems, including relaxing Stripe webhook signature checks, enabling coupon stacking without usage-cap validation, altering proration logic, and performing a large-scale data migration. These modifications directly impact critical systems like subscriptions, checkout, and payments, with risks of duplicate charges, incorrect billing, checkout failures, and database performance issues due to the untested 18M-row migration. The changes specifically target areas previously associated with high-severity incidents, such as proration errors, coupon race conditions, and webhook retry failures, while introducing new risks through untested migration logic and relaxed security checks.
Failure hypotheses
▸Relaxed Stripe signature check in src/payments/webhooks/stripe.ts could allow unauthorized requests to trigger duplicate charges (as in INC-231), affecting payment processing for 90% of checkout sessions.
▸Coupon stacking logic in src/checkout/coupons/apply.ts removes usage-cap validation, risking negative totals or coupon abuse similar to INC-248's race condition during checkout.
▸Proration changes in src/billing/proration/calculate.ts may miscalculate billing periods, causing double-billing incidents like INC-288 for users changing subscription plans.
▸18M-row orders_meta migration in src/db/migrations/0014_add_orders_meta.sql without tests risks database locks or timeouts, disrupting all services using order data.
Weighted from 9 evidence categories
What this change can reach
Modules affected
4
Subscriptions & Billing, Checkout Flow, Data Migrations, Payments Gateway
Services reached
6
billing, web, core, payments, worker, api
Estimated users exposed
90%
90% of checkout sessions
Changed files
5
72 lines of diff
Severity-weighted dependency graph · 90% of checkout sessions
Every point of the score is traceable to an observation
Traceability · No linked issue
lowNo Jira issue is referenced from the PR description.
Scope · Focused change set
low5 files changed — contained diff.
Test coverage · Tests included
low1 test file(s) included in the change.
Signal · High-risk intent keyword
highDescription contains "migration" — treat as elevated risk.
Blast radius · Wide service fan-out
highReaches 6 services: billing, web, core, payments, worker, api.
Incident history · Files touched by past incidents
highChange edits 3 file(s) implicated in INC-288, INC-248, INC-231 — high regression risk in the exact failure surface.
Test coverage · Low-coverage modules changed
highSubscriptions & Billing below 60% coverage.
Blast radius · Critical modules touched
highTouches Subscriptions & Billing, Checkout Flow, Data Migrations, Payments Gateway — 90% of checkout sessions.
Incident history · High-incident surface
critical8 past incidents mapped to the touched modules.
Schema · Database migration present
criticalSchema migration detected — irreversible once applied; requires phased rollout.
Coverage, incident history and change load per module
| Module | Service | Files | Δ lines | Coverage | Incidents | Severity |
|---|---|---|---|---|---|---|
Subscriptions & Billing billing | billing | 1 | 21 | 58% | 2 prior | critical |
Checkout Flow checkout | web | 2 | 24 | 71% | 2 prior | critical |
Payments Gateway payments | payments | 1 | 18 | 62% | 3 prior | critical |
Data Migrations data-migrations | core | 1 | 9 | — | 1 prior | high |
How Rakshak AI reached its decision
SWYTCHCODE_VERIFYSwytchcode CLI queried 3 open PR(s)
`swytchcode exec github.pull.get` returned 3 recent open PRs for Muneerali199/draftdeckai
GITHUB_INGESTPR #1471 ingested
5 files, 72 lines changed by Muneerali199 → main
JIRA_LINKNo linked issues
PR description references no Jira issue — traceability is weak.
NOTION_KNOWLEDGEProject knowledge loaded
0 architecture notes · 1 incident records · 12 prior release reports consulted.
IMPACT_MAPBlast radius mapped
Subscriptions & Billing (critical) · Checkout Flow (critical) · Data Migrations (high) · Payments Gateway (critical) — reaches 90% of checkout sessions.
AI_REASONAI layer: how Rakshak understands the change
This PR introduces multiple changes to billing and payment systems, including relaxing Stripe webhook signature checks, enabling coupon stacking without usage-cap validation, altering proration logic, and performing a large-scale data migration. These modifications directly impact critical systems like subscriptions, checkout, and payments, with risks of duplicate charges, incorrect billing, checkout failures, and database performance issues due to the untested 18M-row migration. The changes specifically target areas previously associated with high-severity incidents, such as proration errors, coupon race conditions, and webhook retry failures, while introducing new risks through untested migration logic and relaxed security checks. • INC-231 was directly caused by idempotency key handling issues during webhook retries; relaxing signature checks increases risk of malicious or duplicate requests. • INC-248 resulted from coupon engine race conditions; removing usage-cap validation could reintroduce similar issues during concurrent coupon applications. • INC-288 occurred due to proration window calculation errors; new period boundary logic may have off-by-one errors if not validated. • Backfilling 18M rows in a single transaction without tests is known to cause database performance issues, as large untested migrations often lead to locks or timeouts.
RISK_SCORERisk scored 92/100 — critical
Focused change set · 5 files changed — contained diff. — Critical modules touched · Touches Subscriptions & Billing, Checkout Flow, Data Migrations, Payments Gateway — 90% of checkout sessions. — Wide service fan-out · Reaches 6 services: billing, web, core, payments, worker, api. — High-incident surface · 8 past incidents mapped to the touched modules. — Files touched by past incidents · Change edits 3 file(s) implicated in INC-288, INC-248, INC-231 — high regression risk in the exact failure surface. — Low-coverage modules changed · Subscriptions & Billing below 60% coverage. — Tests included · 1 test file(s) included in the change. — Database migration present · Schema migration detected — irreversible once applied; requires phased rollout. — High-risk intent keyword · Description contains "migration" — treat as elevated risk.
DECISIONDecision: BLOCK
Risk score 92/100 is at incident level (recurring incidents on high-incident surface). Escalating to incident queue; deployment is blocked immediately. A blocker will be filed in Jira and an incident note posted to Notion.
5 files in the diff
Where this change is most likely to break
Subscriptions & Billing: 21 changed lines, 2 prior incident(s)
Checkout Flow: 24 changed lines, 2 prior incident(s)
Data Migrations: 9 changed lines, 1 prior incident(s)
Payments Gateway: 18 changed lines, 3 prior incident(s)
Migration lock / irreversible DDL on large tables
CVE lookup on changed dependencies via osv.dev
No known advisories on changed dependencies
Modules below the 60% test bar
Subscriptions & Billing (58% coverage)
Swytchcode orchestration run
rakshak pipeline · run #9
01okgithub.github.fetch_pr
02okjira.jira.search
03oknotion.notion.knowledge
04okswytchcode.blast-radius
05okswytchcode.osv.scan
06okswytchcode.llm.reason
07okswytchcode.risk-engine
08okswytchcode.decision-engine
— decided block
Analyzed Aug 9, 08:14 AM · updated 13d ago