Actual output / 2026-09-24 / First-party demonstration

Repairing a quantity bug: before and after

A controlled JavaScript exercise: a supplied cart-total function ignores quantity. Inspect Agent's repair and the reproducible regression tests.

Created with Donatello Agent 0.9.87, Microsoft Store (1.9.87.0), using OpenCode Free · space-bunny-free. No Donatello account was connected; 0 Donatello credits were used.

Try the original output

This isolated preview cannot access your Donatello account. Use fictional sample details only; this is not a real business or contact service.

Open full-window demo ↗

Exact request

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.

Checks and limits

  • 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.

No validated end-to-end timing or general performance claim is made.

  • 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.

Human and operator interventions

  • 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.

Download and verify the actual files

Generated source is preserved unchanged. Operator-created test records and presentation wrappers are identified above. Compare each file's SHA-256 with this record.

index.html

26,146 bytes

eee2382e72a83f738bf346ca0ed7c586f6d8adc9eb216df70d425e8969d6cd83

README.md

1,860 bytes

507657c1b165750eeccd4ef9e0b69078f92067535cab53b286ec8c6545611761

before.js

113 bytes

890e0e4d6ed90a98791ba228f8f53b80c7c30e69bebcaec16a557695a6939a5f

after.js

587 bytes

f6111af2887c6dbe545e623089cc7e4d3077f2ff83efad057ad0a70c67933f04

Download provenance manifest (JSON)

All Agent cases and methodology · Download and learn about Agent