Skip to content

feat(builder): add SrcAllowingUnboundedOverdraft combinator#164

Merged
ascandone merged 1 commit into
feat/script-builderfrom
en1271/script-builder-overdraft
Jun 23, 2026
Merged

feat(builder): add SrcAllowingUnboundedOverdraft combinator#164
ascandone merged 1 commit into
feat/script-builderfrom
en1271/script-builder-overdraft

Conversation

@paul-nicolas

Copy link
Copy Markdown

Adds the allowing unbounded overdraft source combinator on top of #163, required by transaction-plane EN-1271. Base is #163's branch.

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • main

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 791728d0-26e2-40b1-b93f-ed8825199e39

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch en1271/script-builder-overdraft

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.35%. Comparing base (4eb046c) to head (dc06268).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ascandone ascandone marked this pull request as ready for review June 23, 2026 06:48
@ascandone ascandone merged commit 2435c32 into feat/script-builder Jun 23, 2026
7 checks passed
@ascandone ascandone deleted the en1271/script-builder-overdraft branch June 23, 2026 06:49

@NumaryBot NumaryBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛑 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.

Comment thread builder/source.go
// (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 {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 [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.

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.

3 participants