Skip to content

feat: add first-class CGS money type - #36

Merged
ryan-s-roberts merged 1 commit into
mainfrom
feat/money-type
Aug 15, 2026
Merged

feat: add first-class CGS money type#36
ryan-s-roberts merged 1 commit into
mainfrom
feat/money-type

Conversation

@ryan-s-roberts

Copy link
Copy Markdown
Collaborator

Summary

  • Add Fowler money as a first-class CGS field/value type: exact Decimal amount plus optional currency, owned by plasm-core money.rs.
  • HTTP/CML wire stays a scalar (decimal_string | json_number | minor_units); in-memory Value::Money is tagged so untagged serde does not collide with objects.
  • Compare is legal when either side lacks currency; both named and unequal is TypeError::CrossCurrencyCompare. Catalogs: Vultr billing, tau2 retail prices, Architect exchange, plus language-matrix LangOffer.

Test plan

  • cargo test -p plasm-core --lib --offline money
  • cargo test -p plasm-core --lib --offline currency_field
  • cargo test -p plasm-e2e --test plasm_language_matrix --offline
  • CI green on this PR

Made with Cursor

Exact Decimal amount plus optional currency, with scalar HTTP wire
encodings and typed cross-currency compare.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cursor

cursor Bot commented Aug 15, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@ryan-s-roberts
ryan-s-roberts merged commit f9d3d6d into main Aug 15, 2026
1 of 2 checks passed
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