Experiments (#16583)
Every cloud dollar answers a question. An experiment is that question, the pinned forges it runs on, and its result.
Where
- Web: the top of
/pinned(src/web/pages/pinned.ts). One row per experiment: its question, the machines it runs on, what they cost a month now, what it has cost, and its result, with Record result under it while it runs. It is a live region on/events: it updates in place when anyone changes an experiment, from any door. - Terminal: the Experiments screen (
src/tui/screens/experiments.ts, after Pinned forges in the palette).bbegins one,aattaches machines to the selected one,rrecords its result. - Agents: the
experimentsMCP tool:list(andidle),showby id or words of the question,begin,attach,record_result.
All three read and write through src/cloud/experiments.ts, and only a forge admin sees them.
How it counts
- A machine costs what the cloud ceiling reckons it costs a month at list price (
rowCents). The provider's bill is the truth. - Has cost is each machine's monthly cost now, over its days on the experiment.
- A machine is on one experiment at a time. Attaching it to another closes its time on the first, which keeps what it spent there; attaching it back opens a new stretch.
- Recording a result marks the experiment done and stops its cost counting. Its machines keep costing until they are retired; the row says so.
- A pinned forge that costs money and is on no experiment shows as idle spend, below the experiments and the New experiment form: its name and monthly cost first, then what bills (
bills: its machine, or the disk a retired forge kept). A running one offers Attach (or, with no experiment yet, a link to the form) and Retire its machine; a retired one offers Delete its kept disk, through the same confirm that asks for its name. - New experiment's Runs on offers exactly the machines that cost money: the idle ones and those on an experiment now.
Each begin, attach and result is an event (pinned.experiment_begun, pinned.experiment_attached, pinned.experiment_result) naming who did it. Retiring a machine stays on the pinned forge itself.