News
Inventory homogenization P0–P3 shipped: live stock stream, consume-to-charge ledger, 9-kind rules engine
3,892 balances / 20,237 catalog / 3,309 alerts live on PH Supabase, a consume-to-charge billable_ledger trigger, and a 9-kind inventory rules engine.
Inventory is now homogenized onto one movement spine: every consumable domain emits the same STOCK_* vocabulary into the inventory orchestrator and four realtime cache tables. The previously dry stream is live — 3,892 balances, 20,237 catalog items, and 3,309 alerts on the PH Supabase.
Phase 2 adds a consume-to-charge path: patient-scoped stock issues and consumption resolve a menu price and post to the billable_ledger. The trigger is fail-soft (it never blocks care), idempotent, and flags items that need pricing rather than silently charging zero. A leakage view surfaces anything consumed but never charged.
Phase 3 introduces a 9-kind inventory rules engine with a shared evaluator wired into both the orchestrator and the sync path, plus an admin UI at /admin/inventory-rules. With no active rules, behavior is identical to before.