Converge the Dockerfile generators with testing and pin them in CI - #163
Merged
Conversation
The generator layer had drifted: testing gained the (version, source_mode) split in July, master never did. That is what made generator_checks a testing-only job and left master unable to produce a context-sourced image with a real ENV version. Takes testing's four generator files verbatim -- both generate_dockerfile.sh and both test_generate_dockerfile.sh -- so the layer is now byte-identical across branches rather than approximately similar. The minimal generator's default php moves 8.4 -> 8.5 as part of that, because the decoupling and the default bump landed in the same upstream commit and the minimal harness asserts 8.5. This corrects stale config rather than changing what ships: every released image is the testing-built php85 one, so master's committed 8.4 default only ever affected container-validation and local `docker build`. Committed Dockerfiles regenerated via `make update_version VERSION=20260820-001`. The only substantive change is that php default; the rest is comment punctuation. The -fsSL guard on the schema fetch survives the regeneration (asserted by the full-stack harness). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…-key skew - generator_checks runs both harnesses on PRs and fails if either leaves a committed Dockerfile modified. The generators are load-bearing for the release path but nothing pinned them on master. - Adds the php 8.5 variant, which is the minimal image's default and the one GA actually promotes, yet was unvalidated here. - Fixes a name/key skew that made the matrix misleading: job simplerisk-minimal-php84 built php 8.3 and was labelled "PHP 8.3", and simplerisk-minimal-php85 built 8.4. Keys, labels and build args now agree. CLAUDE.md's CI/CD bullet still claimed jammy/noble/php81/php83; corrected along with the stale php_version build-arg list. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Description
Closes the generator divergence between
masterandtesting. The(version, source_mode)split landed ontestingin July (#147) and never came tomaster, which is whygenerator_checkswas a testing-only job and whymastercould not produce a context-sourced image carrying a realENV version.Commit 1 — converge the generators. Takes
testing's four generator files verbatim, so the layer is now byte-identical across branches rather than approximately similar:Commit 2 — container-validation. Adds
generator_checks(both harnesses + a guard that fails if either leaves a committed Dockerfile modified), adds the php 8.5 variant, and fixes a name/key skew.The PHP 8.4 → 8.5 default
Called out because it's the only behavioural change here. The minimal generator's
source_modesplit and its default bump landed in the same upstream commit, and the minimal harness assertsARG php_version=8.5— so the port can't take one without the other.This corrects stale config rather than changing what customers get: every released image is the testing-built php85 one that GA promotes, so
master's committed 8.4 default only ever affectedcontainer-validationand a localdocker build. Consequences are (a) a localdocker build simplerisk-minimal/now defaults to 8.5, and (b) container-validation gains a php 8.5 job — which is the variant GA actually ships and was previously unvalidated on master.The job-key skew
Master's matrix was mislabelled in a way that made it misleading to read:
simplerisk-minimal-php84simplerisk-minimal-php85Now
php83/php84/php85each build and are labelled for their own version. (Fixed ontestinginec196ce; this brings the fix across.)What this deliberately does NOT do
Not a
testing → mastermerge. I trial-merged it: 11 conflicts, three of which silently undo this week's work if resolved carelessly —testing'spush-to-dockerhub.ymlstill carries thepush: mastertrigger that caused the 20260820-001 failure, and itspromote-latest.ymlis the old minimal-only version with no GHCR mirror. The merge base is still81cb9e2(July), because this repo has always landed shared changes as separate cherry-picks on each branch.Resetting that merge base is still worth doing, but as its own deliberate exercise right after an RC cut when the branches are closest — not as a side effect of closing a four-file gap.
Release Notes
No customer-facing change. Build tooling only. The minimal image's default PHP on a local build moves 8.4 → 8.5, matching the published image.
Manual Validation Steps
./simplerisk/test_generate_dockerfile.sh→ 14 checksok, exit 0../simplerisk-minimal/test_generate_dockerfile.sh→ 11 checksok, exit 0.git diff --quiet -- simplerisk/Dockerfile simplerisk-minimal/Dockerfileafter running both → clean (this is whatgenerator_checksguards).make update_version VERSION=20260820-001→ exit 0, no churn../simplerisk/generate_dockerfile.sh <V> context→ no downloader stage, realENV version=<V>.generator_checks.Type of Change
Testing Results
make update_version; the only substantive diff is the php default — everything else is comment punctuation. Verified line by line.-fsSLguard on the schema fetch survives the regeneration (asserted by the full-stack harness): without--fail, curl writes a 404 body into/simplerisk.sqland the image ships an HTML error page as its schema.make update_version VERSION=20260820-001→ exit 0 and idempotent.actionlintclean on all remaining workflows.shellcheck -S error(CI's gate) clean on all tracked scripts.CIA Impact Check
MAY negatively impact Confidentiality, Integrity and/or Availability.
Justification for the change
master.master.Potential impact on Confidentiality, Integrity and/or Availability
Integrity (net positive). Both generators are now pinned by harnesses in CI, and the guard catches a generator that dirties a committed Dockerfile. The
-fsSLschema-fetch guard is now asserted rather than incidental.Availability (low, local-build only). A local
docker build simplerisk-minimal/with no--build-argnow produces php 8.5 instead of 8.4. Anyone relying on the implicit default gets a different PHP. Published images are unaffected — they are built fromtesting, which has defaulted to 8.5 since July. Mitigated by the explicitphp_versionbuild arg, which is how CI and the release builds already pin it.Confidentiality. No change. No new secrets, permissions, or network egress;
generator_checksrunscontents: readwith no registry credentials.Additional Implementation Steps
None. No schema change, no customer action. Anyone with local build scripts that assumed the 8.4 default should pass
--build-arg php_version=8.4explicitly.