# Deployment Operations Design

Phase 1 deployment operations track readiness, backup snapshots, update runs, and rollback points.

## Readiness Categories

- application installation
- environment configuration
- database connectivity
- Redis connectivity
- queue worker availability
- scheduler availability
- license heartbeat
- signed update key
- filesystem permissions
- marketplace package compatibility

## Update Safety State

```text
update run
  -> backup snapshot
  -> rollback point
  -> signed manifest
  -> migration execution
  -> health verification
  -> completion report
```

## Database Tables

| Table | Purpose |
|---|---|
| `deployment_environments` | Runtime mode, version, endpoints, and environment metadata |
| `deployment_health_checks` | Latest and historical readiness results |
| `backup_snapshots` | File/database backup records |
| `update_runs` | Update attempt lifecycle |
| `rollback_points` | Restore points tied to backups and update runs |

## Release Rule

A package is deployment-safe only when:

- marketplace manifest validates
- module manifest validates
- environment example validates
- release manifest is signed
- zip contains every manifest file
- zip excludes secrets and generated build folders

