Skip to content

feat(artifact): the contract is a digest, and promotion never rebuilds - #16

Merged
rldyourmnd merged 1 commit into
mainfrom
feat/artifact-contract-ghcr
Sep 1, 2026
Merged

feat(artifact): the contract is a digest, and promotion never rebuilds#16
rldyourmnd merged 1 commit into
mainfrom
feat/artifact-contract-ghcr

Conversation

@rldyourmnd

Copy link
Copy Markdown
Contributor

Adds the artifact contract (docs/artifact-contract.md) and its one moving part, cd-promote.yml: given image/digest/to_tag, verify the digest exists in ghcr, point the tag at it with imagetools create, read the tag back and fail unless it resolves to exactly that digest. packages: write is the entire privilege surface — no checkout, no build context.

scripts/validate_module.sh gains a promote block holding that surface closed (required: input regexes, inspect-before-create, read-back; forbidden: checkout, build-push, pull_request_target, secrets:, expression runners) — mutation-tested: inserting actions/checkout fails the validator.

Build once on the fleet (ci-workflows docker-build.yml, registry layer cache), promote by digest, retention cleans untagged manifests. First consumer: the almaty registry build-offload, whose Stage 1 already pushes ghcr.

Closes the estate ledger item cd-artifacts-promote-by-digest-through-ghcr.

https://claude.ai/code/session_01LsGid6U5RrQdFvJmvYdGCF

cd-workflows sealed how a change is approved and applied but never said
what moves. Now it does: a deployable artifact is an OCI image in ghcr
named by content digest, built once on the fleet by ci-workflows'
docker-build, promoted through environments by re-pointing tags at the
same digest -- cd-promote.yml verifies the digest exists before writing
the tag and reads the tag back to prove it resolves to exactly those
bytes. The module validator holds the promotion surface closed: no
checkout, no build-push, no free-form runner, inspect before create.
The almaty registry build-offload is the named first consumer; its
Stage 1 already pushes ghcr, so its digests exist from birth.

Claude-Session: https://claude.ai/code/session_01LsGid6U5RrQdFvJmvYdGCF
@rldyourmnd
rldyourmnd merged commit 06ac994 into main Sep 1, 2026
5 checks passed
@rldyourmnd
rldyourmnd deleted the feat/artifact-contract-ghcr branch September 1, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant