# Neith Release Operations Runbook

Operational sequences for `@neith/release`.

## Pre-Release Checklist

1. Confirm version plan and release channel.
2. Confirm branch strategy and merge target.
3. Run typecheck, lint, unit tests, and benchmarks.
4. Produce release-candidate evidence when applicable.
5. Prepare checksums, signatures, and rollback plan.
6. Prepare platform-specific metadata for the selected targets.
7. For web releases, attach accessibility audit results and statement output.

## Stable Release Procedure

1. Build the release pipeline definition.
2. Execute pre-check, build, security, and publish stages.
3. Register artifacts in the download infrastructure.
4. Publish CDN, mirror, and package-repository metadata.
5. Advance rollout through the configured rings or percentages.
6. Observe health metrics until completion criteria are met.

## Rollback Procedure

Use `RollbackPlanBuilder`, `RollbackExecutor`, and `AutoRollbackMonitor`.

1. Determine whether deployment or database rollback steps apply.
2. Freeze rollout advancement.
3. Execute rollback steps in order.
4. Invalidate or replace affected CDN and update metadata.
5. Publish operator communication and incident notes.
6. Re-run relevant verification before resuming rollout.

## Security Release Procedure

1. Score the issue severity with the CVSS helpers.
2. Prepare an advisory and affected-version matrix.
3. Create the security release plan and publish only the required channels.
4. Verify signatures, checksums, and compatibility metadata.
5. Communicate embargo or disclosure timing explicitly.

## Distribution Incident Triage

| Incident                        | Primary modules                                       | Response                                                               |
| ------------------------------- | ----------------------------------------------------- | ---------------------------------------------------------------------- |
| broken download links           | `download-infrastructure.ts`, `cdn.ts`                | re-register or invalidate assets, then regenerate page data            |
| mirror drift                    | `mirror-network.ts`                                   | inspect health checks and sync status before traffic shift             |
| checksum/signature mismatch     | `checksum.ts`, `signature.ts`                         | stop promotion, rebuild integrity artifacts, confirm trust policy      |
| update loop or blocked upgrades | `auto-update.ts`, `delta-updates.ts`                  | inspect channel metadata, maintenance windows, and patch applicability |
| enterprise deployment mismatch  | `enterprise-distribution.ts`, `enterprise-catalog.ts` | regenerate environment-specific outputs and approval metadata          |

## Evidence Retention

Retain at least:

- benchmark results
- performance regression status against the certified Phase 52 baseline
- accessibility audit output for web releases
- checksums and signatures
- rollout and rollback reports
- platform-specific submission manifests
