> ## Documentation Index
> Fetch the complete documentation index at: https://doc.blueapi.ir/llms.txt
> Use this file to discover all available pages before exploring further.

# Offline Deployment: Air-Gapped Transfer Protocol

> Full air-gapped deployment flow from research model to production in an isolated environment. Sequence diagram, integrity checks, and acceptance gates.

Offline deployment moves a model from the research environment into an air-gapped production network. This page specifies the full transfer protocol, the sequence of operations, integrity verification, and acceptance gates required before a model serves traffic in isolation.

## Deployment Flow

The pipeline below shows every stage from research artifact to production serving.

```mermaid theme={null}
flowchart TD
    START([START]) --> RESEARCH[Research Model]
    RESEARCH --> VALIDATION[Validation]
    VALIDATION --> SECURITY[Security Review]
    SECURITY --> SIGNING[Artifact Signing]
    SIGNING --> MANIFEST[Release Manifest]
    MANIFEST --> PACKAGE[Secure Transfer Package]
    PACKAGE --> TRANSFER[Offline Transfer]
    TRANSFER --> VERIFY[Integrity Verification]
    VERIFY --> STAGING[Staging]
    STAGING --> ACCEPTANCE[Acceptance Test]
    ACCEPTANCE --> PRODUCTION[Production]
    PRODUCTION --> MONITORING[Monitoring]
    MONITORING --> ROLLBACK{Rollback?}
    ROLLBACK -->|YES| RESTORE[Restore Previous]
    ROLLBACK -->|NO| END_PASS([END: LIVE])
    RESTORE --> END_ROLLBACK([END: ROLLED BACK])
```

## Transfer Sequence Diagram

The sequence below shows the interaction between systems and roles during the offline transfer.

```mermaid theme={null}
sequenceDiagram
    participant RM as ReleaseManager
    participant AS as ArtifactStore
    participant TS as TransferStation
    participant OO as OfflineOperator
    participant ER as EnterpriseRegistry
    participant DM as DeploymentManager

    RM->>AS: Request release artifact
    AS->>RM: Return signed model + manifest
    RM->>TS: Submit transfer package
    TS->>TS: Build secure transfer package
    TS->>OO: Hand off physical / one-way media
    OO->>ER: Import package into air-gap
    ER->>ER: Verify signatures + hashes
    ER->>DM: Request staging deployment
    DM->>DM: Deploy to staging
    DM->>OO: Report staging results
    OO->>ER: Approve production deployment
    ER->>DM: Request production deployment
    DM->>DM: Deploy to production
    DM->>OO: Confirm live status
```

## Secure Transfer Package Contents

Each package contains:

* Signed model weights (see [Secure Model Packaging](/enterprise/secure-model-packaging))
* Release manifest with hashes and signatures
* Dependency bundle pinned to exact versions
* SBOM reference for audit
* Deployment configuration for [DeploymentManager](/deployment/deployment-specification)
* Acceptance test script and dataset sample

## Integrity Verification

OfflineOperator verifies every package before import:

1. Signature validation against the published public key
2. SHA-256 hash comparison for every file in the manifest
3. Dependency bundle hash check
4. SBOM completeness check

Any mismatch aborts the import and triggers a security incident review.

## Acceptance Test

Staging runs a fixed acceptance test suite before production approval:

* Smoke inference on reference prompts
* Latency check against [Performance Validation](/deployment/performance-validation) thresholds
* Benchmark run on the Optimization Set
* Regression check against the current production baseline

<Warning>
  The Hidden Test Set is never used during staging or acceptance. It is reserved for final audit and research evaluation only.
</Warning>

## Monitoring in Air-Gap

Production models in air-gapped environments report metrics to an internal monitoring stack. Log egress is permitted only through a one-way transfer mechanism reviewed by security. No model weights, training data, or inference outputs leave the air-gap.

## Rollback

If monitoring detects regression during production, [DeploymentManager](/deployment/deployment-specification) triggers the rollback protocol defined in [Model Rollback](/enterprise/model-rollback). The previous version is restored from [EnterpriseRegistry](/enterprise/enterprise-model).
