| name | commit-discipline |
| description | Always register VM snapshots in the commit ledger. Use when committing/snapshotting VMs, before destroying VMs, during deploys, or when creating golden images. Ensures no snapshot goes untracked. |
Commit Discipline
Every vers_vm_commit MUST be followed by a commit ledger registration. No exceptions.
When to Register
- Before deploys — pre-deploy backup snapshot
- After deploys — post-deploy working state
- Before destroying agent VMs — preserve session for forensics
- Golden image builds — the golden commit
- Any manual snapshot — if you committed it, register it
How
After vers_vm_commit returns a commit ID:
curl -s -X POST "https://<INFRA_VM_ADDRESS>:3000/commits" \
-H "Authorization: Bearer $VERS_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"commitId": "<commit-id-from-vers>",
"vmId": "<vm-id>",
"label": "<human-readable description>",
"agent": "<your-agent-name>",
"tags": ["<relevant>", "<tags>"]
}'
Tag Conventions
| Tag | When |
|---|
golden | Golden image commits |
pre-deploy | Before deploying to a VM |
post-deploy | After successful deploy |
agent-session |