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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cli-jaw",
3
- "version": "2.17.5",
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
- deadline=$((SECONDS + 1200))
161
- MAIN_TESTS_URL=""
162
- while [ "$SECONDS" -lt "$deadline" ]; do
163
- MAIN_TESTS_URL="$(gh run list \
164
- --workflow test.yml \
165
- --branch main \
166
- --commit "$MERGED_MAIN_SHA" \
167
- --event push \
168
- --status success \
169
- --limit 1 --json url --jq '.[0].url // ""')"
170
- [ -n "$MAIN_TESTS_URL" ] && break
171
- failed="$(gh run list \
172
- --workflow test.yml \
173
- --branch main \
174
- --commit "$MERGED_MAIN_SHA" \
175
- --event push \
176
- --status completed \
177
- --limit 1 --json conclusion --jq '.[0].conclusion // ""')"
178
- case "$failed" in
179
- failure|cancelled|timed_out|startup_failure|action_required)
180
- echo "ERROR: main Tests completed with $failed" >&2
181
- exit 1
182
- ;;
183
- esac
184
- sleep 10
185
- done
186
- if [ -z "$MAIN_TESTS_URL" ]; then
187
- echo "ERROR: timed out waiting for successful main Tests" >&2
188
- exit 1
189
- fi
190
-
191
- deadline=$((SECONDS + 1200))
192
- MAIN_PLATFORM_URL=""
193
- while [ "$SECONDS" -lt "$deadline" ]; do
194
- MAIN_PLATFORM_URL="$(gh run list \
195
- --workflow postinstall-platform.yml \
196
- --branch main \
197
- --commit "$MERGED_MAIN_SHA" \
198
- --event push \
199
- --status success \
200
- --limit 1 --json url --jq '.[0].url // ""')"
201
- [ -n "$MAIN_PLATFORM_URL" ] && break
202
- failed="$(gh run list \
203
- --workflow postinstall-platform.yml \
204
- --branch main \
205
- --commit "$MERGED_MAIN_SHA" \
206
- --event push \
207
- --status completed \
208
- --limit 1 --json conclusion --jq '.[0].conclusion // ""')"
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