Repository navigation
fix: validate setup currencies against supported list - #839
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: FreeOpenSourcePOS/FloCafe/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughThe setup endpoint now validates normalized currencies against supported currency codes. The test suite checks that the endpoint rejects ChangesSetup currency validation
Estimated code review effort: 2 (Simple) | ~8 minutes Merge Risk: ⚪ Minimal · up to Unsupported setup currencies receive the existing error response, and the added test covers ZZZ without creating an owner. No actionable merge-blocking risk is evident in the supplied change. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description explains the behavior change and lists verification commands, but it omits most required template sections, including Scope, Compatibility & data safety, Screenshots, Cross-cutting surfaces, and the Contributor checklist. Resolution Complete the repository template. Add Related work, Summary, Scope, Compatibility & data safety, Screenshots, Cross-cutting surfaces, and Contributor checklist sections. Document command results and mark each applicable surface and checklist item explicitly.
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
SummaryCoverage spans first-run setup and persistence, including successful regional configuration, derived defaults, retry and rollback behavior, duplicate-owner prevention, and rejection of unsupported or malformed currency and business inputs. The results indicate healthy happy paths plus edge-case and adversarial validation with no observed application failures. Safe to merge — the run found no regressions, new failures, or previously reported failures attributable to this PR, and all exercised behaviors completed successfully. No merge blocker is indicated; overall risk is low. Tests run by Ito
Tip Reply with @itoqa to send us feedback on this test run. |

What changed
First-run setup now validates currency input with the shared supported-currency list used by the currency-reset endpoint. Unsupported three-letter codes such as
ZZZreturn the existing400 Invalid currencyresponse before an owner is created.Verification
npm run test:first-runnpm run test:currencynpm run test:securitynpm run test:authz-phase3npm run lint(passed with existing warnings)npm run buildgit diff --checkThe full
npm testsuite was not run; this change is confined to first-run currency validation.Closes #835.
Summary by CodeRabbit