Skip to content

Commit e1f57e4

Browse files
authored
fix: action.yml default meta-repo-ref must be floating major tag (#40)
The `meta-repo-ref` default in .github/actions/drift-check/action.yml was hardcoded to 'v1.7' and never updated when 1.8 and 1.9 shipped. Tool repos consuming the action without explicit override would get the meta-repo checked out at v1.7 regardless of which version of the action they pinned, producing inverse-direction version-signal drift if their signals ever moved past 1.7.0. Fixes by changing the default to 'v1' (the auto-maintained MAJOR floating tag per DTD#14). Future MINORs auto-flow through this default without requiring action.yml edits. Surfaced during the v1.7.0 -> v1.9.0 ecosystem signal rollout when the Home-Lab canary's drift-check failed with 35 inverse-direction warnings: tool signals at 1.9.0 vs action's hardcoded v1.7 meta-VERSION. Adds regression test asserting the default matches floating-major pattern (v[0-9]+) to prevent re-introduction. Refs TMHSDigital/Home-Lab-Developer-Tools#18. Made-with: Cursor Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com>
1 parent a163f1b commit e1f57e4

3 files changed

Lines changed: 27 additions & 3 deletions

File tree

.github/actions/drift-check/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ inputs:
5757
required: false
5858
default: '3.11'
5959
meta-repo-ref:
60-
description: 'git ref of TMHSDigital/Developer-Tools-Directory to use for the checker code. Defaults to v1.7 (latest 1.7.x).'
60+
description: 'git ref of TMHSDigital/Developer-Tools-Directory to use for the checker code. Defaults to v1 (auto-maintained MAJOR floating tag, per DTD#14). Future MINORs auto-flow through this default without requiring action.yml edits.'
6161
required: false
62-
default: 'v1.7'
62+
default: 'v1'
6363
caller-path:
6464
description: 'When mode=self, path inside GITHUB_WORKSPACE that points at the caller checkout. Defaults to "." (root).'
6565
required: false

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.9.0
1+
1.9.1

tests/test_composite_action_shape.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,27 @@ def test_action_sticky_step_does_not_swallow_rc(action_doc):
142142
assert "exit \"$RC\"" not in body and "exit $RC" not in body, (
143143
"sticky step must not propagate its own RC; that's the propagate step's job"
144144
)
145+
146+
147+
def test_meta_repo_ref_default_is_floating_major(action_doc):
148+
"""The meta-repo-ref input must default to a floating MAJOR tag
149+
(v1, v2, ...), never a specific MINOR (v1.7) or PATCH (v1.7.5).
150+
151+
Regression guard for the bug surfaced during the v1.9.0 ecosystem
152+
signal rollout: the default was hardcoded to 'v1.7' and never bumped
153+
when 1.8/1.9 shipped. Tool repos consuming the action without an
154+
explicit ``meta-repo-ref`` override silently checked out the meta-repo
155+
at v1.7, so any tool signals past 1.7.0 produced inverse-direction
156+
version-signal warnings.
157+
158+
Floating-major is the right granularity because DTD#14 auto-maintains
159+
v1 to point at the latest 1.x.y release, so future MINORs auto-flow
160+
through this default with zero action.yml edits.
161+
"""
162+
import re
163+
164+
meta_ref_default = action_doc["inputs"]["meta-repo-ref"]["default"]
165+
assert re.match(r"^v\d+$", meta_ref_default), (
166+
f"meta-repo-ref default must be a floating major tag (v1, v2, ...) "
167+
f"per DTD#14 to avoid stale references; got {meta_ref_default!r}"
168+
)

0 commit comments

Comments
 (0)