Patch and Patch Notes
A Patch starts a new run from a build you kept and a prompt that says what to change. Play the new game to check the change you requested. Patch Notes are the chain of prompts from the first run to the one you are looking at.
Start a Patch
Section titled “Start a Patch”On your first Patch, choose a suggested change to fill in the Patcher prompt. Edit it to describe the result you want, then send it.
POST /api/runs/{id}/patch starts a Patch from your finished, picked build.
- Auth:
sessionBearer(see Authentication). - Header:
Idempotency-Key, a UUID you choose for this Patch. Send the same key again if the connection drops, and a retry never starts a second run. - Body:
side(leftorright, the kept side to patch),prompt, and optionallysystems, the Game Systems for the new run:settings,achievements,local-high-scores,health,save-game,leveling,currency,inventory,equipment,loot-tables,wave-spawner,quests,bestiary,pets,platformer-controller,turn-manager,base-building,crafting. The old idlocal-best-scoresis still accepted and stored aslocal-high-scores. Leavesystemsout and the Patch keeps the systems of the run it patches. - Answer:
201with the new run.
curl -X POST "$COGGS_URL/api/runs/$RUN_ID/patch" \ -H "Authorization: Bearer $TOKEN" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{"side":"left","prompt":"Make the boss slower and add a second phase."}'A Patch is a run, so it is charged and refunded like one when paid runs are on: it charges once, a repeated key does not charge again, and a failed Patch is refunded once.
Read the chain
Section titled “Read the chain”GET /api/runs/{id}/patch-notes returns notes, the root run first, then the path to the run you asked for and its direct children. Each note holds:
| Field | Meaning |
|---|---|
run |
the run this Patch created |
parentRun and parentSide |
the run and side it patched, null for the first run |
prompt |
what you asked for |
systemsAdded and systemsRemoved |
the Game Systems this Patch added to or removed from its parent run |
state |
where the run stands |
createdAt |
when it was made |
Both routes are in the API reference.