---
title: Updates and Reconciliation
description: "## The update pending state When GOCSM detects a newer version of a snippet from GitHub, it stores the new source code in a staging field and sets `update_pending = true`. The snippet continues to run from the previous version…"
url: "https://brightleafdigital.io/docs/updates-and-reconciliation/"
updated: "2026-10-20"
category: GravityOps Code Snippet Manager / Github Collections
---

# Updates and Reconciliation

## The update pending state

When GOCSM detects a newer version of a snippet from GitHub, it stores the new source code in a staging field and sets `update_pending = true`. The snippet continues to run from the previous version until you apply the update.

A badge appears in the snippets list on the row for any snippet with a pending update. It reads **Update available**, or **Update available: review required** for warning severity. The badge color reflects severity: neutral for none, blue for info, yellow/orange for warning. The row also has a **View Update** action.

## The reconciliation modal

Click the badge or **View Update** (or the **Review & Apply Update** button on the snippet edit screen) to open the reconciliation modal.

The modal shows three sections:

- **Added variables** — New config variables in the updated snippet, with their default values. They are added with those defaults; set your own values in the **Configuration** panel after applying.
- **Removed variables** — Config variables that were removed. If you had a saved value for any of these, it is highlighted as a warning.
- **Preserved Variables** — Config variables that exist in both versions with the same name.

The modal also shows the source diff, version transition, and changelog link when the manifest provides one.

## Applying an update

Click **Apply Update** in the modal. GOCSM:

1. Replaces `source_code` with the staged version.
2. Preserves removed config rows as orphaned values.
3. Adds placeholder config rows for newly added variables.
4. If the snippet is active, regenerates the file immediately.
5. Clears the `update_pending` flag.

If you click **Cancel**, close the modal, or press Escape, the pending state remains. The snippet stays on the previous version until you apply the update or a later sync replaces the staged pending update.
