Skip to content

rules(delivery): carried-forward releases — retag unchanged images instead of rebuilding - #293

Merged
elronbandel merged 1 commit into
mainfrom
elron/repo-versioning-policy-2611e7
Aug 9, 2026
Merged

rules(delivery): carried-forward releases — retag unchanged images instead of rebuilding#293
elronbandel merged 1 commit into
mainfrom
elron/repo-versioning-policy-2611e7

Conversation

@elronbandel

Copy link
Copy Markdown
Contributor

Resolves #292.

What

Doctrine-only PR ratifying carried-forward releases: a release retags an unchanged image from the prior release's digest instead of rebuilding it, keyed on a recorded build-input hash.

  • .agents/delivery/RULES.md — five new rules:
    • 11 Build inputs: context + in-repo base inputs + resolved external-base digests. (Folding external digests in makes an upstream base bump a changed input — CVE refreshes rebuild naturally.)
    • 12 Recorded inputs: every published image records its build-input hash in its image config.
    • 13 Carried-forward images: unchanged inputs ⇒ retag the prior digest, never rebuild.
    • 14 Fail dirty: absent/unreadable/mismatched hash ⇒ treated as changed.
    • 15 Gate parity: carrying forward exempts nothing from release gates (keeps trivy honest, Shrink the runtime base images to cut CVE surface (distroless / Chainguard / trimmed Debian) #247).
  • .agents/RULES.md principle 9 — one clarifying sentence: a release tag MAY point at an earlier release's digest when build inputs are unchanged. Refines, not repeals, "different tag, different bits" (changelog entry records the reading).

Why

Every tag rebuilds ~438 images today, and because builds aren't reproducible, each rebuild of an unchanged artifact ships different bits under the new version — drift the fleet already carries silently (v0.1.0: ~6,400 stale combos, discovered only by hand-inspecting GHCR, #233). Retagging the byte-identical digest is stricter immutability, and the release workflow already uses the mechanism for :latest promotion ("imagetools copies the full manifest incl. provenance/SBOM — no rebuild").

Prior art: answers the silent-staleness objection that closed #241 (content hash + fail-dirty, not path mapping); implements the change-detection follow-up #168 lists; supersedes the judgment-based skip_published knob (#227) once implementation lands.

Compliance until implementation

Rule 14 makes full rebuilds compliant today: while no hash is recorded, every image reads as changed. Implementation follows in small PRs: hash primitive + offline static test → label stamping → freshness status → selective retag + docs page.

Rules checked against

  • .agents/contributing/RULES.md 1–3 (resolves an RFC issue; rules-only PR; this section).
  • .agents/meta/rules/RULES.md 4, 6–7, 9–14 (one home; format; addressable; changelog rows; no silent drift; concise/atomic/example-free).
  • .agents/delivery/RULES.md 5–7 untouched (trigger, version-agreement gate, crates immutability unchanged).

…stead of rebuilding (#292)

Add delivery rules 11-15: an image's build inputs are its context + in-repo
base inputs + resolved external-base digests (11); every published image
records a build-input hash in its config (12); a released image with
unchanged inputs is retagged from the prior release's digest, never rebuilt
(13); an absent/unreadable/mismatched hash counts as changed (14); carrying
forward exempts nothing from release gates (15).

Principle 9 gains the matching carve-out: a release tag MAY point at a
digest produced by an earlier release when build inputs are unchanged.
This refines, not repeals, 'different tag, different bits' — carrying the
byte-identical digest forward is stricter immutability than a
non-reproducible rebuild (v0.1.0 shipped ~6,400 silently stale combos,
found only by hand: #233).

Keying on a content hash with fail-dirty answers the silent-staleness
objection that closed #241; #168 lists this change-detection matrix as
its blessed follow-up. Folding external-base digests into the inputs
makes an upstream base bump a changed input, so CVE refreshes rebuild
naturally (#247 interlock via rule 15).

Rules-only PR per contributing/RULES.md rule 2; implementation follows
in small PRs (hash primitive + static test, label stamping, freshness
status, selective retag).

Resolves #292

Signed-off-by: Elron Bandel <elron.bandel@ibm.com>
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.

rfc: delivery/RULES.md — carried-forward releases: retag unchanged images instead of rebuilding

1 participant