Isaac Emmanuel

2026.11.29

I want the source SHA, image digest, and migration head to agree

A deployment is difficult to trust when source control, container runtime, and database history each describe a different release.

"Production is on the latest version" is not a verifiable statement.

Latest branch? Latest successful build? Latest image tag? Latest database migration? Latest deployment job?

Those can all refer to different points in time.

When I investigate a production issue, I want three identities immediately:

  • The source commit intended for the release.
  • The immutable image digest actually running.
  • The migration head recorded by the database.

If they do not align, application behaviour becomes archaeology.

Branch names are moving pointers

A branch tells me where a line of development points now. It does not identify what a container was built from yesterday.

The release process should capture the full commit SHA and place it in several observable locations:

  • Image labels.
  • Build metadata.
  • Deployment records.
  • Application version endpoint or startup log.
  • Release directory name.

The value should be generated by the build, not typed by an operator.

That allows a production report to say "running commit abc..." rather than "probably current main."

Tags are labels, digests are identities

Container tags are convenient for humans. They can be moved or overwritten.

An image digest identifies the image content. A strong deployment record keeps both:

text
service:2026.11.29 sha256:actual-content-digest source:full-git-sha

The tag communicates intent. The digest proves which bytes the runtime selected. The source label connects those bytes to reviewable code.

If the runtime pulls by tag during every restart, two replicas can eventually run different images under the same deployment description. Pinning the promoted digest removes that ambiguity.

Migration state is a release dependency

The application and database form one compatibility boundary.

New code may expect a column that the database does not have. An old worker may write a value the new schema no longer accepts. A migration may complete while half the application replicas still run the previous contract.

The release needs to declare the expected migration head and compatibility order.

text
expand schema -> deploy compatible application -> migrate data if required -> remove old path in a later release

Trying to make every schema change and application switch happen at one instant creates unnecessary risk.

Verify the runtime, not only the workflow

A successful deployment job proves that the job completed according to its script. It does not automatically prove that every production replica switched to the intended image.

I read back the runtime state:

  • Container image IDs or digests.
  • Replica versions.
  • Migration head.
  • Process start times.
  • Health checks from inside and outside the network.
  • Logs after the deployment boundary.

This catches stale replicas, old workers, failed pulls, and deployments that completed before readiness.

Preserve a release manifest

A compact manifest makes later investigation much easier:

json
{ "sourceSha": "...", "imageDigest": "sha256:...", "migrationHead": "...", "deployedAt": "...", "environment": "production" }

Secrets do not belong in it. References to configuration versions or secret names may, depending on the system.

The manifest can be attached to the build, stored with the release directory, and emitted by a protected version endpoint.

Rollback needs the same alignment

Rolling back application code without considering the database can be worse than staying on the new release.

Before promotion, I want to know:

  • Whether the migration is backward compatible.
  • Which previous image digest is the rollback target.
  • Whether background workers share the same compatibility range.
  • Whether the rollback requires restoring data.
  • What writes may be lost if restoration is required.

"Use the previous tag" is not enough if the tag moved or the schema crossed a one-way boundary.

Provenance shortens incidents

Most of this work is unglamorous. It adds labels, records identifiers, and performs readback after automation says it succeeded.

During an incident, those details answer the first question quickly: what is actually running?

Once source SHA, image digest, and migration head agree, investigation can focus on the behaviour of one known release. When they disagree, the disagreement is already a finding worth fixing.