Loops HouseRehearseGate

NEAR HACKATHON
Links
Team
1 member- OLOwner
olaph
Overview
A contract upgrade can compile, deploy and still wipe every balance, because the new code reads old storage the wrong way. RehearseGate makes rehearsal an on-chain precondition. A locked NEAR contract's only upgrade path is migrate(code, receipt): it redeploys only if a designated worker signed a receipt saying these exact wasm bytes, and this exact post-deploy hook, passed a rehearsal on a copy of real chain state (near-rehearse, local sandbox). Wrong hash, wrong hook, forged signature, replayed nonce or expired receipt all revert. An AI agent can drive upgrades with a function-call key limited to migrate, so it cannot move funds or touch anything else. Shown live: a 14-transaction testnet run (links in the README), and a rehearsal on captured mainnet state of a live Sputnik DAO, where moving it to the current upstream Sputnik code FAILS because vote_counts changed from numbers to strings. One clone plus judge-check.sh reruns every check. It is a policy gate, not a proof: you trust the worker key. Testnet-first, unaudited. Second entry by the same builder; the first is Outlive.