@boyingliu01/xp-gate 0.38.90 → 0.38.93

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.
@@ -273,6 +273,25 @@ elif [ "$GITLEAKS_EXIT" -eq 1 ]; then
273
273
  echo " 3. Use git secret or vault for sensitive data"
274
274
  echo ""
275
275
  echo "See: https://github.com/gitleaks/gitleaks"
276
+ # STATE BEFORE EXIT, AND RECORD IT HERE. This arm exits 1 without the driver
277
+ # ever reaching gate-8-entry.sh's journal line, and it used to leave
278
+ # GATE_8_STATUS at the value initialised above (SKIP). MEASURED 2026-11-22 on a
279
+ # probe repo holding a live-looking PAT:
280
+ #
281
+ # console ❌ BLOCKED - Secrets detected in staged files.
282
+ # report {"status":"SKIP","reason":"","tool":"gitleaks"}
283
+ #
284
+ # The commit WAS refused -- the exit code was right -- and the record said the
285
+ # gate had skipped. A reader of the journal would conclude secret scanning had
286
+ # nothing to say about a commit it had just blocked, which is this codebase's
287
+ # oldest failure in its purest form.
288
+ #
289
+ # The journal call is repeated here because the exit skips the normal one.
290
+ # shellcheck disable=SC2034
291
+ GATE_8_STATUS="FAIL"
292
+ # shellcheck disable=SC2034
293
+ GATE_8_REASON="secrets_detected_in_staged_files"
294
+ record_gate_audit "gate-8" "secret-scanning" "$GATE_8_STATUS" "${GITLEAKS_FINDINGS:-0}" "$GATE_8_START" "${GATE_8_REASON:-}"
276
295
  exit 1
277
296
  else
278
297
  # fail-closed (#499): a non-0/1 exit (config error, crash) used to SKIP, which
package/adapters/php.sh CHANGED
@@ -146,7 +146,23 @@ _php_composer_bin() {
146
146
  # ---------------------------------------------------------------------------
147
147
  run_static_analysis() {
148
148
  local root php phpstan level out rc rows
149
- root=$(_php_detect_root) || { echo "No composer.json / phpunit.xml found -- not a PHP project"; return 0; }
149
+ # return 3 (WARN), NOT 0. The contract above says 0 = clean, 2 = could not
150
+ # run, 3 = warn. Returning 0 reported a repo with no composer.json as if the
151
+ # analyzer had read the code and found nothing.
152
+ #
153
+ # MEASURED 2026-11-22 on a probe repo holding a .php file with a real parse
154
+ # error: console said "not a PHP project", gate 1 said PASS.
155
+ #
156
+ # 3 and not 2: 2 is BLOCK, which is right for "the tool is not installed and
157
+ # the user can install it" but wrong here -- a single-file PHP script is a
158
+ # legitimate project, and the manifest is simply absent. Blocking every such
159
+ # repo forever would make the gate unliveable, so this is a WARN that names
160
+ # the gap. What it must not be is a silent 0.
161
+ root=$(_php_detect_root) || {
162
+ echo "No composer.json / phpunit.xml found -- PHP static/lint analysis NOT run"
163
+ echo "XP_G1_REASON: php_no_manifest"
164
+ return 3
165
+ }
150
166
  php=$(_php_bin) || {
151
167
  echo "php is not installed -- static analysis not measurable"
152
168
  echo "XP_G1_REASON: php_missing"
@@ -210,7 +226,23 @@ run_static_analysis() {
210
226
  # ---------------------------------------------------------------------------
211
227
  run_lint() {
212
228
  local root php phpcs standard out rc
213
- root=$(_php_detect_root) || { echo "No composer.json / phpunit.xml found -- not a PHP project"; return 0; }
229
+ # return 2, NOT 0. The contract at the top of this file says 2 means
230
+ # "could not run", and 0 means "clean" -- so returning 0 here reported a repo
231
+ # with no composer.json as if phpstan/phpcs had been given the code and found
232
+ # nothing. MEASURED 2026-11-22 on a probe repo holding a .php file with a real
233
+ # parse error:
234
+ #
235
+ # console "No composer.json / phpunit.xml found -- not a PHP project"
236
+ # gate 1 PASS
237
+ #
238
+ # A single-file PHP project is a legitimate project. The absence of a manifest
239
+ # says nothing about whether the changed file has a syntax error, and it must
240
+ # not be the difference between "checked" and "passed".
241
+ root=$(_php_detect_root) || {
242
+ echo "No composer.json / phpunit.xml found -- PHP lint NOT run"
243
+ echo "XP_G1_REASON: php_no_manifest"
244
+ return 3
245
+ }
214
246
  php=$(_php_bin) || {
215
247
  echo "php is not installed -- lint not measurable"
216
248
  echo "XP_G1_REASON: php_missing"
@@ -283,7 +315,23 @@ run_lint() {
283
315
  # ---------------------------------------------------------------------------
284
316
  run_tests() {
285
317
  local root php phpunit out rc
286
- root=$(_php_detect_root) || { echo "No composer.json / phpunit.xml found -- not a PHP project"; return 0; }
318
+ # return 2, NOT 0. The contract at the top of this file says 2 means
319
+ # "could not run", and 0 means "clean" -- so returning 0 here reported a repo
320
+ # with no composer.json as if phpstan/phpcs had been given the code and found
321
+ # nothing. MEASURED 2026-11-22 on a probe repo holding a .php file with a real
322
+ # parse error:
323
+ #
324
+ # console "No composer.json / phpunit.xml found -- not a PHP project"
325
+ # gate 1 PASS
326
+ #
327
+ # A single-file PHP project is a legitimate project. The absence of a manifest
328
+ # says nothing about whether the changed file has a syntax error, and it must
329
+ # not be the difference between "checked" and "passed".
330
+ root=$(_php_detect_root) || {
331
+ echo "No composer.json / phpunit.xml found -- PHP lint NOT run"
332
+ echo "XP_G1_REASON: php_no_manifest"
333
+ return 3
334
+ }
287
335
  php=$(_php_bin) || {
288
336
  echo "php is not installed -- tests not measurable"
289
337
  echo "XP_G1_REASON: php_missing"
@@ -329,7 +377,23 @@ coverage_runs_tests() { return 0; }
329
377
 
330
378
  run_coverage() {
331
379
  local root php phpunit out rc report
332
- root=$(_php_detect_root) || { echo "No composer.json / phpunit.xml found -- not a PHP project"; return 0; }
380
+ # return 2, NOT 0. The contract at the top of this file says 2 means
381
+ # "could not run", and 0 means "clean" -- so returning 0 here reported a repo
382
+ # with no composer.json as if phpstan/phpcs had been given the code and found
383
+ # nothing. MEASURED 2026-11-22 on a probe repo holding a .php file with a real
384
+ # parse error:
385
+ #
386
+ # console "No composer.json / phpunit.xml found -- not a PHP project"
387
+ # gate 1 PASS
388
+ #
389
+ # A single-file PHP project is a legitimate project. The absence of a manifest
390
+ # says nothing about whether the changed file has a syntax error, and it must
391
+ # not be the difference between "checked" and "passed".
392
+ root=$(_php_detect_root) || {
393
+ echo "No composer.json / phpunit.xml found -- PHP lint NOT run"
394
+ echo "XP_G1_REASON: php_no_manifest"
395
+ return 3
396
+ }
333
397
  php=$(_php_bin) || {
334
398
  echo "php is not installed -- coverage not measurable"
335
399
  echo "XP_G1_REASON: php_missing"
@@ -350,6 +414,7 @@ run_coverage() {
350
414
  # still exits 0, which reads as full coverage to anything checking only the
351
415
  # exit status. Detect it up front so the reason is explicit.
352
416
  local drivers
417
+ # shellcheck disable=SC2016 # PHP source, not shell text: $d is a PHP closure parameter
353
418
  drivers=$("$php" -r 'echo implode(",", array_filter(["pcov","xdebug"], fn($d)=>extension_loaded($d)));' 2>/dev/null)
354
419
  if [ -z "$drivers" ]; then
355
420
  echo "No PHP coverage driver installed (pcov or xdebug required) -- coverage not measurable"
package/gate-8.sh CHANGED
@@ -273,6 +273,25 @@ elif [ "$GITLEAKS_EXIT" -eq 1 ]; then
273
273
  echo " 3. Use git secret or vault for sensitive data"
274
274
  echo ""
275
275
  echo "See: https://github.com/gitleaks/gitleaks"
276
+ # STATE BEFORE EXIT, AND RECORD IT HERE. This arm exits 1 without the driver
277
+ # ever reaching gate-8-entry.sh's journal line, and it used to leave
278
+ # GATE_8_STATUS at the value initialised above (SKIP). MEASURED 2026-11-22 on a
279
+ # probe repo holding a live-looking PAT:
280
+ #
281
+ # console ❌ BLOCKED - Secrets detected in staged files.
282
+ # report {"status":"SKIP","reason":"","tool":"gitleaks"}
283
+ #
284
+ # The commit WAS refused -- the exit code was right -- and the record said the
285
+ # gate had skipped. A reader of the journal would conclude secret scanning had
286
+ # nothing to say about a commit it had just blocked, which is this codebase's
287
+ # oldest failure in its purest form.
288
+ #
289
+ # The journal call is repeated here because the exit skips the normal one.
290
+ # shellcheck disable=SC2034
291
+ GATE_8_STATUS="FAIL"
292
+ # shellcheck disable=SC2034
293
+ GATE_8_REASON="secrets_detected_in_staged_files"
294
+ record_gate_audit "gate-8" "secret-scanning" "$GATE_8_STATUS" "${GITLEAKS_FINDINGS:-0}" "$GATE_8_START" "${GATE_8_REASON:-}"
276
295
  exit 1
277
296
  else
278
297
  # fail-closed (#499): a non-0/1 exit (config error, crash) used to SKIP, which
package/hooks/gate-8.sh CHANGED
@@ -273,6 +273,25 @@ elif [ "$GITLEAKS_EXIT" -eq 1 ]; then
273
273
  echo " 3. Use git secret or vault for sensitive data"
274
274
  echo ""
275
275
  echo "See: https://github.com/gitleaks/gitleaks"
276
+ # STATE BEFORE EXIT, AND RECORD IT HERE. This arm exits 1 without the driver
277
+ # ever reaching gate-8-entry.sh's journal line, and it used to leave
278
+ # GATE_8_STATUS at the value initialised above (SKIP). MEASURED 2026-11-22 on a
279
+ # probe repo holding a live-looking PAT:
280
+ #
281
+ # console ❌ BLOCKED - Secrets detected in staged files.
282
+ # report {"status":"SKIP","reason":"","tool":"gitleaks"}
283
+ #
284
+ # The commit WAS refused -- the exit code was right -- and the record said the
285
+ # gate had skipped. A reader of the journal would conclude secret scanning had
286
+ # nothing to say about a commit it had just blocked, which is this codebase's
287
+ # oldest failure in its purest form.
288
+ #
289
+ # The journal call is repeated here because the exit skips the normal one.
290
+ # shellcheck disable=SC2034
291
+ GATE_8_STATUS="FAIL"
292
+ # shellcheck disable=SC2034
293
+ GATE_8_REASON="secrets_detected_in_staged_files"
294
+ record_gate_audit "gate-8" "secret-scanning" "$GATE_8_STATUS" "${GITLEAKS_FINDINGS:-0}" "$GATE_8_START" "${GATE_8_REASON:-}"
276
295
  exit 1
277
296
  else
278
297
  # fail-closed (#499): a non-0/1 exit (config error, crash) used to SKIP, which
@@ -2,6 +2,6 @@
2
2
  "verdict": "PASS",
3
3
  "license_type": "MIT",
4
4
  "sha256": "0e7ac423bf2c6e223b7c5b156f8cf72da49d748e56a1641402c31f22ad07dbb5",
5
- "checked_at": "2026-11-22T07:23:16.530Z",
5
+ "checked_at": "2026-11-22T14:03:37.789Z",
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.90",
3
+ "version": "0.38.93",
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.90",
3
+ "version": "0.38.93",
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.90.0
6
+ **Version:** 0.38.93.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.90.0
6
+ **Version:** 0.38.93.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.90.0
6
+ **Version:** 0.38.93.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.90",
3
+ "version": "0.38.93",
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.90.0
6
+ **Version:** 0.38.93.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.90.0
6
+ **Version:** 0.38.93.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.90.0
6
+ **Version:** 0.38.93.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.90",
3
+ "version": "0.38.93",
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.90.0
6
+ **Version:** 0.38.93.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.90.0
6
+ **Version:** 0.38.93.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.90.0
6
+ **Version:** 0.38.93.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.90",
3
+ "version": "0.38.93",
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.90.0
6
+ **Version:** 0.38.93.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.90.0
6
+ **Version:** 0.38.93.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.90.0
6
+ **Version:** 0.38.93.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.90.0
6
+ **Version:** 0.38.93.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.90.0
6
+ **Version:** 0.38.93.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.90.0
6
+ **Version:** 0.38.93.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.