When stock drifted in the past, tracing it was a dead end — some code paths changed balances without leaving any record. Every one of them has been found and wired into the stock history journal.
📝 Every Change Recorded: • All 99 places that touch a stock balance were reviewed; every real writer now journals what changed, why and from where • That includes the rebuild and reconciliation tools — previously the very tools used to investigate drift were erasing the trail while they ran • An automated guard now blocks any future code from changing a balance without journaling it.
🌙 Two New Nightly Checks: • Balance vs batches — your stock figure must equal what remains across its purchase batches, allowing for deliberate overselling • Balance vs journal — the live figure must match the last recorded change, which catches an untracked edit within a day instead of months later • Both ride the existing nightly audit and its email report.
🧱 Groundwork: • A new single-writer stock engine has been built and proven against every core flow — receiving, transfers, adjustments, wastage, production, consumption and returns — so a stock move can never again be half-applied. It is being switched on gradually per business, and is off by default.
Result: If a stock number ever moves unexpectedly, you find out the next morning — with a record of what did it.