Skip to content

Commit 9fc6b14

Browse files
intel352claude
andauthored
fix: stop false-positive core detection in release-all workflow (#89)
* fix: stop false-positive core detection in release-all workflow The auto-bump-modules workflow runs `go mod tidy` on root, which changes go.sum and potentially go.mod. These lockfile/tidy changes were counted as "core changes" on subsequent release-all runs, causing: 1. Spurious core releases every run 2. Module releases stuck behind the core release chain (release-modules-no-core-change skipped because core_changed=true) Fixes: - Exclude go.sum from core change detection (lockfile, not source) - Exclude cmd/* from core change detection (tooling, not library) - Add configwatcher and eventlogger to module-release dropdown Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: address PR review — remove cmd/* exclusion, align release.yml - Remove cmd/* exclusion from release-all.yml core detection since cmd/ is part of the root module and not independently versioned - Align release.yml core detection to also exclude go.sum, keeping both workflows consistent Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 42f5fa5 commit 9fc6b14

3 files changed

Lines changed: 14 additions & 6 deletions

File tree

.github/workflows/module-release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ on:
1212
- auth
1313
- cache
1414
- chimux
15+
- configwatcher
1516
- database
1617
- eventbus
18+
- eventlogger
1719
- httpclient
1820
- httpserver
1921
- jsonschema

.github/workflows/release-all.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
echo "Latest core tag: $LATEST_TAG"
4343
HAS_CHANGES=false
4444
if [ -z "$LATEST_TAG" ]; then
45-
FILE=$(find . -maxdepth 1 -type f \( -name '*.go' -o -name 'go.mod' -o -name 'go.sum' \) | head -1 || true)
45+
FILE=$(find . -maxdepth 1 -type f \( -name '*.go' -o -name 'go.mod' \) | head -1 || true)
4646
if [ -n "$FILE" ]; then HAS_CHANGES=true; fi
4747
else
4848
CHANGED=$(git diff --name-only ${LATEST_TAG}..HEAD | grep -v '^modules/' || true)
@@ -53,8 +53,10 @@ jobs:
5353
[[ $f == *.md ]] && continue
5454
[[ $f == .github/* ]] && continue
5555
[[ $f == examples/* ]] && continue
56-
# Accept .go plus root go.mod/go.sum (allow optional leading ./)
57-
if [[ $f == *.go ]] || [[ $f == go.mod ]] || [[ $f == go.sum ]] || [[ $f == ./go.mod ]] || [[ $f == ./go.sum ]]; then
56+
# Accept .go plus root go.mod (NOT go.sum — it's a lockfile that
57+
# changes whenever auto-bump runs go mod tidy and should not
58+
# trigger a new core release by itself).
59+
if [[ $f == *.go ]] || [[ $f == go.mod ]] || [[ $f == ./go.mod ]]; then
5860
RELEVANT+="$f "
5961
fi
6062
done <<< "$CHANGED"

.github/workflows/release.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,9 @@ jobs:
6363
echo "Latest core tag: ${LATEST_TAG:-<none>}"
6464
CHANGED=false
6565
if [ -z "$LATEST_TAG" ]; then
66-
# No prior release; treat as changed if any go files or go.mod/go.sum exist (initial release scenario)
67-
if git ls-files '*.go' 'go.mod' 'go.sum' | grep -v '^modules/' | head -n1 >/dev/null 2>&1; then CHANGED=true; fi
66+
# No prior release; treat as changed if any go files or go.mod exist (initial release scenario).
67+
# go.sum is excluded — it's a lockfile that changes on every go mod tidy.
68+
if git ls-files '*.go' 'go.mod' | grep -v '^modules/' | head -n1 >/dev/null 2>&1; then CHANGED=true; fi
6869
else
6970
DIFF=$(git diff --name-only ${LATEST_TAG}..HEAD | grep -v '^modules/' || true)
7071
RELEVANT=""
@@ -74,7 +75,10 @@ jobs:
7475
[[ $f == *.md ]] && continue
7576
[[ $f == .github/* ]] && continue
7677
[[ $f == examples/* ]] && continue
77-
if [[ $f == *.go ]] || [[ $f == go.mod ]] || [[ $f == go.sum ]] || [[ $f == ./go.mod ]] || [[ $f == ./go.sum ]]; then
78+
# Accept .go plus root go.mod (NOT go.sum — it's a lockfile that
79+
# changes whenever auto-bump runs go mod tidy and should not
80+
# trigger a new core release by itself).
81+
if [[ $f == *.go ]] || [[ $f == go.mod ]] || [[ $f == ./go.mod ]]; then
7882
RELEVANT+="$f "
7983
fi
8084
done <<< "$DIFF"

0 commit comments

Comments
 (0)