@boyingliu01/xp-gate 0.38.51 → 0.38.53

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/adapters/dart.sh CHANGED
@@ -3,30 +3,33 @@
3
3
  run_static_analysis() {
4
4
  if command -v dart &>/dev/null; then
5
5
  dart analyze 2>&1 | sed -n '1,30p; 30q'
6
- return $?
6
+ return "${PIPESTATUS[0]}"
7
7
  else
8
+ echo "XP_G1_REASON: dart: Dart SDK not installed -- nothing was checked"
8
9
  echo "Dart SDK not available"
9
- return 1
10
+ return 3
10
11
  fi
11
12
  }
12
13
 
13
14
  run_lint() {
14
15
  if command -v dart &>/dev/null; then
15
16
  dart format --output=none --set-exit-if-changed . 2>&1 | sed -n '1,30p; 30q'
16
- return $?
17
+ return "${PIPESTATUS[0]}"
17
18
  else
19
+ echo "XP_G1_REASON: dart: Dart SDK not installed -- nothing was checked"
18
20
  echo "Dart SDK not available"
19
- return 1
21
+ return 3
20
22
  fi
21
23
  }
22
24
 
23
25
  run_tests() {
24
26
  if command -v dart &>/dev/null; then
25
27
  dart test 2>&1 | tail -20
26
- return $?
28
+ return "${PIPESTATUS[0]}"
27
29
  else
30
+ echo "XP_G1_REASON: dart: Dart SDK not installed -- nothing was checked"
28
31
  echo "Dart SDK not available"
29
- return 1
32
+ return 3
30
33
  fi
31
34
  }
32
35
 
@@ -51,9 +54,10 @@ compiler_check_command() { printf "%s" "dart analyze"; }
51
54
  run_coverage() {
52
55
  if command -v dart &>/dev/null; then
53
56
  dart test --coverage=coverage 2>&1 | tail -10
54
- return $?
57
+ return "${PIPESTATUS[0]}"
55
58
  else
59
+ echo "XP_G1_REASON: dart: Dart SDK not installed -- nothing was checked"
56
60
  echo "Dart SDK not available"
57
- return 1
61
+ return 3
58
62
  fi
59
63
  }
@@ -3,40 +3,44 @@
3
3
  run_static_analysis() {
4
4
  if command -v flutter &>/dev/null; then
5
5
  flutter analyze 2>&1 | sed -n '1,30p; 30q'
6
- return $?
6
+ return "${PIPESTATUS[0]}"
7
7
  else
8
+ echo "XP_G1_REASON: flutter: Flutter SDK not installed -- nothing was checked"
8
9
  echo "Flutter SDK not available"
9
- return 1
10
+ return 3
10
11
  fi
11
12
  }
12
13
 
13
14
  run_lint() {
14
15
  if command -v flutter &>/dev/null; then
15
16
  flutter format --output=none --set-exit-if-changed . 2>&1 | sed -n '1,30p; 30q'
16
- return $?
17
+ return "${PIPESTATUS[0]}"
17
18
  else
19
+ echo "XP_G1_REASON: flutter: Flutter SDK not installed -- nothing was checked"
18
20
  echo "Flutter SDK not available"
19
- return 1
21
+ return 3
20
22
  fi
21
23
  }
22
24
 
23
25
  run_tests() {
24
26
  if command -v flutter &>/dev/null; then
25
27
  flutter test 2>&1 | tail -20
26
- return $?
28
+ return "${PIPESTATUS[0]}"
27
29
  else
30
+ echo "XP_G1_REASON: flutter: Flutter SDK not installed -- nothing was checked"
28
31
  echo "Flutter SDK not available"
29
- return 1
32
+ return 3
30
33
  fi
31
34
  }
32
35
 
33
36
  run_coverage() {
34
37
  if command -v flutter &>/dev/null; then
35
38
  flutter test --coverage 2>&1 | tail -10
36
- return $?
39
+ return "${PIPESTATUS[0]}"
37
40
  else
41
+ echo "XP_G1_REASON: flutter: Flutter SDK not installed -- nothing was checked"
38
42
  echo "Flutter SDK not available"
39
- return 1
43
+ return 3
40
44
  fi
41
45
  }
42
46
 
@@ -880,6 +880,31 @@ gate13_run_java_analysis() {
880
880
  fi
881
881
  if [ "$rc" -ne 0 ]; then
882
882
  if [ "$degraded" -eq 1 ]; then
883
+ # Degraded mode means the -Xlint flags could not be injected, so this
884
+ # run cannot say anything about compiler STRICTNESS. It can still say
885
+ # something about COMPILABILITY, and the two were being conflated: every
886
+ # non-zero exit was waved through as "usually missing offline
887
+ # dependencies".
888
+ #
889
+ # Measured 2026-11-19, language matrix, java fixture:
890
+ #
891
+ # src/main/java/A.java : public int f() { return "no"; }
892
+ # mvn -o compile : [ERROR] COMPILATION ERROR :
893
+ # ... 不兼容的类型: java.lang.String无法转换为int
894
+ # ... Compilation failure
895
+ # gate 13 : "Java build failed (mvn exit 1) in degraded
896
+ # mode — not attributed to Gate 13" -> WARN
897
+ # commit ALLOWED
898
+ #
899
+ # A missing-dependency failure does not print COMPILATION ERROR; it fails
900
+ # while resolving artifacts ("Could not resolve dependencies", "Non-resolvable
901
+ # parent POM"). javac reporting an error in a source file is not an
902
+ # environment problem, and the file in question is the one being committed.
903
+ if printf '%s\n' "$mvn_out" | grep -qE 'COMPILATION ERROR|Compilation failure'; then
904
+ echo " ❌ Java compilation failed (mvn exit ${rc}) — javac reported errors in the sources"
905
+ printf '%s\n' "$mvn_out" | grep -E 'ERROR' | head -10 | sed 's/^/ /'
906
+ return "$GATE13_FAIL"
907
+ fi
883
908
  # We already know the lint flags were not applied, so a build failure
884
909
  # here says nothing about compiler strictness — it is usually missing
885
910
  # offline dependencies. Reporting it as FAIL would blame this gate for
package/adapters/swift.sh CHANGED
@@ -1,29 +1,68 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
+ # Swift adapter.
4
+ #
5
+ # VERDICT CONTRACT (#806 G1a): Gate 1 reads these exit codes as
6
+ # 0 = PASS / 1|2 = BLOCK (findings or fail-closed) / 3 = WARN, NOT verified
7
+ #
8
+ # "Tool not installed" is 3, never 1.
9
+ #
10
+ # Measured 2026-11-20, language matrix, swift fixture on a machine without
11
+ # SwiftLint:
12
+ #
13
+ # -> Gate 1: Code Quality
14
+ # -- Checking swift --
15
+ # Running static analysis for swift...
16
+ # SwiftLint not available
17
+ # Running lint check for swift...
18
+ # SwiftLint not available
19
+ # BLOCKED - swift code quality violations (fix or add suppressions)
20
+ # chain stopped at Gate 1 -- gates 2 3 8 10 7 5 6 4 never reached
21
+ #
22
+ # Both functions returned 1, and Gate 1 reads 1 as "the analyzer found problems".
23
+ # A machine without SwiftLint therefore blocked EVERY Swift commit with a message
24
+ # claiming code-quality violations that no tool had looked for -- and it stopped
25
+ # the chain, so eight later gates never ran either.
26
+ #
27
+ # This is the inverse of the usual defect in this series. The others reported a
28
+ # pass they had not earned; this one reports a failure it did not find. Both come
29
+ # from the same place: an exit code chosen for its value rather than for what the
30
+ # caller does with it.
31
+ #
32
+ # The reason is emitted as XP_G1_REASON, which Gate 1 lifts out of the output and
33
+ # stores as GATE_1_DETAIL -- without it the WARN would be as unreasoned as the
34
+ # BLOCK was.
35
+
3
36
  run_static_analysis() {
4
37
  if command -v swiftlint &>/dev/null; then
5
38
  swiftlint lint 2>&1 | sed -n '1,30p; 30q'
6
- return $?
7
- else
8
- echo "SwiftLint not available"
9
- return 1
39
+ return "${PIPESTATUS[0]}"
10
40
  fi
41
+ # 3 = "did not evaluate", not "found problems".
42
+ echo "XP_G1_REASON: swift: SwiftLint not installed -- nothing was linted"
43
+ echo "SwiftLint not available (install: brew install swiftlint)"
44
+ return 3
11
45
  }
12
46
 
13
47
  run_lint() {
14
48
  if command -v swiftlint &>/dev/null; then
15
49
  swiftlint lint --strict 2>&1 | sed -n '1,30p; 30q'
16
- return $?
17
- else
18
- echo "SwiftLint not available"
19
- return 1
50
+ return "${PIPESTATUS[0]}"
20
51
  fi
52
+ echo "XP_G1_REASON: swift: SwiftLint not installed -- strict lint not run"
53
+ echo "SwiftLint not available (install: brew install swiftlint)"
54
+ return 3
21
55
  }
22
56
 
57
+ # run_tests / run_coverage keep returning non-zero when there is genuinely nothing
58
+ # to run: Gate 5's contract distinguishes "tests failed" (block) from "no tests"
59
+ # through its own skip markers, and a non-zero here is the "could not run" signal
60
+ # it already understands. Only the two Gate 1 arms above needed changing, because
61
+ # only Gate 1 maps a bare 1 to "violations found".
23
62
  run_tests() {
24
63
  if command -v swift &>/dev/null && [ -f "Package.swift" ]; then
25
64
  swift test 2>&1 | tail -20
26
- return $?
65
+ return "${PIPESTATUS[0]}"
27
66
  elif [ -f "*.xcodeproj" ] || [ -f "*.xcworkspace" ]; then
28
67
  echo "Xcode project detected — use xcodebuild for tests"
29
68
  return 1
@@ -42,7 +81,7 @@ coverage_runs_tests() { return 0; }
42
81
  run_coverage() {
43
82
  if command -v swift &>/dev/null && [ -f "Package.swift" ]; then
44
83
  swift test --enable-code-coverage 2>&1 | tail -10
45
- return $?
84
+ return "${PIPESTATUS[0]}"
46
85
  else
47
86
  echo "No Swift test framework detected"
48
87
  return 1
@@ -2,6 +2,6 @@
2
2
  "verdict": "PASS",
3
3
  "license_type": "MIT",
4
4
  "sha256": "0e7ac423bf2c6e223b7c5b156f8cf72da49d748e56a1641402c31f22ad07dbb5",
5
- "checked_at": "2026-11-19T20:10:28.305Z",
5
+ "checked_at": "2026-11-19T21:03:47.194Z",
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.51",
3
+ "version": "0.38.53",
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.51",
3
+ "version": "0.38.53",
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.51.0
6
+ **Version:** 0.38.53.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.51.0
6
+ **Version:** 0.38.53.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.51.0
6
+ **Version:** 0.38.53.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.51",
3
+ "version": "0.38.53",
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.51.0
6
+ **Version:** 0.38.53.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.51.0
6
+ **Version:** 0.38.53.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.51.0
6
+ **Version:** 0.38.53.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.51",
3
+ "version": "0.38.53",
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.51.0
6
+ **Version:** 0.38.53.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.51.0
6
+ **Version:** 0.38.53.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.51.0
6
+ **Version:** 0.38.53.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.51.0
6
+ **Version:** 0.38.53.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.51.0
6
+ **Version:** 0.38.53.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.51.0
6
+ **Version:** 0.38.53.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.51.0
6
+ **Version:** 0.38.53.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.51.0
6
+ **Version:** 0.38.53.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.51.0
6
+ **Version:** 0.38.53.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.