@atlashub/smartstack-cli 1.18.0 → 1.20.0

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": "@atlashub/smartstack-cli",
3
- "version": "1.18.0",
3
+ "version": "1.20.0",
4
4
  "description": "SmartStack Claude Code automation toolkit - GitFlow, APEX, EF Core migrations, prompts and more",
5
5
  "author": {
6
6
  "name": "SmartStack",
@@ -206,8 +206,20 @@ AskUserQuestion:
206
206
  **If user chooses "Yes":**
207
207
  ```bash
208
208
  git push origin $CURRENT
209
- PUSHED="yes"
210
- echo "✅ Pushed to origin/$CURRENT"
209
+
210
+ # CRITICAL: Verify push and update tracking refs
211
+ git fetch origin $CURRENT:refs/remotes/origin/$CURRENT --force --quiet
212
+ LOCAL_SHA=$(git rev-parse HEAD)
213
+ REMOTE_SHA=$(git rev-parse origin/$CURRENT)
214
+ if [ "$LOCAL_SHA" = "$REMOTE_SHA" ]; then
215
+ PUSHED="yes"
216
+ echo "✅ Pushed and verified - origin/$CURRENT in sync"
217
+ else
218
+ PUSHED="partial"
219
+ echo "⚠️ Push may have failed - refs mismatch"
220
+ echo " Local: $LOCAL_SHA"
221
+ echo " Remote: $REMOTE_SHA"
222
+ fi
211
223
  ```
212
224
 
213
225
  **If user chooses "No":**
@@ -126,6 +126,20 @@ if [ "$BRANCH_TYPE" = "release" ] || [ "$BRANCH_TYPE" = "hotfix" ]; then
126
126
  }
127
127
 
128
128
  git push origin develop
129
+
130
+ # CRITICAL: Verify push and update tracking refs
131
+ git fetch origin develop:refs/remotes/origin/develop --force --quiet
132
+ LOCAL_SHA=$(git rev-parse HEAD)
133
+ REMOTE_SHA=$(git rev-parse origin/develop)
134
+ if [ "$LOCAL_SHA" = "$REMOTE_SHA" ]; then
135
+ echo "✅ Push verified - local/remote in sync"
136
+ else
137
+ echo "⚠️ Push verification FAILED"
138
+ echo " Local: $LOCAL_SHA"
139
+ echo " Remote: $REMOTE_SHA"
140
+ echo " → Try: git push origin develop --force-with-lease"
141
+ fi
142
+
129
143
  echo "✅ Merged back to develop"
130
144
  fi
131
145
  ```
@@ -149,6 +163,18 @@ if [ "$BRANCH_TYPE" = "release" ]; then
149
163
  git commit -m "chore: bump version to $NEXT_VERSION for development"
150
164
  git push origin develop
151
165
 
166
+ # CRITICAL: Verify push and update tracking refs
167
+ git fetch origin develop:refs/remotes/origin/develop --force --quiet
168
+ LOCAL_SHA=$(git rev-parse HEAD)
169
+ REMOTE_SHA=$(git rev-parse origin/develop)
170
+ if [ "$LOCAL_SHA" = "$REMOTE_SHA" ]; then
171
+ echo "✅ Push verified - local/remote in sync"
172
+ else
173
+ echo "⚠️ Push verification FAILED"
174
+ echo " Local: $LOCAL_SHA"
175
+ echo " Remote: $REMOTE_SHA"
176
+ fi
177
+
152
178
  echo "✅ Version bumped to $NEXT_VERSION"
153
179
  fi
154
180
  ```
@@ -172,12 +172,17 @@ esac
172
172
  ### 8. Verify Merge
173
173
 
174
174
  ```bash
175
- git fetch origin
175
+ # CRITICAL: Force update tracking refs to get accurate state
176
+ git fetch origin $TARGET_BRANCH:refs/remotes/origin/$TARGET_BRANCH --force --quiet
177
+ git fetch origin --prune --quiet
178
+
176
179
  MERGED=$(git branch -r --merged origin/$TARGET_BRANCH | grep "$CURRENT" | wc -l)
177
180
 
178
181
  [ "$MERGED" -eq 0 ] && {
179
- echo "⚠️ Merge verification failed"
180
- # Check if PR is actually merged
182
+ echo "⚠️ Merge verification failed - branch may not be merged"
183
+ echo " → Check PR status on remote"
184
+ } || {
185
+ echo "✅ Merge verified - branch merged to $TARGET_BRANCH"
181
186
  }
182
187
  ```
183
188
 
@@ -58,6 +58,16 @@ REMOTE_EXISTS=$(git branch -r --list "origin/$CURRENT")
58
58
  [ -z "$REMOTE_EXISTS" ] && {
59
59
  echo "Branch not pushed to remote. Pushing..."
60
60
  git push -u origin $CURRENT
61
+
62
+ # CRITICAL: Verify push and update tracking refs
63
+ git fetch origin $CURRENT:refs/remotes/origin/$CURRENT --force --quiet
64
+ LOCAL_SHA=$(git rev-parse HEAD)
65
+ REMOTE_SHA=$(git rev-parse origin/$CURRENT)
66
+ if [ "$LOCAL_SHA" != "$REMOTE_SHA" ]; then
67
+ echo "⚠️ Push verification failed - local/remote mismatch"
68
+ STOP
69
+ fi
70
+ echo "✅ Push verified - branch in sync"
61
71
  }
62
72
 
63
73
  # Check for uncommitted changes
@@ -157,7 +157,18 @@ git checkout -b "$FULL_BRANCH"
157
157
  **ALWAYS push immediately after branch creation:**
158
158
  ```bash
159
159
  git push -u origin "$FULL_BRANCH"
160
- echo "✅ Branch pushed to origin/$FULL_BRANCH"
160
+
161
+ # CRITICAL: Verify push and update tracking refs
162
+ git fetch origin $FULL_BRANCH:refs/remotes/origin/$FULL_BRANCH --force --quiet
163
+ LOCAL_SHA=$(git rev-parse HEAD)
164
+ REMOTE_SHA=$(git rev-parse origin/$FULL_BRANCH)
165
+ if [ "$LOCAL_SHA" = "$REMOTE_SHA" ]; then
166
+ echo "✅ Branch pushed and verified - origin/$FULL_BRANCH in sync"
167
+ else
168
+ echo "⚠️ Push verification failed"
169
+ echo " Local: $LOCAL_SHA"
170
+ echo " Remote: $REMOTE_SHA"
171
+ fi
161
172
  ```
162
173
 
163
174
  ### 7. Create Local Environment Config (Backend + Frontend)
@@ -69,6 +69,18 @@ Sync Status: {CURRENT}
69
69
  [ "$AHEAD" -gt 0 ] && {
70
70
  echo "Pushing $AHEAD commit(s) to origin/$CURRENT..."
71
71
  git push origin $CURRENT
72
+
73
+ # CRITICAL: Verify push and update tracking refs
74
+ git fetch origin $CURRENT:refs/remotes/origin/$CURRENT --force --quiet
75
+ LOCAL_SHA=$(git rev-parse HEAD)
76
+ REMOTE_SHA=$(git rev-parse origin/$CURRENT)
77
+ if [ "$LOCAL_SHA" = "$REMOTE_SHA" ]; then
78
+ echo "✅ Push verified - local/remote in sync"
79
+ else
80
+ echo "⚠️ Push verification FAILED - refs may be stale"
81
+ echo " Local: $LOCAL_SHA"
82
+ echo " Remote: $REMOTE_SHA"
83
+ fi
72
84
  }
73
85
  ```
74
86
 
@@ -153,6 +165,18 @@ fi
153
165
  if [ "$REBASED" = true ]; then
154
166
  echo "Rebase complete. Force pushing..."
155
167
  git push --force-with-lease origin $CURRENT
168
+
169
+ # CRITICAL: Verify push and update tracking refs
170
+ git fetch origin $CURRENT:refs/remotes/origin/$CURRENT --force --quiet
171
+ LOCAL_SHA=$(git rev-parse HEAD)
172
+ REMOTE_SHA=$(git rev-parse origin/$CURRENT)
173
+ if [ "$LOCAL_SHA" = "$REMOTE_SHA" ]; then
174
+ echo "✅ Force push verified - local/remote in sync"
175
+ else
176
+ echo "⚠️ Force push verification FAILED"
177
+ echo " Local: $LOCAL_SHA"
178
+ echo " Remote: $REMOTE_SHA"
179
+ fi
156
180
  fi
157
181
  ```
158
182