@boyingliu01/xp-gate 0.38.112 → 0.38.114

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.
@@ -98,6 +98,43 @@
98
98
  # carries it deliberately, so its mtime is not an objection.
99
99
  #
100
100
  # Returns 0 when the report may be read, non-zero when it must be ignored.
101
+ # Does this project contain ANY test source for the given language?
102
+ #
103
+ # Returns 0 (ASSUME TESTS EXIST) in every case it cannot prove otherwise. That
104
+ # asymmetry is deliberate: guessing "no tests" wrongly would SKIP the coverage
105
+ # floor for a repository that does have tests, which is a silent pass --
106
+ # the exact failure this gate exists to prevent. Guessing "tests exist" wrongly
107
+ # only costs the fail-closed BLOCK that already happened before this helper.
108
+ #
109
+ # Only a language with a KNOWN test-file convention may answer "no". For a
110
+ # language this table does not cover, the answer is "assume yes", so an unknown
111
+ # toolchain keeps the old fail-closed behaviour rather than gaining a new skip.
112
+ _gate5_language_has_tests() {
113
+ local lang="$1"
114
+ local pattern
115
+ case "$lang" in
116
+ csharp) pattern='*.Tests.csproj' ;;
117
+ java) pattern='*Test.java' ;;
118
+ kotlin) pattern='*Test.kt' ;;
119
+ go) pattern='*_test.go' ;;
120
+ python) pattern='test_*.py' ;;
121
+ php) pattern='*Test.php' ;;
122
+ cpp|c) pattern='test_*.cpp' ;;
123
+ dart|flutter) pattern='*_test.dart' ;;
124
+ ruby) pattern='*_spec.rb' ;;
125
+ rust) pattern='*.rs' ;;
126
+ *) return 0 ;;
127
+ esac
128
+ # A language with a known convention: report "no tests" only on positive proof
129
+ # that the find completed AND matched nothing. `find` failing to run is not
130
+ # evidence of absence.
131
+ local found
132
+ found=$(find . -name "$pattern" \
133
+ -not -path './node_modules/*' -not -path './.git/*' \
134
+ -print -quit 2>/dev/null) || return 0
135
+ [ -n "$found" ]
136
+ }
137
+
101
138
  _gate5_coverage_usable() {
102
139
  if [ "${GATE_5_COVERAGE_EVIDENCE:-false}" = "true" ]; then
103
140
  return 0
@@ -1856,6 +1893,29 @@ else
1856
1893
  ;;
1857
1894
  *)
1858
1895
  # Default: attempt to parse coverage from common formats regardless of language
1896
+ #
1897
+ # "There are nothing to measure" is a different state from "coverage was
1898
+ # expected and is missing", and collapsing them caused a false BLOCK.
1899
+ # Measured 2026-11-23 on the csharp probe fixture: a single A.cs with no
1900
+ # test project at all produced
1901
+ # gate 5 = BLOCK coverage_not_determined: no standard report file for csharp
1902
+ # -- refusing a commit because a repository that has never had tests did not
1903
+ # emit coverage data. The PowerShell branch already draws this distinction
1904
+ # (#806 G5a, see above): no tests to run is SKIP with a reason, while
1905
+ # "tests ran but the report is missing" stays fail-closed (#570). This
1906
+ # branch honoured only the second half of that rule.
1907
+ #
1908
+ # Detection is the same shape as the PowerShell branch: ask whether the
1909
+ # project contains ANY test source for this language. A repo that acquires
1910
+ # tests gets enforcement back automatically.
1911
+ if ! _gate5_language_has_tests "$CURRENT_LANG"; then
1912
+ echo "⏭️ SKIPPED - ${CURRENT_LANG} coverage: no test sources in this project."
1913
+ echo " Nothing can produce a coverage report here, so the floor is not applicable."
1914
+ echo " This is NOT a pass: add tests and coverage is enforced again."
1915
+ GATE_5_STATUS="SKIP"
1916
+ GATE_5_DETAIL="${CURRENT_LANG}: no test sources (coverage not applicable)"
1917
+ COVERAGE_ENFORCED=false
1918
+ else
1859
1919
  COVERAGE_ENFORCED=true
1860
1920
  COVERAGE_PERCENT=""
1861
1921
  if [ -f "coverage/coverage-summary.json" ] && _gate5_coverage_usable; then
@@ -1992,6 +2052,7 @@ else
1992
2052
  return 1
1993
2053
  fi
1994
2054
  fi
2055
+ fi
1995
2056
  ;;
1996
2057
  esac
1997
2058
 
@@ -437,6 +437,15 @@ fi
437
437
  if [ "$GATE_9_TS_STATUS" = "BLOCK" ] || [ "$GATE_9_JAVA_STATUS" = "BLOCK" ]; then
438
438
  GATE_9_STATUS="BLOCK"
439
439
  fi
440
+ # A SKIP must carry a reason. Measured 2026-11-23: all 19 gate-9 SKIP records in
441
+ # .xp-gate/audit.jsonl had an empty reason, which makes the row indistinguishable
442
+ # from "this gate decided nothing was needed" and from "the gate is broken".
443
+ # The reason is only empty because this gate's two halves are TypeScript and Java:
444
+ # a change set carrying neither has nothing for it to build, and that is the
445
+ # honest answer. Recording it turns a blank into a statement.
446
+ if [ "$GATE_9_STATUS" = "SKIP" ] && [ -z "${GATE_9_UNVERIFIED:-}" ]; then
447
+ GATE_9_UNVERIFIED="no_change_needing_build_integrity"
448
+ fi
440
449
  # A PASS that leaves part of the change set unverified is still a PASS -- the
441
450
  # unverified language is backlog, not a defect in this commit -- but it must SAY
442
451
  # so. This is the same rule as everywhere else in this hook: never let the
@@ -2,6 +2,6 @@
2
2
  "verdict": "PASS",
3
3
  "license_type": "MIT",
4
4
  "sha256": "0e7ac423bf2c6e223b7c5b156f8cf72da49d748e56a1641402c31f22ad07dbb5",
5
- "checked_at": "2026-11-22T23:47:15.911Z",
5
+ "checked_at": "2026-11-23T00:07:29.409Z",
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.112",
3
+ "version": "0.38.114",
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.112",
3
+ "version": "0.38.114",
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.112.0
6
+ **Version:** 0.38.114.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.112.0
6
+ **Version:** 0.38.114.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.112.0
6
+ **Version:** 0.38.114.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.112",
3
+ "version": "0.38.114",
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.112.0
6
+ **Version:** 0.38.114.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.112.0
6
+ **Version:** 0.38.114.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.112.0
6
+ **Version:** 0.38.114.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.112",
3
+ "version": "0.38.114",
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.112.0
6
+ **Version:** 0.38.114.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.112.0
6
+ **Version:** 0.38.114.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.112.0
6
+ **Version:** 0.38.114.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.112",
3
+ "version": "0.38.114",
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.112.0
6
+ **Version:** 0.38.114.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.112.0
6
+ **Version:** 0.38.114.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.112.0
6
+ **Version:** 0.38.114.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.112.0
6
+ **Version:** 0.38.114.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.112.0
6
+ **Version:** 0.38.114.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.112.0
6
+ **Version:** 0.38.114.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.