@boyingliu01/xp-gate 0.38.99 → 0.38.101

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.
@@ -1395,6 +1395,13 @@ else
1395
1395
  echo "⚠️ Partial coverage ${COVERAGE_PERCENT}% (subset test run, not full suite)."
1396
1396
  echo " Run 'npx vitest run --coverage' for full coverage check."
1397
1397
  else
1398
+ # Record the verdict as well as printing it. Measured 2026-11-22:
1399
+ # these floor-miss branches printed "❌ BLOCKED - <lang> coverage N%
1400
+ # below M% threshold" and returned 1, while GATE_5_STATUS stayed
1401
+ # empty -- and an empty status renders as SKIP, so the summary line
1402
+ # one inch below reported a skip for a commit that was blocked.
1403
+ GATE_5_STATUS="BLOCK"
1404
+ GATE_5_DETAIL="coverage_below_floor: typescript coverage under the 80% floor"
1398
1405
  echo "❌ BLOCKED - TypeScript coverage ${COVERAGE_PERCENT}% below ${COVERAGE_THRESHOLD:-80}% threshold"
1399
1406
  return 1
1400
1407
  fi
@@ -1522,7 +1529,26 @@ else
1522
1529
  # (the old `grep -o '[0-9]*%'` never matched --format=total's bare
1523
1530
  # number, so this branch never reached the threshold). Returns 1 on
1524
1531
  # BLOCK after echoing the verdict.
1525
- enforce_python_coverage || return 1
1532
+ #
1533
+ # The verdict must be RECORDED as well as echoed. Measured 2026-11-22 on a
1534
+ # Python fixture at 48% against an 80% floor: enforce_python_coverage printed
1535
+ #
1536
+ # ❌ BLOCKED - Python coverage 48% below 80% threshold
1537
+ #
1538
+ # and this `|| return 1` propagated the exit without ever assigning
1539
+ # GATE_5_STATUS, so the epilogue -- which only promotes an EMPTY status to PASS
1540
+ # -- left it empty and the summary rendered
1541
+ #
1542
+ # Gate 5: Tests + Coverage SKIP (coverage: 48%)
1543
+ #
1544
+ # beside that BLOCKED line. Console said blocked, journal said skipped. The
1545
+ # library returns the verdict and cannot record it: it has no access to the
1546
+ # gate's status variable, so the assignment belongs here, at the call site.
1547
+ if ! enforce_python_coverage; then
1548
+ GATE_5_STATUS="BLOCK"
1549
+ GATE_5_DETAIL="coverage_below_floor: python coverage under the 80% floor"
1550
+ return 1
1551
+ fi
1526
1552
  ;;
1527
1553
  "java")
1528
1554
  COVERAGE_ENFORCED=true
@@ -1601,6 +1627,13 @@ else
1601
1627
  echo "⚠️ Partial coverage ${COVERAGE_ROUNDED}% (subset test run, not full suite)."
1602
1628
  echo " Run the full test suite for a complete Java coverage check."
1603
1629
  else
1630
+ # Record the verdict as well as printing it. Measured 2026-11-22:
1631
+ # these floor-miss branches printed "❌ BLOCKED - <lang> coverage N%
1632
+ # below M% threshold" and returned 1, while GATE_5_STATUS stayed
1633
+ # empty -- and an empty status renders as SKIP, so the summary line
1634
+ # one inch below reported a skip for a commit that was blocked.
1635
+ GATE_5_STATUS="BLOCK"
1636
+ GATE_5_DETAIL="coverage_below_floor: java coverage under the 80% floor"
1604
1637
  echo "❌ BLOCKED - Java coverage ${COVERAGE_ROUNDED}% below ${COVERAGE_THRESHOLD:-80}% threshold"
1605
1638
  return 1
1606
1639
  fi
@@ -1682,6 +1715,10 @@ else
1682
1715
  echo "⚠️ Partial coverage ${COVERAGE_PERCENT}% (subset test run, not full suite)."
1683
1716
  echo " Run the full test suite for a complete Flutter/Dart coverage check."
1684
1717
  else
1718
+ # Record the verdict as well as printing it -- see the typescript branch
1719
+ # above for the measurement. An unassigned status renders as SKIP.
1720
+ GATE_5_STATUS="BLOCK"
1721
+ GATE_5_DETAIL="coverage_below_floor: flutter/dart coverage under the 80% floor"
1685
1722
  echo "❌ BLOCKED - Flutter/Dart coverage ${COVERAGE_PERCENT}% below ${COVERAGE_THRESHOLD:-80}% threshold"
1686
1723
  return 1
1687
1724
  fi
@@ -1774,6 +1811,10 @@ else
1774
1811
  echo "⚠️ Partial coverage ${COVERAGE_PERCENT}% (subset test run, not full suite)."
1775
1812
  echo " Run the full Pester suite for a complete PowerShell coverage check."
1776
1813
  else
1814
+ # Record the verdict as well as printing it -- see the typescript branch
1815
+ # above for the measurement. An unassigned status renders as SKIP.
1816
+ GATE_5_STATUS="BLOCK"
1817
+ GATE_5_DETAIL="coverage_below_floor: powershell coverage under the 80% floor"
1777
1818
  echo "❌ BLOCKED - PowerShell coverage ${COVERAGE_PERCENT}% below ${COVERAGE_THRESHOLD:-80}% threshold"
1778
1819
  return 1
1779
1820
  fi
@@ -1893,6 +1934,24 @@ else
1893
1934
  echo "⚠️ Partial coverage ${COVERAGE_PERCENT}% (subset test run, not full suite)."
1894
1935
  echo " Run the full test suite for a complete ${CURRENT_LANG} coverage check."
1895
1936
  else
1937
+ # Record the verdict, not just print it. Measured 2026-11-22 on a Python
1938
+ # fixture at 48% against an 80% floor: this branch printed
1939
+ #
1940
+ # ❌ BLOCKED - Python coverage 48% below 80% threshold
1941
+ #
1942
+ # and returned 1, while the summary one inch below still read
1943
+ #
1944
+ # Gate 5: Tests + Coverage SKIP (coverage: 48%)
1945
+ #
1946
+ # because the status variable was never assigned and the epilogue only
1947
+ # promotes an EMPTY status to PASS -- an empty status therefore rendered
1948
+ # as SKIP. The identical lesson was already written into the
1949
+ # "could not determine" branch below, which sets BLOCK explicitly; this
1950
+ # branch is the same defect, one condition over, and it was missed. A
1951
+ # verdict that only reaches the console is a verdict the journal
1952
+ # contradicts.
1953
+ GATE_5_STATUS="BLOCK"
1954
+ GATE_5_DETAIL="coverage_below_floor: ${CURRENT_LANG} ${COVERAGE_PERCENT}% < ${COVERAGE_THRESHOLD:-80}%"
1896
1955
  echo "❌ BLOCKED - ${CURRENT_LANG} coverage ${COVERAGE_PERCENT}% below ${COVERAGE_THRESHOLD:-80}% threshold"
1897
1956
  return 1
1898
1957
  fi
@@ -2175,6 +2234,10 @@ _gate5_go_coverage_arm() {
2175
2234
 
2176
2235
  total=$(go tool cover -func=coverage.out 2>/dev/null | grep "^total:" | awk '{print substr($3, 1, length($3)-1)}')
2177
2236
  if [ -n "$total" ] && (( $(echo "$total < 80" | bc -l 2>/dev/null || echo "0") )); then
2237
+ # Record the verdict as well as printing it -- see the typescript branch
2238
+ # above for the measurement. An unassigned status renders as SKIP.
2239
+ GATE_5_STATUS="BLOCK"
2240
+ GATE_5_DETAIL="coverage_below_floor: go coverage under the 80% floor"
2178
2241
  echo "❌ BLOCKED - Go coverage ${total}% below ${COVERAGE_THRESHOLD:-80}% threshold"
2179
2242
  COV_EXIT=$((COV_EXIT || 1))
2180
2243
  return 1
@@ -2,6 +2,6 @@
2
2
  "verdict": "PASS",
3
3
  "license_type": "MIT",
4
4
  "sha256": "0e7ac423bf2c6e223b7c5b156f8cf72da49d748e56a1641402c31f22ad07dbb5",
5
- "checked_at": "2026-11-22T16:50:31.535Z",
5
+ "checked_at": "2026-11-22T17:45:50.821Z",
6
6
  "source": "network"
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boyingliu01/xp-gate",
3
- "version": "0.38.99",
3
+ "version": "0.38.101",
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.99",
3
+ "version": "0.38.101",
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.99.0
6
+ **Version:** 0.38.101.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.99.0
6
+ **Version:** 0.38.101.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; each REQ starts from a clean context instead of accumulating one across REQs). 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.99.0
6
+ **Version:** 0.38.101.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.99",
3
+ "version": "0.38.101",
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.99.0
6
+ **Version:** 0.38.101.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.99.0
6
+ **Version:** 0.38.101.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; each REQ starts from a clean context instead of accumulating one across REQs). 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.99.0
6
+ **Version:** 0.38.101.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.99",
3
+ "version": "0.38.101",
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.99.0
6
+ **Version:** 0.38.101.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.99.0
6
+ **Version:** 0.38.101.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; each REQ starts from a clean context instead of accumulating one across REQs). 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.99.0
6
+ **Version:** 0.38.101.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.99",
3
+ "version": "0.38.101",
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.99.0
6
+ **Version:** 0.38.101.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.99.0
6
+ **Version:** 0.38.101.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; each REQ starts from a clean context instead of accumulating one across REQs). 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.99.0
6
+ **Version:** 0.38.101.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.
@@ -291,6 +291,28 @@ function syncHooks() {
291
291
  }
292
292
  }
293
293
 
294
+ // Copy gate-entries/ recursively.
295
+ //
296
+ // Gate 12b requires a package mirror for every githooks/* file a diff touches,
297
+ // and it exempts nothing -- but syncHooks only ever copied HOOK_FILES, the
298
+ // githooks/*.sh gates and lib/. gate-entries/ was in NEITHER list, so the mirror
299
+ // could only be produced by hand.
300
+ //
301
+ // Measured 2026-11-22: after editing githooks/gate-entries/gate-5-entry.sh,
302
+ // `sync-package-content.js --fix` reported "20 hook entries" and exited 0, yet
303
+ // the two copies differed (2254 vs 2191 lines) and gate 12b blocked the commit
304
+ // with "src/npm-package/hooks/gate-entries/gate-5-entry.sh differs from canonical".
305
+ // The gate's own printed remedy ("run sync --fix") could not satisfy the gate.
306
+ //
307
+ // Treated exactly like lib/: mirror the directory, count it as one entry.
308
+ const entriesSrc = path.join(SRC, 'gate-entries');
309
+ const entriesDst = path.join(DST, 'gate-entries');
310
+ if (fs.existsSync(entriesSrc)) {
311
+ fs.rmSync(entriesDst, { recursive: true, force: true });
312
+ copyDir(entriesSrc, entriesDst);
313
+ copied += 1;
314
+ }
315
+
294
316
  // Copy lib/ subdirectory recursively
295
317
  const libSrc = path.join(SRC, 'lib');
296
318
  const libDst = path.join(DST, 'lib');
@@ -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.99.0
6
+ **Version:** 0.38.101.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.99.0
6
+ **Version:** 0.38.101.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; each REQ starts from a clean context instead of accumulating one across REQs). 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.99.0
6
+ **Version:** 0.38.101.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.