{
  "slug": "quantity-bug-repair",
  "publisher": "Donatello (first-party demonstration, not an independent review)",
  "date": "2026-09-24",
  "agentVersion": "0.9.87",
  "storeVersion": "1.9.87.0",
  "edition": "Microsoft Store",
  "model": "OpenCode Free · space-bunny-free",
  "creditsUsed": 0,
  "accountConnected": false,
  "mode": "Automatic free AI",
  "prompt": "Create two additional public demonstrations in this same project; do not change website/index.html. (1) game/index.html: a polished, self-contained vanilla HTML/CSS/JS 4x4 memory-pairs game called ORBIT PAIRS, with eight pairs of space-themed symbols, move counter, elapsed timer, matched count, win message, restart, keyboard-operable cards, and reduced-motion support. No packages, downloads, external assets, network calls, storage, credits or deployment. (2) A controlled bug-repair exercise, not a real production incident: preserve bugfix/before.js exactly as: export function totalCents(items) { return items.reduce((sum, item) => sum + Math.round(item.price * 100), 0); } . The defect is that it ignores quantity. Create bugfix/after.js correcting quantity; reject non-integer or negative quantities and negative or non-finite prices; quantity zero is allowed; empty cart totals zero. Provide bugfix/index.html showing the before/after code and a working demo of totals. Provide a README.md inside each folder with limitations and an honest account of checks. Only write these files. Do not launch browsers or execute commands; I will perform independent tests. End when files are written.",
  "artifacts": [
    {
      "file": "index.html",
      "bytes": 26146,
      "sha256": "eee2382e72a83f738bf346ca0ed7c586f6d8adc9eb216df70d425e8969d6cd83",
      "sourceModifiedAt": "2026-09-24T11:26:54.968Z"
    },
    {
      "file": "README.md",
      "bytes": 1860,
      "sha256": "507657c1b165750eeccd4ef9e0b69078f92067535cab53b286ec8c6545611761",
      "sourceModifiedAt": "2026-09-24T11:26:07.251Z"
    },
    {
      "file": "before.js",
      "bytes": 113,
      "sha256": "890e0e4d6ed90a98791ba228f8f53b80c7c30e69bebcaec16a557695a6939a5f",
      "sourceModifiedAt": "2026-09-24T11:25:10.137Z"
    },
    {
      "file": "after.js",
      "bytes": 587,
      "sha256": "f6111af2887c6dbe545e623089cc7e4d3077f2ff83efad057ad0a70c67933f04",
      "sourceModifiedAt": "2026-09-24T11:26:03.502Z"
    }
  ],
  "checks": {
    "inlineJavaScriptParses": true,
    "noExternalAssetDependencies": true,
    "noNetworkOrStorageAPIsInInlineScript": true,
    "quantityRegression": true,
    "invalidInputsRejected": true
  },
  "verification": [
    "Operator check: embedded JavaScript parses.",
    "Operator check: no external asset dependencies or network/storage API calls in the inline script.",
    "Operator unit tests: the original returns 1,250 cents for 3 × 12.50; the repair returns 3,750. Empty cart, zero quantity, zero price and multiple lines pass. Negative/fractional/non-number quantities and negative/non-finite/non-number prices are rejected.",
    "Operator browser checks: clear cart produces zero totals; adding 3 units at 12.50 shows 12.50 before repair and 37.50 after repair."
  ],
  "manualInterventions": [
    "Codex supplied the brief and operated Agent.",
    "Codex exported and tested the files without modifying the generated code.",
    "Both additional cases were requested in the same project and conversation after the website."
  ],
  "limitations": [
    "A controlled defect supplied in the prompt, not a production incident.",
    "The preview mirrors the reference JavaScript functions; no real checkout or payment.",
    "Uses JavaScript rounding, not decimal-exact accounting; not reviewed for arbitrary large financial inputs.",
    "The Agent was instructed not to execute checks; all published checks are subsequent operator checks."
  ],
  "durationSeconds": null,
  "durationNote": "No validated end-to-end timing or general performance claim is made.",
  "followUpPrompts": []
}
