Skip to content

Commit ccc0889

Browse files
committed
fix(ci): build engine before miner publish, auto-merge release-please PRs
publish-miner.yml's validate job never built @loopover/engine before building miner, even though miner imports it -- engine's dist/ is gitignored, so this failed with "Cannot find module '@loopover/engine'" the first time miner's build actually exercised that import. Mirrors the existing build step already in publish-mcp.yml. Also auto-merge release-please's own Release PRs (autorelease: pending label only) once CI is green, so multiple packages' Release PRs spend less time open simultaneously -- they all share one .release-please-manifest.json, so any one merging stales every other open Release PR's copy of that file.
1 parent b3cb3c9 commit ccc0889

2 files changed

Lines changed: 32 additions & 0 deletions

File tree

.github/workflows/mcp-release-please.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,29 @@ jobs:
156156
fi
157157
done
158158
159+
# All four packages share ONE .release-please-manifest.json (separate-pull-requests: true still
160+
# means every component reads/writes that same file), so merging any one component's Release PR
161+
# immediately makes every OTHER open Release PR's copy of that file stale, surfacing as a GitHub
162+
# merge conflict -- confirmed live 2026-07-23: PR #8146 (engine-and-dependents) went CONFLICTING
163+
# the moment PR #8145 (ui-kit) merged, purely from manifest-file drift, no real content collision.
164+
# release-please self-heals this by regenerating/force-pushing its own branches on every run, but
165+
# only once someone merges the SIBLING PR that caused the conflict -- the actual fix is shrinking
166+
# the window multiple Release PRs can sit open at once. Auto-merging them the moment CI goes green
167+
# does that: GitHub's own auto-merge only fires once every required check (including this repo's
168+
# full CI suite) passes, so this adds no less scrutiny than a human clicking merge -- it just
169+
# removes the wait for a human to notice. Scoped to the exact "autorelease: pending" label
170+
# release-please's own action applies, so this can never touch a contributor or maintainer PR.
171+
- name: Auto-merge this run's own Release PRs once CI is green
172+
env:
173+
GH_TOKEN: ${{ secrets.RELEASE_PLEASE_TOKEN }}
174+
run: |
175+
set -euo pipefail
176+
numbers="$(gh pr list --repo "$GITHUB_REPOSITORY" --state open --label "autorelease: pending" --json number --jq '.[].number')"
177+
for number in $numbers; do
178+
echo "Enabling auto-merge on release-please PR #$number."
179+
gh pr merge "$number" --repo "$GITHUB_REPOSITORY" --auto --squash || echo "::warning::Could not enable auto-merge on #$number (already enabled, or not yet mergeable) -- continuing."
180+
done
181+
159182
# release-please creates the component tag + GitHub Release with GITHUB_TOKEN, which (by
160183
# GitHub's recursion-prevention rule) does NOT fire push/tag-based workflows. workflow_dispatch
161184
# IS exempt from that rule, so dispatch the OIDC publish workflow explicitly, telling it

.github/workflows/publish-miner.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,15 @@ jobs:
8989
- name: Install dependencies
9090
run: npm ci
9191

92+
# packages/loopover-miner imports @loopover/engine (lib/ams-policy.ts and others). That package's
93+
# dist/ is gitignored (see ci.yml's own build --workspace @loopover/engine step, and
94+
# publish-mcp.yml's identical step for the same reason) -- without building it first, miner's own
95+
# build below fails with "Cannot find module '@loopover/engine' or its corresponding type
96+
# declarations" (TS2307), confirmed live when this validate job actually got exercised for the
97+
# first time against miner code that imports engine.
98+
- name: Build loopover-engine
99+
run: npm run build --workspace @loopover/engine
100+
92101
# Real tsc build (in-place emit -- see packages/loopover-miner/tsconfig.json; the emitted .js/.d.ts
93102
# is gitignored, so this is the only place it ever exists), same as ci.yml's own "Build miner CLI"
94103
# step, followed by node --check syntax validation over every bin/lib file (the same two-part

0 commit comments

Comments
 (0)