What is tested
Eight suites. They run offline, against a local copy of the chain, or in a browser, so they cost nothing and risk nothing. npm test runs the offline ones, npm run test:fork adds the fork suites, npm run test:all adds the browser suite.
node tests/unit.mjs (32 checks, offline)
- Battery: tier thresholds are exact (60%, 25%, 5%), the balance caps at twice full, a drain never goes below zero, a claim splits as set, a call cost is tokens times price.
- Hooks: the drip is clamped by the daily ceiling; a used-up ceiling gives no order; a treasury at the gas reserve spends nothing; the dip fires at 10% under and not at 5%; a cooldown holds; a hook the tier does not allow never fires; two hooks together never pass the ceiling; settings outside the limits are refused.
- The mind: it trims and speaks and its cost is accounted; a scale of 7 becomes 1; an unusable answer runs the hooks as written and is still billed; no key gives a template and says so; too little battery makes no call; the low tier has no model.
- The dev share: a share without an address is refused, as are the burn address and a share above 90%; 50% of a claim is paid to the dev address; the rest splits correctly; under the minimum it waits owed; a failed payout stays owed and is paid at the next beat.
- The organism, in paper mode: an empty battery sleeps; fees wake it; no new cycle before the tier's rhythm; a burn respects the daily cap; the model line is tagged; thinking drains the battery; a sleeping organism makes no model call; a claim while asleep wakes it; state survives a restart.
node tests/sim-equivalence.mjs (offline)
The browser simulation behind the lab and the home page demo, and the real organism, are driven by the same 700 beats of price and fees in three configurations. Their battery, treasury, burned ETH, burn count, cycle count, tier, claim count and the order of events in the journal must be identical. This is why the lab can be trusted as a picture of the engine.
node tests/fork-live.mjs (local fork of Robinhood Chain)
The organism, live, on a real existing Pons coin, impersonating its fee recipient on a local fork: a real buy-and-burn with a transaction hash, the tokens that arrive at the burn address matching the journal, the daily cap holding, the published files, the Verify module answering PROOF on an honest organism and NO PROOF on a wrong wallet, a forged token count and an unknown coin, the rescue, and a wallet that is not the fee recipient being refused.
node tests/fork-e2e.mjs (local fork)
The whole path, nothing mocked on the chain side: a creator launches a new coin on Pons with a fresh organism wallet as fee recipient, a trader buys on its curve so fees accrue, the organism makes a real claim from the escrow (about 0.0255 ETH after 1.5 ETH of buys), splits it, wakes, burns with the drip hook, then burns with the dip defender after a price drop, Verify returns no NO PROOF, and the rescue claims the rest and sends the ETH out.
node tests/keccak.mjs (offline)
The hash the Verify page computes in the browser to find a coin's pool equals ethers' on empty, short, block-boundary and long inputs.
node tests/soak.mjs (offline, about a minute)
25 simulated days, three seeds, against a chain that fails on purpose: claims time out, burns revert, burns are mined and then reported as failed, balance reads fail, and the process is killed and restarted from disk every few hundred beats. The checks are on the chain's own numbers: the worst day never passes the ceiling, no burn goes below the gas reserve, the treasury is never more than the wallet holds, and the books never claim a burn that did not happen.
node tests/fork-graduated.mjs (local fork)
A real graduated coin on a fork of the chain, with its fee recipient impersonated: the pool id computed from the pool key equals the one the market data shows, the market module reads the price from the v4 pool, the organism burns through the Universal Router with a price-impact cut, the burn address receives exactly the tokens in the journal, Verify names the pool and confirms the transaction, a coin with no pool gets no burn and a journal line, and a treasury above the wallet balance is trimmed.
node tests/e2e-site.mjs (browser and local fork)
The site in a real browser (Edge through puppeteer-core): every page loads without a console error, the 3D scene is on screen, the lab's buttons change the state and every wall reports HELD, the docs search puts the right page first, and the whole /launch flow runs against a fork of the chain with a browser wallet standing in (a bridge to the fork): the wallet is created in the page and its key matches its address, the coin is launched on Pons, the page re-reads the chain and shows PROOF, the printed .env holds the coin and the key, and on chain the coin's fee recipient is the organism wallet and its deployer is the connected wallet.
node tests/mind-live.mjs (real API, a fraction of a cent, not in npm test)
Needs ANTHROPIC_API_KEY in .env. Real calls to the full-tier and steady-tier models with real orders: the answer is usable JSON, scale stays in range, the line is short, the cost equals the cost computed from the usage the API reports, a +61% hour with the day nearly spent makes the model trim an order (scale 0.6 in the run on record), an invalid key falls back to the template with the hooks unchanged, and a whole paper cycle with the real mind drains the battery by exactly the cost of that call.
What is not tested
- The mind in long runs. It was tested against the real API (
npm run test:mind, a fraction of a cent) but never for days. - Mainnet and a real wallet extension. Everything on-chain ran on a fork of it, and the browser tests use a stand-in wallet.
- The step between graduation and the pool's creation: no coin was caught in it, so the idle behaviour is tested with a stand-in.
- Long runs. The simulation covers 700 beats; a live organism has not run for weeks.