> For the complete documentation index, see [llms.txt](https://docs.nxcframework.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nxcframework.net/configuring/publishing.md).

# Publishing and rolling back

> **Partly available.** `nxc_config` is implemented and running: drafts, atomic publication, and rollback all work. **The interface for using them is not built yet** — it arrives with `nxc_devtools` — so today this describes what the service does rather than something you can click.

## The workflow

```
Draft → Validate → Preview impact → Publish → Broadcast change
      → Apply by declared reload behavior → Monitor → Roll back if required
```

## Drafts

A draft is an edited but unpublished change. **It has no runtime effect.**

This separation is what makes configuration safe to edit on a live server: an operator can prepare a set of related changes and publish them together, rather than having each keystroke take effect.

## Validation

Runs the field's declared rules plus any cross-field rules. Publication is impossible until validation passes.

Cross-field rules matter: a minimum above a maximum is valid for each field individually and invalid together.

## Impact preview

Shows what changes, which scopes are affected, and what the reload behavior is for each field — **before** publication.

An operator must know what a change will cost before making it. A change requiring a resource restart during peak hours is a different decision from one applying immediately.

## Publication

| Property   | Behavior                                                       |
| ---------- | -------------------------------------------------------------- |
| Atomic     | All fields in a publication apply, or none                     |
| Idempotent | A retried publication with the same key does not publish twice |
| Audited    | Actor, capability, before and after, correlation ID            |
| Versioned  | Values are recorded per publication, never overwritten         |

**The change event carries the changed keys, not the values.** Consumers re-resolve. This is deliberate: an event carrying values would replicate sensitive configuration to every subscriber.

## Capabilities

```
config.resource.view       read effective values, including non-client-visible ones
config.resource.edit       create and modify drafts
config.resource.publish    publish a validated draft
config.resource.rollback   restore a prior publication
```

Scoped per resource, so a business owner may edit their own business scope without touching server-wide values.

## High-risk changes

Fields classified high-risk support approval requirements, scheduled publication, maintenance windows, and automatic snapshots.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.nxcframework.net/configuring/publishing.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
