cli-jaw 2.17.5 → 2.17.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/scripts/promote-to-main.sh +50 -60
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cli-jaw",
|
|
3
|
-
"version": "2.17.
|
|
3
|
+
"version": "2.17.6",
|
|
4
4
|
"description": "Personal AI assistant powered by Pi, Antigravity, AI-E, Claude, Claude E, Codex, Codex App, Cursor, Grok, Kiro, OpenCode, and Copilot — Web, Terminal, Telegram, and Discord interfaces with 107 built-in skills",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -157,66 +157,55 @@ if [ "$MERGED_VERSION" != "$STABLE_VERSION" ]; then
|
|
|
157
157
|
exit 1
|
|
158
158
|
fi
|
|
159
159
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
case "$failed" in
|
|
210
|
-
failure|cancelled|timed_out|startup_failure|action_required)
|
|
211
|
-
echo "ERROR: main Postinstall Platform Checks completed with $failed" >&2
|
|
212
|
-
exit 1
|
|
213
|
-
;;
|
|
214
|
-
esac
|
|
215
|
-
sleep 10
|
|
216
|
-
done
|
|
217
|
-
if [ -z "$MAIN_PLATFORM_URL" ]; then
|
|
218
|
-
echo "ERROR: timed out waiting for successful main Postinstall Platform Checks" >&2
|
|
219
|
-
exit 1
|
|
160
|
+
# ─── Tree-identity fast path (260819 release-speed) ─────────────────────────
|
|
161
|
+
# A squash merge onto an unmoved main produces a commit whose TREE equals the
|
|
162
|
+
# promotion PR head's tree — the exact tree the PR's required checks already
|
|
163
|
+
# certified (branch protection accepts PR-head evidence; strict=false). When
|
|
164
|
+
# the trees match, the main push CI re-run carries no new information, so the
|
|
165
|
+
# release does not wait for it. When they differ (main advanced between PR
|
|
166
|
+
# creation and merge, so the squash re-applied onto a new base), that is a
|
|
167
|
+
# tree nobody tested: fail closed into the original wait loops.
|
|
168
|
+
git fetch origin "+refs/pull/*/head:refs/remotes/origin/pr/*" 2>/dev/null || true
|
|
169
|
+
MERGED_TREE="$(git rev-parse "$MERGED_MAIN_SHA^{tree}")"
|
|
170
|
+
CERTIFIED_TREE="$(git rev-parse "$PROMOTION_COMMIT^{tree}" 2>/dev/null || echo "")"
|
|
171
|
+
CERTIFIED_SHA=""
|
|
172
|
+
if [ -n "$CERTIFIED_TREE" ] && [ "$MERGED_TREE" = "$CERTIFIED_TREE" ]; then
|
|
173
|
+
CERTIFIED_SHA="$PROMOTION_COMMIT"
|
|
174
|
+
echo "tree-identity: merge $MERGED_MAIN_SHA tree matches certified PR head $PROMOTION_COMMIT; skipping the main CI wait"
|
|
175
|
+
else
|
|
176
|
+
echo "tree-identity: MISMATCH (main advanced during promotion?) — falling back to the main CI wait"
|
|
177
|
+
wait_for_main_run() {
|
|
178
|
+
local workflow="$1" label="$2" url="" failed=""
|
|
179
|
+
local deadline=$((SECONDS + 1200))
|
|
180
|
+
while [ "$SECONDS" -lt "$deadline" ]; do
|
|
181
|
+
url="$(gh run list \
|
|
182
|
+
--workflow "$workflow" \
|
|
183
|
+
--branch main \
|
|
184
|
+
--commit "$MERGED_MAIN_SHA" \
|
|
185
|
+
--event push \
|
|
186
|
+
--status success \
|
|
187
|
+
--limit 1 --json url --jq '.[0].url // ""')"
|
|
188
|
+
[ -n "$url" ] && { echo "$label certified by: $url" >&2; return 0; }
|
|
189
|
+
failed="$(gh run list \
|
|
190
|
+
--workflow "$workflow" \
|
|
191
|
+
--branch main \
|
|
192
|
+
--commit "$MERGED_MAIN_SHA" \
|
|
193
|
+
--event push \
|
|
194
|
+
--status completed \
|
|
195
|
+
--limit 1 --json conclusion --jq '.[0].conclusion // ""')"
|
|
196
|
+
case "$failed" in
|
|
197
|
+
failure|cancelled|timed_out|startup_failure|action_required)
|
|
198
|
+
echo "ERROR: main $label completed with $failed" >&2
|
|
199
|
+
return 1
|
|
200
|
+
;;
|
|
201
|
+
esac
|
|
202
|
+
sleep 10
|
|
203
|
+
done
|
|
204
|
+
echo "ERROR: timed out waiting for successful main $label" >&2
|
|
205
|
+
return 1
|
|
206
|
+
}
|
|
207
|
+
wait_for_main_run test.yml "Tests"
|
|
208
|
+
wait_for_main_run postinstall-platform.yml "Postinstall Platform Checks"
|
|
220
209
|
fi
|
|
221
210
|
|
|
222
211
|
LIVE_MAIN_SHA="$(git ls-remote origin refs/heads/main | cut -f1)"
|
|
@@ -230,6 +219,7 @@ gh workflow run publish.yml \
|
|
|
230
219
|
-f version="$STABLE_VERSION" \
|
|
231
220
|
-f tag=latest \
|
|
232
221
|
-f expected-sha="$MERGED_MAIN_SHA" \
|
|
222
|
+
${CERTIFIED_SHA:+-f certified-sha="$CERTIFIED_SHA"} \
|
|
233
223
|
-f dry-run=false \
|
|
234
224
|
-f create-github-release=true
|
|
235
225
|
|