@wipcomputer/wip-ai-devops-toolbox 1.9.71-alpha.4 → 1.9.71-alpha.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/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.9.71-alpha.6 (2026-04-05)
4
+
5
+ Guard 1.9.72: allow git stash push on main to unblock native untracked-file escape hatch
6
+
7
+ ## 1.9.71-alpha.5 (2026-04-05)
8
+
9
+ Guard 1.9.72: allow git stash push on main to unblock native untracked-file escape hatch
10
+
11
+ ## 1.9.72-alpha.1 (2026-04-05)
12
+
13
+ ### wip-branch-guard
14
+
15
+ Allow `git stash push` / `git stash save` / bare `git stash` on main. Stashing is non-destructive (drop/pop/clear remain blocked in DESTRUCTIVE_PATTERNS). This closes the loop where an untracked file in main's working tree blocks `git pull` and every clearing command (rm, mv, git stash, git clean, git reset) is also blocked, leaving no native escape hatch. Agents and humans lost hours to this.
16
+
17
+ Error message now points at the stash workaround explicitly so future sessions don't loop:
18
+
19
+ ```
20
+ STUCK clearing an untracked file before git pull? Use stash (non-destructive):
21
+ git stash push -u -- <path>
22
+ git pull
23
+ git stash list
24
+ ```
25
+
3
26
  ## 1.9.71-alpha.4 (2026-04-04)
4
27
 
5
28
  Guard: allow cp/mv/mkdir hotfixes to deployed extensions
@@ -0,0 +1,30 @@
1
+ # v1.9.72-alpha.1
2
+
3
+ ## wip-branch-guard: unblock native escape hatch for clearing untracked files on main
4
+
5
+ **Problem.** When an untracked file exists in main's working tree (for example, content Parker saved manually before a PR merged, or a deployed artifact the pipeline dropped there), `git pull` refuses to proceed because it would overwrite the untracked file. Every command that could clear the file was blocked by the guard: `rm`, `mv`, `git stash push`, `git clean`, `git reset`, `git restore`. No native escape hatch existed. Agents (and humans) lost hours looping: retry rm, retry mv, tool-swap to Write/Edit to bypass the guard, rationalize, spiral. One session today burned $936 on the loop before the bug was isolated.
6
+
7
+ **Fix.** Add `git stash push` / `git stash save` / bare `git stash` to `ALLOWED_GIT_PATTERNS`. Stashing is non-destructive because `git stash drop`, `git stash pop`, and `git stash clear` remain in `DESTRUCTIVE_PATTERNS` (blocked on any branch). The stash survives as a safety net; nothing is ever lost.
8
+
9
+ **New workflow for this failure mode:**
10
+
11
+ ```
12
+ git stash push -u -- path/to/untracked-file # move untracked file aside
13
+ git pull # pulls cleanly
14
+ git stash list # file preserved in stash
15
+ ```
16
+
17
+ **Error message improvement.** The `WORKFLOW_ON_MAIN` block now includes a concrete, copy-pasteable stash workaround so future sessions don't loop. LLMs and humans both follow concrete commands more reliably than abstract workflow steps.
18
+
19
+ **Test coverage added.** `test.sh` now asserts `git stash push`, `git stash save`, and bare `git stash` all return `allow`. All 33 tests pass.
20
+
21
+ ## Why this matters
22
+
23
+ This is the third time in five days that the guard loop has trapped a session. The prior bug files (`ai/product/bugs/guard/2026-04-03--cc-mini--guard-blocks-readonly-bash-loops.md`, `2026-04-05--cc-mini--branch-guard-compaction-loop.md`) document the pattern. This fix closes one specific failure mode (untracked-stub-blocks-pull). Other guard loop failure modes remain and will be addressed separately.
24
+
25
+ ## Files changed
26
+
27
+ - `tools/wip-branch-guard/guard.mjs`: two new `ALLOWED_GIT_PATTERNS` entries, expanded `WORKFLOW_ON_MAIN` with stash workaround
28
+ - `tools/wip-branch-guard/package.json`: 1.9.71 -> 1.9.72
29
+ - `tools/wip-branch-guard/test.sh`: three new passing test cases
30
+ - `CHANGELOG.md`: entry for 1.9.72-alpha.1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wipcomputer/wip-ai-devops-toolbox",
3
- "version": "1.9.71-alpha.4",
3
+ "version": "1.9.71-alpha.6",
4
4
  "type": "module",
5
5
  "description": "The complete AI DevOps toolkit for AI-assisted development teams.",
6
6
  "license": "MIT",
@@ -89,6 +89,8 @@ const ALLOWED_GIT_PATTERNS = [
89
89
  /\bgit\s+worktree\b/,
90
90
  /\bgit\s+stash\s+list\b/, // read-only, just lists stashes
91
91
  /\bgit\s+stash\s+show\b/, // read-only, just shows stash contents
92
+ /\bgit\s+stash\s+(push|save)\b/, // saving to stash is non-destructive; drop/pop/clear blocked in DESTRUCTIVE_PATTERNS
93
+ /\bgit\s+stash\s*$/, // bare "git stash" = "git stash push"; same safety
92
94
  /\bgit\s+remote\b/,
93
95
  /\bgit\s+describe\b/,
94
96
  /\bgit\s+tag\b/,
@@ -156,7 +158,12 @@ Step 6: Back in main repo: git pull
156
158
  Step 7: wip-release patch (with RELEASE-NOTES on the branch, not after)
157
159
  Step 8: deploy-public.sh to sync public repo
158
160
 
159
- Release notes go ON the feature branch, committed with the code. Not as a separate PR.`.trim();
161
+ Release notes go ON the feature branch, committed with the code. Not as a separate PR.
162
+
163
+ STUCK clearing an untracked file before git pull? Use stash (non-destructive):
164
+ git stash push -u -- <path> # move untracked file aside
165
+ git pull # pulls cleanly
166
+ git stash list # file is preserved in stash, not lost`.trim();
160
167
 
161
168
  const WORKFLOW_NOT_WORKTREE = `
162
169
  You're on a branch but not in a worktree. Use a worktree so the main working tree stays clean.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wipcomputer/wip-branch-guard",
3
- "version": "1.9.70",
3
+ "version": "1.9.72",
4
4
  "description": "PreToolUse hook that blocks all writes on main branch. Forces agents to work on branches or worktrees.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -98,6 +98,9 @@ test_case "git checkout branch" allow Bash "git checkout feature-branch"
98
98
  test_case "git worktree add" allow Bash "git worktree add .worktrees/repo--branch -b feat"
99
99
  test_case "git stash list" allow Bash "git stash list"
100
100
  test_case "git stash show" allow Bash "git stash show"
101
+ test_case "git stash push -u" allow Bash "git stash push -u -- path/to/file"
102
+ test_case "git stash save" allow Bash "git stash save 'message'"
103
+ test_case "bare git stash" allow Bash "git stash"
101
104
  test_case "git restore --staged" allow Bash "git restore --staged file.txt"
102
105
  test_case "ls command" allow Bash "ls -la"
103
106
  test_case "grep command" allow Bash "grep -r pattern ."