Skip to content

Separate instants from civil dates and add WAX-0034 Monetary Values and Currency - #25

Open
RobGrafrath wants to merge 2 commits into
mainfrom
cluster-2-money-and-time
Open

RobGrafrath wants to merge 2 commits into
mainfrom
cluster-2-money-and-time

Conversation

@RobGrafrath

Copy link
Copy Markdown
Contributor

What this changes and why

A review of the record for assumptions that hold only in one currency and one time zone found two gaps in the Wax foundation. This pull request closes both before any code or event exists, when the fix costs nothing.

Dates. WAX-0012 said all date and time values are stored in UTC. That is right for moments but wrong for calendar dates such as a due date or a date of birth, which name a day and have no zone. The record already uses day-valued fields (HIVE-0001, HIVE-0003, HIVE-0005, and the date type in WAX-0022), and HIVE-0008's statement run takes a through date without saying which midnight it means. The first commit separates instants from civil dates, gives each organization a business zone, gives occurred_at and recorded_at precise meanings, names the business date fields, and makes due times and recurring jobs record how they were counted and in which zone.

Money. Amounts were bare numbers (the worked example in WAX-0001), and currency was defined once per installation (WAX-0007). The second commit adds WAX-0034 Monetary Values and Currency. Every monetary value becomes an exact decimal amount plus an ISO 4217 code. An installation whose Region Packs name one currency gets that currency as its default, applied automatically and stamped on every stored value, so single-currency installations never specify a currency. OpenAR code and certified modules always specify the currency in code and never rely on the default, and continuous integration runs in a configuration with more than one currency to enforce it.

Decisions the maintainer made for this change

  • The money rules go in a new decision file, WAX-0034, not in a section of WAX-0001.
  • The Region Pack and Language Pack tiers in WAX-0007 become "Yes (1+)", meaning at least one.
  • The default currency is stamped on every stored value.
  • OpenAR code and certified modules always specify the currency in code and never rely on the default.

Defaults chosen for review

These were recommended and are not yet explicitly confirmed, so they are the first things to check.

  • occurred_at is asserted by the actor or source and may precede recorded_at (WAX-0001).
  • The calendar and the date arithmetic service live in WAX-0012 and ship in v2.
  • The hash input is not changed here. WAX-0001 says the event hash covers the full payload, while WAX-0013 lists specific fields and omits recorded_at, source, the correlation fields, and metadata. The two need reconciling before hash computation activates in v2, in a separate change.
  • WAX-0034 enters as Proposed 0.1. Adoption to 1.0 is the Foundation's decision on merge.

Interacting decisions

WAX-0001, WAX-0007, WAX-0012, WAX-0013, WAX-0019, WAX-0022, WAX-0023, WAX-0026, WAX-0027, WAX-0028, and SHARED-0007 for the continuous integration baseline. No decision is contradicted. Follow-on edits to HIVE-0005, HIVE-0006, HIVE-0007, HIVE-0008, SHARED-0006, and MOD-PURCHASE-0001 (an account's denomination currency, civil posting dates, per-currency control totals) build on this change and are deliberately not included.

If this touches decisions/wax/

  • Hash chain integrity: no change to chain mechanics. Business dates and typed money values live in the hashed payload, which puts them inside the tamper-evidence boundary. The canonical serialization of decimal amounts must be pinned in the hash specification before v2 activation, and WAX-0034 states that requirement.
  • Event immutability: unchanged. No stored event is rewritten. No events exist yet, so the shapes change without upcasting. After release the same changes would need upcasters under WAX-0026.
  • Schema ownership: unchanged. Modules still own their payload schemas. Wax adds two field kinds, money and temporal kind (instant or civil date), to the field registry that already carries PII and reference value kinds.
  • Module boundaries: unchanged. Modules consume the money and date primitives from Wax and do not define their own.

Version bumps

  • WAX-0012: major, 1.0 to 2.0, because the Decision text changes (instants versus civil dates).
  • WAX-0001, WAX-0007, WAX-0019, WAX-0022, WAX-0023, WAX-0027, WAX-0028: minor, 1.0 to 1.1, with the Decision sections untouched.
  • WAX-0034: new decision, Proposed 0.1.
  • INDEX.md and README.md follow (the WAX-0012 sentence, a new WAX-0034 line, and a count of 53 decisions).

Checklist

  • I read the decisions neighboring this change, not just the file I edited.
  • New or retitled decisions have a matching line in INDEX.md, and front matter follows CONTRIBUTING.md.
  • python3 scripts/validate.py --base main passes locally, or I am relying on CI to tell me.
  • No pricing, rates, market or customer allocation, consumer data, or client-confidential information.
  • Claims about law or regulation are flagged for verification, not asserted.
  • Commits are signed off (DCO). If I forgot, I will post the retroactive sign-off comment per CONTRIBUTING.md.
  • I license this contribution under CC BY 4.0 (prose) and Apache 2.0 (embedded code samples).

🤖 Generated with Claude Code

Rob Grafrath and others added 2 commits October 5, 2026 23:44
WAX-0012 now stores instants in UTC and civil dates as plain dates, and
requires a zone of reference whenever the two meet. Each organization
gets a business zone. WAX-0001 defines occurred_at as asserted by the
actor or source and recorded_at as assigned by the store, and names the
business date fields. WAX-0027 and WAX-0028 record how a due time or a
recurrence was counted and in which zone.

WAX-0012 moves to 2.0 because its Decision text changes. WAX-0001,
WAX-0019, WAX-0027, and WAX-0028 move to 1.1. INDEX.md follows the new
WAX-0012 sentence.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Rob Grafrath <rob@openarcollective.org>
Every monetary value becomes an exact decimal amount plus an ISO 4217
currency code. An installation whose Region Packs name one currency gets
that currency as its default, applied automatically and stamped on every
stored value, so single-currency installations never specify one. OpenAR
code and certified modules always specify the currency in code and never
rely on the default, and continuous integration runs in a configuration
with more than one currency to enforce it.

WAX-0001, WAX-0022, WAX-0023, and WAX-0007 reference the new decision.
WAX-0007 now marks the Region Pack and Language Pack tiers as one or
more. WAX-0034 enters as Proposed 0.1. README.md counts 53 decisions.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Rob Grafrath <rob@openarcollective.org>
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