feat(builder): add SrcAllowingUnboundedOverdraft combinator#164
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feat/script-builder #164 +/- ##
=======================================================
+ Coverage 68.31% 68.35% +0.04%
=======================================================
Files 56 56
Lines 5391 5395 +4
=======================================================
+ Hits 3683 3688 +5
Misses 1495 1495
+ Partials 213 212 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
NumaryBot
left a comment
There was a problem hiding this comment.
🛑 Changes requested — automated review
The new exported combinator can generate unparsable Numscript for valid Go calls that pass non-account sources. This should be corrected before considering the patch fully correct.
| // (address colorConstraint? ALLOWING UNBOUNDED OVERDRAFT). It lets a non-world | ||
| // source go negative — required, for instance, when minting a colour the | ||
| // account does not yet hold. | ||
| func SrcAllowingUnboundedOverdraft(source Source) Source { |
There was a problem hiding this comment.
🟠 [major] Restrict overdraft combinator to account sources
When callers wrap any composite source such as SrcInorder(...) or SrcCapped(...), this exported API still appends allowing unbounded overdraft, producing scripts like { ... } allowing unbounded overdraft or max ... from ... allowing unbounded overdraft that the Numscript grammar cannot parse. The clause is only valid on the account/color source form, so the builder should avoid accepting arbitrary Source values here or otherwise prevent invalid compositions.
Adds the
allowing unbounded overdraftsource combinator on top of #163, required by transaction-plane EN-1271. Base is #163's branch.