/report · demo-3 · baked output
Tax Calculation Rounding
Medium risk change in tax calculation rounding behavior
overall
MEDIUM
files
2
cross-svc
no
critical
0
high
0
medium
2
low
0
/a
changed symbols
services/billing/utils.ts
calculateTax function
− function calculateTax(amount: number): number
+ function calculateTax(amount: number): number
/b
impacts
| risk | file | line | symbol | reason | kind |
|---|---|---|---|---|---|
| MEDIUM | services/billing/checkout.ts | 18 | calculateTax | Rounding behavior changed - test assertions may need updates | direct |
| MEDIUM | services/billing/invoice.ts | 16 | calculateTax | Invoice totals now rounded - test assertions may need updates | direct |
/c
dependency graph
/d
suggested regression tests
demo-monorepo/tests/regression/cascade-tax-rounding.spec.ts// jest
describe('calculateTax rounding', () => {
it('should round to 2 decimal places', () => {
const result = calculateTax(100.00);
expect(result).toBe(8.00);
});
});demo-monorepo/tests/regression/cascade-tax-rounding.spec.ts// jest
describe('processCheckout with new rounding', () => {
it('should produce correctly rounded totals', async () => {
const validToken = 'valid.token.here';
const result = await processCheckout(validToken, 12.34);
expect(result.total).toBe(13.33);
});
});/e
missing coverage
- services/billing/utils.tscalculateTax should round to 2 decimal places
- services/billing/utils.tscalculateTax should handle floating-point precision correctly
- services/billing/checkout.tsprocessCheckout should produce correctly rounded totals
- services/billing/invoice.tsgenerateInvoice should produce correctly rounded totals