# Batching and publishing with changesets

URL: https://kywi-docs-production.up.railway.app/governing/batching-and-publishing-with-changesets
Type: docPage

A changeset batches items into one atomic publish or rollback — rollback returns items to draft rather than restoring what was live before.

A changeset is a batch of content changes — creates, updates, deletes — that releases as one unit instead of one page at a time. Everything in it goes live together, or none of it does.

## Publishing is one transaction

If any item in the batch fails to apply, the whole publish rolls back — not just the item that failed. A changeset either goes live in full or stays exactly where it was; there’s no partially-published state to clean up after.

An item added to a changeset can carry a specific captured version, or none. One with no version attached simply flips the page it targets to published as-is — a “make this live” with nothing new to apply. One that carries a version applies that captured snapshot onto the page first, then publishes it — which is what lets a changeset ship an edit that was saved earlier, not only whatever the page happens to hold right now.

## Who can build and publish one

Creating a changeset, adding items to it, publishing it, and rolling it back all take an editor role or above, scoped to the changeset’s own site. This isn’t a site-admin-only capability despite sitting on a governing surface — see [Roles and the capability matrix](/governing/roles-and-the-capability-matrix/) for the full picture.

## Staged versions and queued revisions

Adding an item whose captured version belongs to a different page is refused, and the message names both page ids. Before 0.24.0 the item was accepted and the publish silently ignored it, taking the page live with none of the fields that looked staged on it. An id naming no captured version at all is still accepted, and publishing that item falls back to making the page’s current state live.

When the version an item carries is a revision waiting in the approvals queue — the copy Kywi forks when someone edits a page that is already live — publishing the changeset now applies it the way approving it would, and the entry leaves the queue. Previously the edit went live and its queue entry stayed behind with nothing left to approve.

## Rollback does not restore what was live before

Rolling back a published changeset does not put the site back the way it looked before the publish. Every created or updated item in it goes back to draft — pulling it off the public site — and every deleted item is restored. The page’s first-published date is left alone on purpose, so that history survives the rollback even though the content itself doesn’t. If a changeset overwrote a page that was already live with something different, rolling back takes that page down; it does not bring the earlier live version back. Use [version history](/governing/version-history-and-rollback/) on the individual page if what you actually want is the content that was live before.
