Loops HouseBUMM Guard

NEAR HACKATHON
Links
Team
1 member- MYOwner
Mykola
Overview
BUMM Guard checks in a sandbox that a NEAR contract upgrade works on state the old code wrote, binds that proof to the exact pair of code hashes, and only then hands an agent or a human the deploy command.
The problem: new code over state with another layout, and no migration, fails on every call that reads the data. And the migration is itself an entry point: near-sdk 5.0.0 to 5.17.2 generates no caller check for #[private] on an #[init] method, so the usual #[private] #[init(ignore_state)] fn migrate() can be called by anyone.
What it does: the upgrade scenario step deploys the old wasm in near-sandbox, writes state, deploys the new wasm with its migrate call and checks the upgraded state. An access probe replays the run, deploys the new code alone and sends migrate from another account. The gate reads the account's code hash and prints the deploy command only when a passing scenario proves that pair; a migration another account can run is refused. Also: a static rule-pack and an MCP server.
Evidence:
- Found by the probe on 2026-11-10: in a sandbox replay, migrate of the three contracts we had upgraded live on testnet accepts a stranger's call. The gate now refuses them; escrow v3 checks the caller and passes 33/33.
- CI on every push: four of our pairs and the official near-sdk-rs versioned example; code-only upgrades fail.
- Guarded jobs for agent swarms: a contract pays the agent only after the reviewer approves that agent, wasm and report; review-job prints the command, never signs.
- Testnet: the gate refused the open migration and passed v3; the owner ran the printed tx; a 1 NEAR escrow deal survived.
Not done: no state copied from a live network; one trusted reviewer; testnet only; the gate is pipeline control, not on-chain enforcement.
Prior work: BUMM, the author's Solana builder, is separate, not in this repo. Built in the hackathon window with Claude Code.
Try: scripts/judge-check.sh