> For the complete documentation index, see [llms.txt](https://sonic-ai-works.gitbook.io/sonic-networks-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sonic-ai-works.gitbook.io/sonic-networks-docs/sonic-1.0.0-rc-production-architecture/operations-and-readiness.md).

# Operations & Readiness

SONIC r30 fail-closed production readiness, exact Prisma migration requirements, cryptographic keyrings, durable workers, reconciliation and recovery.

`SONIC_ENVIRONMENT=production` is a security boundary. Production fails closed rather than silently degrading into development behavior.

## Required production checks

Production readiness requires:

* `mainnet-beta` cluster identity;
* PostgreSQL reachability;
* the exact required Prisma migration set through `202609110004_r30_key_rotation`;
* session and service authentication secrets;
* a current quote signing key ID that resolves in the quote secret keyring;
* external Sale Release signer configuration plus an Ed25519 release verification keyring;
* the active Sale Release hash/signature to verify against its `activationKeyId`;
* external receipt signer configuration plus an Ed25519 receipt verification keyring;
* Payment Kernel, eligibility, effect-verification, and allocation adapters;
* verified Solana genesis, SONIC Token-2022 mint, treasury, and executable programs;
* Pyth/Birdeye production pricing requirements;
* production billing/tax/webhook/storage requirements where enabled;
* representative market data and development seeding disabled.

## Migration-head pinning

r30 does not treat “no failed migration rows” as sufficient. The runtime verifies that every migration required by this architecture revision exists in `_prisma_migrations` and finished successfully.

```mermaid
flowchart LR
  B[r26 core baseline] --> S[r26 Token Sale]
  S --> H[r27 hardening]
  H --> T[r29 activation trust]
  T --> K[r30 key rotation]
  K --> Ready[Production ready]
```

## Key rotation operations

For quote HMAC keys, deploy the new key before making it current and retain the previous key until every quote signed under it has expired. For Ed25519 release/receipt keys, publish the new public key before signer activation and retain historical public keys for as long as historical verification is required.

## Durable sale workers

```mermaid
flowchart LR
  Submitted --> Confirm
  Confirm --> Settle
  Settle --> Reconcile
  Reconcile --> Allocate
  Allocate --> Receipt
  Confirm --> Retry[retry / backoff]
  Settle --> Retry
  Reconcile --> Retry
  Retry --> Confirm
```

Workers claim PostgreSQL outbox jobs with durable lock/retry state. Exhausted sale jobs move to dead-letter / `REQUIRES_REVIEW`; process-local timers are never payment truth.

{% hint style="danger" %}
Mainnet failure never triggers hidden fallback to Devnet, localnet, in-memory sale state, reference pricing, unsigned activation, unknown signing keys, or test merchant configuration.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://sonic-ai-works.gitbook.io/sonic-networks-docs/sonic-1.0.0-rc-production-architecture/operations-and-readiness.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
