# com.lopecode.bundle.version

> Published by [larkworthy.bsky.social](https://lexicon.garden/identity/did:plc:j7nm3lrd5h7fm3sfhcv3lhfv)

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:j7nm3lrd5h7fm3sfhcv3lhfv/com.lopecode.bundle.version)
- [Documentation](https://lexicon.garden/lexicon/did:plc:j7nm3lrd5h7fm3sfhcv3lhfv/com.lopecode.bundle.version/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:j7nm3lrd5h7fm3sfhcv3lhfv/com.lopecode.bundle.version/examples)

## Definitions

### `com.lopecode.bundle.version`

**Type**: `record`

An append-only snapshot of a com.lopecode.bundle record taken at the moment immediately before that bundle was overwritten. Snapshots keep prior blob refs reachable from the current MST so the PDS does not garbage-collect them, and form a parent-pointer DAG via previousVersion. Snapshot rkeys are `<bundleRkey>--<tid>` so all snapshots for one bundle share a common rkey prefix and can be retrieved with a server-side range query.

**Key**: `any`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `record` | `unknown` | Yes | Verbatim copy of the prior bundle's value, inlined so its embedded blob refs remain reachable from the current MST. Forward-compatible: future com.lopecode.bundle field additions require no schema changes here. |
| `versionOf` | `string` (at-uri) | Yes | AT-URI of the live com.lopecode.bundle record this snapshot was taken from (same did, same bundle rkey). Redundant with the rkey prefix but kept for self-describing snapshots. |
| `previousVersion` | `string` (at-uri) | No | AT-URI of the snapshot that this snapshot descends from, forming a parent pointer chain. Null/absent on the first snapshot in a chain. Multiple snapshots may share the same previousVersion (forks). |

## Raw Schema

```json
{
  "id": "com.lopecode.bundle.version",
  "defs": {
    "main": {
      "key": "any",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "versionOf",
          "record"
        ],
        "properties": {
          "record": {
            "type": "unknown",
            "description": "Verbatim copy of the prior bundle's value, inlined so its embedded blob refs remain reachable from the current MST. Forward-compatible: future com.lopecode.bundle field additions require no schema changes here."
          },
          "versionOf": {
            "type": "string",
            "format": "at-uri",
            "description": "AT-URI of the live com.lopecode.bundle record this snapshot was taken from (same did, same bundle rkey). Redundant with the rkey prefix but kept for self-describing snapshots."
          },
          "previousVersion": {
            "type": "string",
            "format": "at-uri",
            "description": "AT-URI of the snapshot that this snapshot descends from, forming a parent pointer chain. Null/absent on the first snapshot in a chain. Multiple snapshots may share the same previousVersion (forks)."
          }
        }
      },
      "description": "An append-only snapshot of a com.lopecode.bundle record taken at the moment immediately before that bundle was overwritten. Snapshots keep prior blob refs reachable from the current MST so the PDS does not garbage-collect them, and form a parent-pointer DAG via previousVersion. Snapshot rkeys are `<bundleRkey>--<tid>` so all snapshots for one bundle share a common rkey prefix and can be retrieved with a server-side range query."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
