04 · INTERFACE
Expose the operational truth
Make commitments, actual goods, and the resulting invoice independently inspectable.
Explain every cent in the synthetic USD 61 scenario.
The engineering problem
A single available-capacity number hides whether space is physically empty, promised for later, blocked, or occupied by an overdue pallet.
STEP 1
Give each role its work
Customers request capacity and inspect their own inventory and charges. Operators receive goods, close variances, record departures, block positions, and resolve exceptions. Actions follow the server's state and role checks.
STEP 2
Distinguish estimate from actuality
Six pallets reserved for three local dates estimate USD 78. Five actually received, with two leaving on the second date and three on the third, produce 13 pallet-days and USD 61. The unused sixth reservation incurs no fee in this invented tariff.
STEP 3
Link money to evidence
Amounts use integer cents. Storage counts America/Denver calendar dates with positive custody overlap, including partial dates. Release exactly at midnight creates no extra day. Each invoice line identifies its pallet, source movement, and accepted tariff version.
YOUR TURN
Make the behavior visible.
- Run the USD 61 scenario or complete its actions manually.
- Inspect five receipts, two partial departures, and three final departures.
- Expand invoice evidence and reconcile USD 26 storage + USD 20 receiving + USD 15 release.
Acceptance evidence
13 pallet-days and USD 61.00, reproducible after resetting only your workspace. Changing a current rate never rewrites an accepted tariff snapshot.
Read the working source.
These files belong to the downloadable PostgreSQL reference. The hosted companion has its own bounded state machine and persistence adapter.
Design review
Why is elapsed hours divided by 24 incorrect for warehouse-local calendar-day billing?
Review the tradeoff
A warehouse-local date can contain 23 or 25 hours. This tariff charges calendar dates with positive overlap, so local date boundaries—not elapsed-day fractions—define the unit.