Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/feature-ideation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,18 @@ jobs:
discussions: write
id-token: write
actions: read
uses: petry-projects/.github/.github/workflows/feature-ideation-reusable.yml@897e4dede3518cdd7273b9dc63e607d0d05cbdda # v1
# SANCTIONED RING-RELEASE PIN — documented exception to the stub header's
# "You MUST NOT change … the uses: line" rule. This repo is feature-ideation's
# `next` ring (host-relative canary / dogfood-first), so it pins ONCE to the
# moving `feature-ideation/next` channel tag and rides each promotion in place
# — exercising the candidate (folded-enhancement) reusable ahead of every other
# ring. The channel tag is a first-party mutable ref bounded by the
# feature-ideation/** ruleset on petry-projects/.github, NOT an unpinned action;
# a compliance pass must not "fix" it back to a frozen @vX.Y.Z / @<sha>.
# See AGENTS.md "Release channel tags & the mutable-ref exception" and
# docs/release/versioning.md (ring channels; Cross-repo: feature-ideation).
# Precedent: auto-rebase.yml intentionally pins its reusable @v2 ahead of canon.
uses: petry-projects/.github/.github/workflows/feature-ideation-reusable.yml@feature-ideation/next
with:
# On the `discussion: created` trigger this carries the new Discussion's
# number → the reusable runs single-idea enhancement mode. Empty on
Expand Down
26 changes: 10 additions & 16 deletions tests/test_feature_ideation.bats
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@
# Regression tests for .github/workflows/feature-ideation.yml compliance.
#
# Guards the invariants checked by the weekly org compliance audit
# (check: non-stub-feature-ideation.yml) to prevent re-filing of the
# "reusable not pinned to @v1" finding (#629).
# (check: non-stub-feature-ideation.yml). The stub now pins the reusable to
# the feature-ideation/next channel tag (the sanctioned ring-release
# mechanism — see the mutable-ref exception in AGENTS.md and
# docs/release/versioning.md) rather than the former @v1 SHA (#629).
#
# Run with: bats tests/test_feature_ideation.bats

FEATURE_IDEATION_YML=".github/workflows/feature-ideation.yml"

# Canonical reusable + v1 pin from
# Canonical reusable + channel pin from
# petry-projects/.github/standards/workflows/feature-ideation.yml
REUSABLE="petry-projects/.github/.github/workflows/feature-ideation-reusable.yml"
V1_SHA="897e4dede3518cdd7273b9dc63e607d0d05cbdda"
# The superseded pin the audit flagged (#629).
V2_SHA="376a4fcb1117444595e3e702fa450873d0e54310"
# The candidate (folded-enhancement) ring channel this repo (next/dogfood) pins to.
CHANNEL="feature-ideation/next"

setup() {
# Run tests from repo root so relative paths resolve correctly.
Expand All @@ -29,14 +30,7 @@ setup() {
grep -qF "uses: ${REUSABLE}@" "$FEATURE_IDEATION_YML"
}

@test "feature-ideation.yml pins the reusable to the v1 SHA (compliance-audit check)" {
grep -qF "uses: ${REUSABLE}@${V1_SHA}" "$FEATURE_IDEATION_YML"
}

@test "feature-ideation.yml uses: line is annotated # v1" {
grep -qE "uses: ${REUSABLE}@${V1_SHA}[[:space:]]+# v1" "$FEATURE_IDEATION_YML"
}

@test "feature-ideation.yml is not pinned to the superseded v2 SHA" {
[ -f "$FEATURE_IDEATION_YML" ] && ! grep -qF "$V2_SHA" "$FEATURE_IDEATION_YML"
@test "feature-ideation.yml pins the reusable to the configured channel tag" {
grep -F "uses: ${REUSABLE}@" "$FEATURE_IDEATION_YML"
grep -qF "uses: ${REUSABLE}@${CHANNEL}" "$FEATURE_IDEATION_YML"
}
Loading