Skip to content

Turn on the new discount engine - #20

Draft
agoldis wants to merge 2 commits into
demo/checkout-triagefrom
demo/checkout-triage-discount-engine
Draft

agoldis wants to merge 2 commits into
demo/checkout-triagefrom
demo/checkout-triage-discount-engine

Conversation

@agoldis

@agoldis agoldis commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Sets newDiscountEngine to true in evidence-sharing/checkout-triage/flags.json, so discount codes go through the new resolver.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018KVkH9Ei4iCN2WvGMAUT1d
@agoldis

agoldis commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

SAVE10 fails on this branch. With newDiscountEngine on, ApplyDiscount takes the discount off twice: the total is $183.60, not $206.55.

Failing test, animated

Filmstrip of the failing test

Page at the failing step

Share link, 7 days

🤖 Generated with Claude Code

@agoldis

agoldis commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

Fixed in abd6f49: the new discount engine takes the discount off once. SAVE10 passes on the run with the fix.

ApplyDiscount response for {"code":"save10"}, from each run's trace (amounts in cents):

Response
Before {"discount":2295,"total":18360} response · trace
After {"discount":2295,"total":20655} response · trace

🤖 Generated with Claude Code

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant