@boyingliu01/xp-gate 0.38.3 → 0.38.4

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.
@@ -140,10 +140,11 @@ fi
140
140
  # Runs in BOTH modes. Docs-only commits read the staged DIFF (hunk cost)
141
141
  # instead of every full blob — a marker line must be ADDED to matter, so
142
142
  # '^+' minus '+++' headers is the precise scope.
143
+ # Exactly 7 chars + a space/EOL boundary: longer runs (Maven `====` log separators, RST/setext underlines) are not conflicts.
143
144
  CONFLICT_MARKER_FILES=""
144
145
  if [ "${GATE_12_DOCS_ONLY:-false}" = true ]; then
145
146
  if git diff --cached --no-color --diff-filter=d 2>/dev/null \
146
- | grep -E '^\+' | grep -v '^+++' | grep -qE '^\+(<<<<<<<|=======|>>>>>>>)'; then
147
+ | grep -E '^\+' | grep -v '^+++' | grep -qE '^\+(<{7}|={7}|>{7})([[:space:]]|$)'; then
147
148
  CONFLICT_MARKER_FILES="$STAGED_FILES"
148
149
  fi
149
150
  else
@@ -154,7 +155,7 @@ while IFS= read -r file; do
154
155
  continue
155
156
  fi
156
157
  # Check for conflict markers in staged content
157
- if git show ":$file" 2>/dev/null | grep -qE '^(<<<<<<<|=======|>>>>>>>)'; then
158
+ if git show ":$file" 2>/dev/null | grep -qE '^(<{7}|={7}|>{7})([[:space:]]|$)'; then
158
159
  CONFLICT_MARKER_FILES="$CONFLICT_MARKER_FILES $file"
159
160
  fi
160
161
  done <<EOF
@@ -140,10 +140,11 @@ fi
140
140
  # Runs in BOTH modes. Docs-only commits read the staged DIFF (hunk cost)
141
141
  # instead of every full blob — a marker line must be ADDED to matter, so
142
142
  # '^+' minus '+++' headers is the precise scope.
143
+ # Exactly 7 chars + a space/EOL boundary: longer runs (Maven `====` log separators, RST/setext underlines) are not conflicts.
143
144
  CONFLICT_MARKER_FILES=""
144
145
  if [ "${GATE_12_DOCS_ONLY:-false}" = true ]; then
145
146
  if git diff --cached --no-color --diff-filter=d 2>/dev/null \
146
- | grep -E '^\+' | grep -v '^+++' | grep -qE '^\+(<<<<<<<|=======|>>>>>>>)'; then
147
+ | grep -E '^\+' | grep -v '^+++' | grep -qE '^\+(<{7}|={7}|>{7})([[:space:]]|$)'; then
147
148
  CONFLICT_MARKER_FILES="$STAGED_FILES"
148
149
  fi
149
150
  else
@@ -154,7 +155,7 @@ while IFS= read -r file; do
154
155
  continue
155
156
  fi
156
157
  # Check for conflict markers in staged content
157
- if git show ":$file" 2>/dev/null | grep -qE '^(<<<<<<<|=======|>>>>>>>)'; then
158
+ if git show ":$file" 2>/dev/null | grep -qE '^(<{7}|={7}|>{7})([[:space:]]|$)'; then
158
159
  CONFLICT_MARKER_FILES="$CONFLICT_MARKER_FILES $file"
159
160
  fi
160
161
  done <<EOF
@@ -17,6 +17,20 @@
17
17
  # on - there is no copy left in the hook.
18
18
  # ============================================================================
19
19
 
20
+ # #809: Windows caps one env var at 32767 chars. A large merge's staged list can
21
+ # exceed that; exporting it then makes Windows-native children (pytest+syrupy
22
+ # restoring os.environ) raise ValueError, which Gate 5 misreads as Tests FAILED.
23
+ # XP_STAGED_ACM is only the #640 fork cache and every consumer falls back to
24
+ # `git diff --cached` when it is unset -- so export only when it fits, else drop.
25
+ export_staged_acm_cache() {
26
+ if [ "${#1}" -le 32767 ]; then
27
+ XP_STAGED_ACM="$1"
28
+ export XP_STAGED_ACM
29
+ else
30
+ unset XP_STAGED_ACM
31
+ fi
32
+ }
33
+
20
34
  # ============================================================================
21
35
  # Gate 0: Version Consistency Check (Protected Branches)
22
36
  # ============================================================================
@@ -88,8 +102,7 @@ has_changelog_change=false
88
102
  # A cache that is only warm on some branches is not a cache, it is a branch-wide
89
103
  # behaviour difference. Assign it before anything can branch.
90
104
  STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM)
91
- XP_STAGED_ACM="$STAGED_FILES"
92
- export XP_STAGED_ACM
105
+ export_staged_acm_cache "$STAGED_FILES"
93
106
 
94
107
  if [ "$is_protected" = "true" ]; then
95
108
  # Env var bypass: SKIP_VERSION_CHECK=1 skips Gate 0 entirely
@@ -89,7 +89,16 @@ function normaliseChannels(raw) {
89
89
  * @returns {{ config?: object, error?: string }}
90
90
  */
91
91
  function readMachineConfig(home) {
92
- const root = home || os.homedir();
92
+ // Resolve through HOME first, exactly like shared-paths' resolveHomeDir().
93
+ // `os.homedir()` DELIBERATELY ignores process.env.HOME on Windows (it reads
94
+ // USERPROFILE instead -- measured: pointing HOME at a temp dir leaves
95
+ // os.homedir() unchanged), so a caller that sandboxed a test by setting HOME
96
+ // still read the developer's REAL ~/.config here. That made a real machine's
97
+ // `channels: ["external"]` leak into tests: nativeEnabled went false, Qoder
98
+ // deployment was skipped, and three assertions failed for a reason unrelated
99
+ // to the code under test. Same precedence as shared-paths keeps ONE answer to
100
+ // "where is home" in this package.
101
+ const root = home || process.env.HOME || process.env.USERPROFILE || os.homedir();
93
102
  const file = path.join(root, '.config', 'xp-gate', '.delphi-config.json');
94
103
  if (!fs.existsSync(file)) return {};
95
104
  try {
@@ -2,6 +2,6 @@
2
2
  "verdict": "PASS",
3
3
  "license_type": "MIT",
4
4
  "sha256": "0e7ac423bf2c6e223b7c5b156f8cf72da49d748e56a1641402c31f22ad07dbb5",
5
- "checked_at": "2026-11-14T12:48:21.495Z",
5
+ "checked_at": "2026-11-14T23:06:48.655Z",
6
6
  "source": "network"
7
7
  }
@@ -3,7 +3,7 @@
3
3
  **Generated:** 2026-11-04
4
4
  **Commit:** eb2097b0
5
5
  **Branch:** sprint/2026-11-03-02
6
- **Version:** 0.38.3.0
6
+ **Version:** 0.38.4.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Mock layering policy enforcement — Gate M3 of pre-push hook. Ensures integration tests use real implementations for internal dependencies, mock external dependencies, and annotate pending mocks with removal plans. Combines project scope scanning, mock decision engine, and per-file validation into a single pipeline.
@@ -3,7 +3,7 @@
3
3
  **Generated:** 2026-11-04
4
4
  **Commit:** eb2097b0
5
5
  **Branch:** sprint/2026-11-03-02
6
- **Version:** 0.38.3.0
6
+ **Version:** 0.38.4.0
7
7
 
8
8
  ## OVERVIEW
9
9
  **Gate M** (incremental mutation testing) + **Gate M2** helpers (test-layer detection used by `src/mock-policy/`). Pre-push quality gate. TypeScript-only; uses Stryker.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boyingliu01/xp-gate",
3
- "version": "0.38.3",
3
+ "version": "0.38.4",
4
4
  "description": "AI-driven development workflow: 6 quality gates + Delphi review + Sprint Flow",
5
5
  "bin": {
6
6
  "xp-gate": "bin/xp-gate.js"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xp-gate",
3
- "version": "0.38.3",
3
+ "version": "0.38.4",
4
4
  "displayName": "XP-Gate",
5
5
  "description": "Extreme Programming quality gates + AI workflow skills for Claude Code. Includes 12 pre-commit gates (Gate 0-11), 8 pre-push gates, Sprint Flow (6 phases), and Delphi multi-expert review (>=90% consensus).",
6
6
  "author": {
@@ -3,7 +3,7 @@
3
3
  **Generated:** 2026-11-04
4
4
  **Commit:** eb2097b0
5
5
  **Branch:** sprint/2026-11-03-02
6
- **Version:** 0.38.3.0
6
+ **Version:** 0.38.4.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Delphi Consensus Review — multi-round anonymous expert review (≥90% threshold, exactly 3 experts with distinct executable model IDs). Supports design, requirements, and code-walkthrough modes.
@@ -3,7 +3,7 @@
3
3
  **Generated:** 2026-11-04
4
4
  **Commit:** eb2097b0
5
5
  **Branch:** sprint/2026-11-03-02
6
- **Version:** 0.38.3.0
6
+ **Version:** 0.38.4.0
7
7
 
8
8
  ## OVERVIEW
9
9
  **6-phase** development pipeline (v2.0 compact redesign, Issue #290): PREP → DESIGN → BUILD → VERIFY → SHIP → CLOSE. Phase 3/6 BUILD default build mode is **ralph-loop** (REQ-level iteration, 40-67% token savings vs parallel). HARD-GATE between DESIGN (2/6) and BUILD (3/6): design must pass Delphi review (≥90% consensus) before any coding.
@@ -3,7 +3,7 @@
3
3
  **Generated:** 2026-11-04
4
4
  **Commit:** eb2097b0
5
5
  **Branch:** sprint/2026-11-03-02
6
- **Version:** 0.38.3.0
6
+ **Version:** 0.38.4.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boyingliu01/dsh-plugin-xp-gate",
3
- "version": "0.38.3",
3
+ "version": "0.38.4",
4
4
  "description": "XP-Gate deterministic quality gates + AI workflow skills as a DeepSeek Harness (DSH) native plugin: gate-check / gate-principles / gate-arch tools + 12 SKILL.md skills",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -3,7 +3,7 @@
3
3
  **Generated:** 2026-11-04
4
4
  **Commit:** eb2097b0
5
5
  **Branch:** sprint/2026-11-03-02
6
- **Version:** 0.38.3.0
6
+ **Version:** 0.38.4.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Delphi Consensus Review — multi-round anonymous expert review (≥90% threshold, exactly 3 experts with distinct executable model IDs). Supports design, requirements, and code-walkthrough modes.
@@ -3,7 +3,7 @@
3
3
  **Generated:** 2026-11-04
4
4
  **Commit:** eb2097b0
5
5
  **Branch:** sprint/2026-11-03-02
6
- **Version:** 0.38.3.0
6
+ **Version:** 0.38.4.0
7
7
 
8
8
  ## OVERVIEW
9
9
  **6-phase** development pipeline (v2.0 compact redesign, Issue #290): PREP → DESIGN → BUILD → VERIFY → SHIP → CLOSE. Phase 3/6 BUILD default build mode is **ralph-loop** (REQ-level iteration, 40-67% token savings vs parallel). HARD-GATE between DESIGN (2/6) and BUILD (3/6): design must pass Delphi review (≥90% consensus) before any coding.
@@ -3,7 +3,7 @@
3
3
  **Generated:** 2026-11-04
4
4
  **Commit:** eb2097b0
5
5
  **Branch:** sprint/2026-11-03-02
6
- **Version:** 0.38.3.0
6
+ **Version:** 0.38.4.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boyingliu01/opencode-plugin",
3
- "version": "0.38.3",
3
+ "version": "0.38.4",
4
4
  "type": "module",
5
5
  "main": "index.ts",
6
6
  "description": "XP-Gate quality gates + AI workflow skills for OpenCode",
@@ -3,7 +3,7 @@
3
3
  **Generated:** 2026-11-04
4
4
  **Commit:** eb2097b0
5
5
  **Branch:** sprint/2026-11-03-02
6
- **Version:** 0.38.3.0
6
+ **Version:** 0.38.4.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Delphi Consensus Review — multi-round anonymous expert review (≥90% threshold, exactly 3 experts with distinct executable model IDs). Supports design, requirements, and code-walkthrough modes.
@@ -3,7 +3,7 @@
3
3
  **Generated:** 2026-11-04
4
4
  **Commit:** eb2097b0
5
5
  **Branch:** sprint/2026-11-03-02
6
- **Version:** 0.38.3.0
6
+ **Version:** 0.38.4.0
7
7
 
8
8
  ## OVERVIEW
9
9
  **6-phase** development pipeline (v2.0 compact redesign, Issue #290): PREP → DESIGN → BUILD → VERIFY → SHIP → CLOSE. Phase 3/6 BUILD default build mode is **ralph-loop** (REQ-level iteration, 40-67% token savings vs parallel). HARD-GATE between DESIGN (2/6) and BUILD (3/6): design must pass Delphi review (≥90% consensus) before any coding.
@@ -3,7 +3,7 @@
3
3
  **Generated:** 2026-11-04
4
4
  **Commit:** eb2097b0
5
5
  **Branch:** sprint/2026-11-03-02
6
- **Version:** 0.38.3.0
6
+ **Version:** 0.38.4.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xp-gate",
3
- "version": "0.38.3",
3
+ "version": "0.38.4",
4
4
  "displayName": "XP-Gate",
5
5
  "description": "Extreme Programming quality gates + AI workflow skills for Qoder. Includes 12 pre-commit gates (Gate 0-11), 8 pre-push gates, Sprint Flow (6 phases), and Delphi multi-expert review (>=90% consensus).",
6
6
  "author": {
@@ -3,7 +3,7 @@
3
3
  **Generated:** 2026-11-04
4
4
  **Commit:** eb2097b0
5
5
  **Branch:** sprint/2026-11-03-02
6
- **Version:** 0.38.3.0
6
+ **Version:** 0.38.4.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Delphi Consensus Review — multi-round anonymous expert review (≥90% threshold, exactly 3 experts with distinct executable model IDs). Supports design, requirements, and code-walkthrough modes.
@@ -3,7 +3,7 @@
3
3
  **Generated:** 2026-11-04
4
4
  **Commit:** eb2097b0
5
5
  **Branch:** sprint/2026-11-03-02
6
- **Version:** 0.38.3.0
6
+ **Version:** 0.38.4.0
7
7
 
8
8
  ## OVERVIEW
9
9
  **6-phase** development pipeline (v2.0 compact redesign, Issue #290): PREP → DESIGN → BUILD → VERIFY → SHIP → CLOSE. Phase 3/6 BUILD default build mode is **ralph-loop** (REQ-level iteration, 40-67% token savings vs parallel). HARD-GATE between DESIGN (2/6) and BUILD (3/6): design must pass Delphi review (≥90% consensus) before any coding.
@@ -3,7 +3,7 @@
3
3
  **Generated:** 2026-11-04
4
4
  **Commit:** eb2097b0
5
5
  **Branch:** sprint/2026-11-03-02
6
- **Version:** 0.38.3.0
6
+ **Version:** 0.38.4.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
@@ -3,7 +3,7 @@
3
3
  **Generated:** 2026-11-04
4
4
  **Commit:** eb2097b0
5
5
  **Branch:** sprint/2026-11-03-02
6
- **Version:** 0.38.3.0
6
+ **Version:** 0.38.4.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Clean Code & SOLID principles checker — **Gate 4** of pre-commit. 14 rules × 9 language adapters, SARIF 2.1.0 output. Houses the **Boy Scout Rule** enforcement engine (Gate 6) and warning-baseline storage.
@@ -3,7 +3,7 @@
3
3
  **Generated:** 2026-11-04
4
4
  **Commit:** eb2097b0
5
5
  **Branch:** sprint/2026-11-03-02
6
- **Version:** 0.38.3.0
6
+ **Version:** 0.38.4.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Delphi Consensus Review — multi-round anonymous expert review (≥90% threshold, exactly 3 experts with distinct executable model IDs). Supports design, requirements, and code-walkthrough modes.
@@ -3,7 +3,7 @@
3
3
  **Generated:** 2026-11-04
4
4
  **Commit:** eb2097b0
5
5
  **Branch:** sprint/2026-11-03-02
6
- **Version:** 0.38.3.0
6
+ **Version:** 0.38.4.0
7
7
 
8
8
  ## OVERVIEW
9
9
  **6-phase** development pipeline (v2.0 compact redesign, Issue #290): PREP → DESIGN → BUILD → VERIFY → SHIP → CLOSE. Phase 3/6 BUILD default build mode is **ralph-loop** (REQ-level iteration, 40-67% token savings vs parallel). HARD-GATE between DESIGN (2/6) and BUILD (3/6): design must pass Delphi review (≥90% consensus) before any coding.
@@ -3,7 +3,7 @@
3
3
  **Generated:** 2026-11-04
4
4
  **Commit:** eb2097b0
5
5
  **Branch:** sprint/2026-11-03-02
6
- **Version:** 0.38.3.0
6
+ **Version:** 0.38.4.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.