Core Concepts
State Locking & Drift Detection
SHA-256 state locking, deployment integrity verification, and drift remediation with nova drift.
NovaServe uses cryptographic state locking to ensure deployment integrity and detect out-of-band infrastructure modifications. Every deployment produces a SHA-256 hash of the compiled Nova IR, stored in .nova/state.json.
The State File
.nova/state.json
{
"version": "1.0.0",
"appName": "my-nova-app",
"target": "aws",
"environment": "production",
"stateHash": "a9f8e7d6c5b4a3928176...",
"lastDeployedAt": "2026-08-15T10:00:00.000Z",
"resources": {
"storage:user-uploads": { "status": "deployed" },
"queue:task-processing": { "status": "deployed" },
"api:post-tasks": { "status": "deployed" }
}
}Drift Detection
When someone modifies a cloud resource outside of NovaServe (e.g., via the AWS Console), the live resource state diverges from the state lock. Run nova drift to detect these discrepancies:
Terminal
nova drift --target awsTo automatically restore cloud resources to match your code's state:
Terminal
nova drift --target aws --fixState Backend Options
Configure the state backend in nova.config.ts:
local(default) — state stored in.nova/state.jsons3— state stored in an S3 bucket for team collaboration
nova.config.ts
export default defineConfig({
state: {
backend: "s3",
lockTable: "novaserve-locks",
},
});