CAIN-42 · The KEYSTONE Loop
Detect. Act. Prove. Sign. Verify offline.
A frontier model is a commodity. The closing loop is the moat. This page runs the loop in front of you: a deterministic detector finds a defect and grades it, a model proposes a patch, an independent sandboxed prover re-tests the original and the fixed file, and the result is Ed25519-signed and hash-chained so anyone can check it without trusting us.
What each stage actually guarantees
FALSEWORK parses the code and looks for a success that was given rather than established: unconditional verdicts, random numbers presented as measurements, swallowed errors, placeholders shipped as real. The verdict is mechanical. No model decides it.
The model proposes a patch. It never grades its own work, and its explanation is displayed as a claim, not as evidence.
Two test suites run inside bubblewrap with no network: the model's tests and a reference suite written independently of the patch. The reference suite must fail on the original file and pass on the fixed one.
The record is canonical JSON, hashed with SHA-256, signed with Ed25519, and linked to the previous record's hash. Change one byte and the chain breaks.
The auditor bundle contains the record, its predecessor and a standalone verifier that imports none of our code. The pinned public key is published; the check runs on your machine.
That the patch is the best patch, that the model was honest, or that the reference tests cover everything. It proves the detector found a defect, the tests failed before and pass after, and nobody altered the record afterwards.
Embed it anywhere
This is one script and one container. No build step, no framework, no external request except the CAIN-42 API you point it at. It works on the main site and inside the Hugging Face Space, and the Space uses the same file served from this host.
<div data-keystone-loop data-keystone-api="https://cainstudio.online"></div> <script src="https://cainstudio.online/keystone-loop.js" defer></script>
Honest scope
The detector is heuristic and static: it finds known fabrication shapes, not every bug. Live model fixing is capped per visitor and per day, and it is switched off on some deployments — when it is off, this page says so and shows the last run that was actually performed rather than inventing one. The verifier proves integrity, not correctness. There is no third-party audit of KEYSTONE, and nothing on this page is a certification.
The KEYSTONE Loop is part of the CAIN-42 KEYSTONE family: same five stages, a different
detector per product. Canonical doctrine is in docs/strategy/KEYSTONE-FAMILY.md.
Memory product: AETHER-33 · what is live now ·
verification center.