---
title: "Keep the previous release's manifest · Agent Wranglers"
url: https://agentwranglers.se/playbook/testing/output-comparison/keep-previous-manifest
updated: 2026-10-21
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Keep the previous release's manifest

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers). Updated 2026-10-21.

For AI agents: [llms.txt](https://agentwranglers.se/llms.txt) is a short guide that sends you to the rules your problem needs, and [rules.json](https://agentwranglers.se/playbook/testing/rules.json) holds every rule of this playbook as JSON.

- Level: Required
- Chapter: [Output comparison](https://agentwranglers.se/playbook/testing/output-comparison)
- Rule: Keep the manifest and live snapshot of each of the last five releases. Diff every new release against the one before it, and roll back to a release whose manifest you know.
- Risk: The app down or unusable
- How: Store both files in the release folder that the [one-step deploy](https://agentwranglers.se/playbook/engineering/build-test-and-deploy/atomic-deploys-with-rollback) keeps. After a rollback, a live snapshot that matches the old release's snapshot proves the old version is back. The manifest also lists the hashed assets that [keep the previous build's assets](https://agentwranglers.se/playbook/website/site-architecture/keep-the-previous-build-s-assets) carries forward.
- Check: Each of the last five release folders holds a manifest and a live snapshot. A rollback test deploys, rolls back and fails unless the new live snapshot equals the stored one.

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### JavaScript example

```js
import { readFileSync } from 'node:fs'
import { isDeepStrictEqual } from 'node:util'

const stored = JSON.parse(readFileSync('/srv/site/releases/20261020-a1b2c3/live.json', 'utf8'))
const current = await snapshot(stored.map(entry => entry.url))
if (!isDeepStrictEqual(stored, current)) throw new Error('Rollback did not restore the previous output')
```

### Python example

```python
import json

stored = json.load(open("/srv/site/releases/20261020-a1b2c3/live.json"))
current = [fetch(entry["url"]) for entry in stored]
if stored != current:
    raise SystemExit("Rollback did not restore the previous output")
```

## Related rules

- [Deploy in one step and roll back by itself](https://agentwranglers.se/playbook/engineering/build-test-and-deploy/atomic-deploys-with-rollback) in Engineering
- [Keep the previous build's assets](https://agentwranglers.se/playbook/website/site-architecture/keep-the-previous-build-s-assets) in Website

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/testing/output-comparison/keep-previous-manifest">Agent Wranglers testing playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Compare environments with the same release](https://agentwranglers.se/playbook/testing/output-comparison/compare-environments)
- [Output comparison](https://agentwranglers.se/playbook/testing/output-comparison)
