{
  "about": "An entry of UpFork's ledger. Check it by hand as https://upfork.dev/docs/ledger says, or at https://upfork.dev/verify/E-24",
  "entry": {
    "seq": 24,
    "kind": "lesson-version",
    "record": "{\"ai\":{\"apps\":[\"Claude\"],\"models\":[\"Claude Opus 5.5\"]},\"article\":\"how-to-build-a-live-logistics-dashboard-a-simulated-fleet-maplibre-and-one-s\",\"articleRevision\":1,\"assumed\":\"stock could be simulated day by day in aggregate: add the day's receipts, subtract the day's picks.\",\"author\":{\"account\":\"a_9d470b566acab5f65bdc\",\"handle\":\"ramin-valadan\"},\"evidence\":\"tests/seed.test.ts (\\\"no stock balance ever goes negative\\\", \\\"on-hand equals the ledger sum everywhere but the one deliberate discrepancy\\\"); lib/data/seed/stock.ts.\",\"fix\":\"one event queue per day, in time order: picks, receipts, transfers dispatched at 18–19 h that land the next morning, adjustments in the evening, with a rush replenishment when a pick would go below zero. Then open orders are trimmed to what the shelves really hold, except the two stock-outs the story needs.\",\"happened\":\"the integrity tests found ledger balances below zero and on-hand totals that didn't match the ledger: within a day, picks used stock before that day's receipts had arrived, which adding and subtracting whole days hides.\",\"kind\":\"my-mistake\",\"learnedBy\":\"ai\",\"lesson\":\"L-QE16\",\"packages\":\"\",\"product\":\"nextjs-logistics-fleet-management-template\",\"productRevision\":null,\"publishedAt\":\"2026-10-26T08:10:31.656Z\",\"site\":\"https://upfork.dev\",\"title\":\"Simulating warehouse stock per day in aggregate drove balances negative; it has to be one time-ordered event queue\",\"type\":\"lesson-version\",\"url\":\"https://upfork.dev/lessons/L-QE16\",\"version\":1,\"why\":\"\"}",
    "recordHash": "bb004cf61f548971b3183c0cc1c1c8f49417dbc8bbf06ee42384f0cbd7c5673a",
    "prevHash": "3802024bb439a05b2285e2cb5eba095dbededb58b9fea9ffbc2d85b075ebedd6",
    "entryHash": "556164277e9e8208799153e43ffcae0961c053b1b6466da4c182e498d803f376",
    "keyId": "k1",
    "signature": "eXDS7PDIwzzVtBtVdeSYe5gGFzYHaSCieyqISRtwcN2ZDqJ2S0yPvSJ7o+fDGvm+1LLAcoPZjJz8KM62/tPbCQ==",
    "recordedAt": "2026-10-26T08:11:08.838153+00:00",
    "publicKey": "VuHuHXAtO3XAqgnwvMenp0f/3vTV061hnAIizYvwh40=",
    "algorithm": "Ed25519"
  },
  "path": [],
  "checkpoint": null,
  "keys": "https://upfork.dev/ledger/keys.json"
}