fix(scaffold): derive meta-repo action pins from VERSION#72
Merged
Conversation
Workflow action refs in generated tool repos were hardcoded literals (drift-check@v1.9, release-doc-sync@v1), so every newly scaffolded repo was born pinned to a stale meta-repo train. Hand-correcting one repo (Blender @v1.9 -> @v1.15) treated the symptom; the source kept minting stale refs. Derive all three pins from the live meta VERSION at generation time: - drift-check -> @v{MAJOR}.{MINOR} (MAJOR.MINOR train) - release-doc-sync -> @v{MAJOR} (MAJOR train) - meta-repo-ref -> v{MAJOR}.{MINOR}.{PATCH} (full current release tag) A repo scaffolded after any future meta release is now born current instead of stale. The validate.yml scaffold regression checks and the ci-cd.md drift-check pin example are likewise derive-from-current rather than hardcoded. Also fixes a stale test that asserted the release-doc-sync default was v1.0 (it is v1, the floating-major train, since #43). Scope: newly generated repos only; existing-repo ref bumps remain the periodic standards re-stamp's job. Signed-off-by: fOuttaMyPaint <154358121+TMHSDigital@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
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.
Summary
Root-cause fix for stale meta-repo action refs in the scaffold. The
.j2workflow templates emitted hardcoded pins (
drift-check@v1.9,release-doc-sync@v1), so every repo created bycreate-tool.pywas bornpinned to a stale meta train. The Blender reconcile (
@v1.9 -> @v1.15) fixedone repo by hand; this fixes the source so it stops happening.
All three pins are now derived from the live meta
VERSIONat generationtime (read via a new
read_meta_version()increate-tool.py):drift-checkaction ref@v{MAJOR}.{MINOR}@v1.16release-doc-syncaction ref@v{MAJOR}@v1release.ymlmeta-repo-refinputv{MAJOR}.{MINOR}.{PATCH}v1.16.1Hardcoding today's number would just move the staleness forward one release;
deriving removes it permanently.
Changes
scaffold/create-tool.py: readVERSION, exposemeta_major/minor/patchto templates.scaffold/templates/drift-check.yml.j2,release.yml.j2: use the derived pins; addmeta-repo-ref..github/workflows/validate.yml: scaffold regression greps now derive the expected refs fromVERSIONinstead of asserting hardcoded literals.standards/ci-cd.md: drift-check pin example switched from@v1.9to derive-from-current language.tests/test_release_doc_sync.py: fix a stale test that asserted therelease-doc-syncdefault wasv1.0(it has beenv1, the floating-major train, since fix: change release-doc-sync default meta-repo-ref to v1 #43).VERSION: 1.16.0 -> 1.16.1 (required by the version-bump-check guard).Scope
Newly generated repos only. Existing tool-repo ref bumps remain the periodic standards re-stamp's job and are intentionally not swept here.
Test plan
create-tool.pyagainst the currentVERSION(1.16.1): output resolves todrift-check@v1.16,release-doc-sync@v1,meta-repo-ref: v1.16.1.v1.9/v1.9.1occurrences; all 6 workflows parse as valid YAML.pytest tests/green (212 passed, 1 skipped; the previously-failing stale-ref test now passes).scripts/sync_from_registry.py --checkclean (registry.json untouched).