feat(artifact): the contract is a digest, and promotion never rebuilds - #16
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the artifact contract (
docs/artifact-contract.md) and its one moving part,cd-promote.yml: givenimage/digest/to_tag, verify the digest exists in ghcr, point the tag at it withimagetools create, read the tag back and fail unless it resolves to exactly that digest.packages: writeis the entire privilege surface — no checkout, no build context.scripts/validate_module.shgains 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: insertingactions/checkoutfails 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