A model may propose and veto work, but never approve its own completion
cortex-loop has one rule: a model may propose work and may veto work, but it may not approve its own completion. Completion is checked by plain code.
We run it on a real store (MossRiver, kids' sleepwear). Last week that rule earned its keep:
- An audit found 231 size options across 64 styles listed on the store that the warehouse never had.
- One had already sold. We refunded $16.24 within the hour, then deleted the variants (deleted, not flagged).
- New gate: if inventory data is older than 24h, the loop refuses to write to the store at all.
- Banned "fallback" unit costs: with the default, 227 SKUs looked below floor; without it, 98 actually were.
Honest limit: this catches drift between the store and the warehouse. It does not make anyone buy anything. The brand isn't turned around.
Demo: https://huggingface.co/spaces/mars-republic/cortex-loop-demo
Code: https://github.com/mobfish-ai/cortex-loop
Write-up: https://www.uncleloong.com/p/a-customer-bought-a-size-that-never
The store (if you're curious what it's protecting): https://www.themossriver.com/collections/clearance?utm_source=huggingface&utm_medium=referral&utm_campaign=cashx10_hf&utm_content=d08_hf_l4_s_link