@boyingliu01/xp-gate 0.38.122 → 0.38.123

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.
@@ -217,6 +217,29 @@ else
217
217
  # commit's minutes go double-counts the overlap, and the overlap is attributed
218
218
  # to whichever gate happens to be recorded second.
219
219
  GATE_5_FOCUS_START=$(gate_start_ms)
220
+
221
+ # Segmented clock. Gate 5's SKIP rows were measured at a 20.7 s median while an
222
+ # isolated call to gate_5_run takes 4.6 s, and no amount of guessing located the
223
+ # gap (see docs/gate-timing-baseline.md sec 6). Guessing twice was worse than
224
+ # spending one field: these marks go into the AUDIT DETAIL, so every future
225
+ # commit records where its own gate-5 seconds went without anyone re-running a
226
+ # probe. A stderr probe was tried first and produced nothing -- the hook's output
227
+ # is captured in some paths, so a diagnostic that is not persisted disappears.
228
+ _g5t_focus=0
229
+ _g5t_a=0
230
+ _g5t_b=0
231
+ _g5t_c=0
232
+ _g5t_mark() {
233
+ local _now
234
+ _now=$(gate_start_ms)
235
+ case "$1" in
236
+ focus) _g5t_focus=$(( _now - GATE_5_START )) ;;
237
+ a) _g5t_a=$(( _now - GATE_5_START )) ;;
238
+ b) _g5t_b=$(( _now - GATE_5_START )) ;;
239
+ c) _g5t_c=$(( _now - GATE_5_START )) ;;
240
+ esac
241
+ }
242
+ _g5t_mark focus
220
243
  GATE_5_FOCUS_BLOCKED=0
221
244
  GATE_5_SKIP_COUNT=0
222
245
  GATE_5_DELETED_TESTS=""
@@ -396,6 +419,8 @@ else
396
419
  return 1
397
420
  fi
398
421
 
422
+ _g5t_mark a
423
+
399
424
  # ========================================================================
400
425
  # Gate 5a: Test-Source File Pairing Check
401
426
  # New .ts/.tsx files: BLOCK (no corresponding test → commit rejected)
@@ -668,6 +693,8 @@ else
668
693
  fi
669
694
  fi
670
695
 
696
+ _g5t_mark b
697
+
671
698
  # ========================================================================
672
699
  # Gate 5b: Mock Density ADVISORY Scan (pure bash — no npx tsx overhead)
673
700
  # 30% = ADVISORY, 50% = suggests @mock-justified. Does NOT block commit.
@@ -743,6 +770,8 @@ else
743
770
 
744
771
  # ============================================================================
745
772
  # ============================================================================
773
+ _g5t_mark c
774
+
746
775
  # Gate 5c: Semantic Annotation Check (#585)
747
776
  #
748
777
  # The check itself lives in lib/gate-5c-alignment.sh so its contract is
@@ -2213,6 +2242,16 @@ if [ -n "${GATE_5C_STATUS:-}" ] && [ -z "${GATE_5_DETAIL:-}" ]; then
2213
2242
  esac
2214
2243
  fi
2215
2244
 
2245
+ # Persist the segment breakdown into the detail so the NEXT commit's timing
2246
+ # question is already answered by data. Only appended when the clocks actually
2247
+ # ran (the early-exit arms never set them), and only when the gate ran long
2248
+ # enough for the split to mean anything -- below 3 s the segments are
2249
+ # dominated by process-startup noise and would just add bytes.
2250
+ _g5_elapsed=$(( $(gate_start_ms) - GATE_5_START ))
2251
+ if [ "${_g5t_a:-0}" != "0" ] && [ "$_g5_elapsed" -ge 3000 ]; then
2252
+ GATE_5_DETAIL="${GATE_5_DETAIL:-} seg=pre:${_g5t_focus}ms,5a:${_g5t_a}ms,5b:${_g5t_b}ms,5c:${_g5t_c}ms,total:${_g5_elapsed}ms"
2253
+ fi
2254
+
2216
2255
  record_gate_audit "gate-5" "tests-coverage" "$GATE_5_STATUS" "0" "$GATE_5_START" "${GATE_5_DETAIL:-}"
2217
2256
  return 0
2218
2257
  }
@@ -105,12 +105,21 @@ gate_5c_alignment() {
105
105
 
106
106
  echo " → Checking @test REQ-XXX annotations..."
107
107
  local annotation_errors=0 tf req_id found
108
+ # Resolve the REQ-ID list ONCE, before the loop. This call used to sit INSIDE
109
+ # the inner loop, so every annotation in every staged test file re-executed jq
110
+ # against the same file -- an N+1 query whose cost scales with (files x
111
+ # annotations). Measured 2026-11-23 on a real commit: Gate 5c cost 4413 ms of a
112
+ # 15347 ms gate, and this repository has 1097 test files. The reverse check at
113
+ # the bottom of this function already hoisted its own call; this loop was the
114
+ # one that did not.
115
+ local known_reqs
116
+ known_reqs=$(gate_5c_req_ids "$req_ids_file")
108
117
  while read -r tf; do
109
118
  [ -n "$tf" ] || continue
110
119
  [ -f "$tf" ] || continue
111
120
  while read -r req_id; do
112
121
  [ -n "$req_id" ] || continue
113
- found=$(gate_5c_req_ids "$req_ids_file" | grep -qxF "$req_id" && echo yes || true)
122
+ found=$(printf '%s\n' "$known_reqs" | grep -qxF "$req_id" && echo yes || true)
114
123
  if [ -z "$found" ]; then
115
124
  echo "❌ Gate 5c: $tf — @test $req_id: REQ ID not found in specification.yaml"
116
125
  annotation_errors=$((annotation_errors + 1))
@@ -149,6 +158,11 @@ gate_5c_alignment() {
149
158
  fi
150
159
 
151
160
  echo " ✅ @test annotation check complete."
161
+ # Consumed by the sourcing parent (gate-5-entry.sh reads GATE_5C_STATUS after
162
+ # gate_5c_alignment returns); shellcheck analyses this file alone and cannot
163
+ # see that reader. Warning surfaced only after the N+1 hoist above changed the
164
+ # control-flow shape it infers -- the assignment itself is not new.
165
+ # shellcheck disable=SC2034
152
166
  GATE_5C_STATUS="PASS"
153
167
  return 0
154
168
  }
@@ -2,6 +2,6 @@
2
2
  "verdict": "PASS",
3
3
  "license_type": "MIT",
4
4
  "sha256": "0e7ac423bf2c6e223b7c5b156f8cf72da49d748e56a1641402c31f22ad07dbb5",
5
- "checked_at": "2026-11-23T00:57:24.649Z",
5
+ "checked_at": "2026-11-23T01:25:34.516Z",
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.122",
3
+ "version": "0.38.123",
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.122",
3
+ "version": "0.38.123",
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.122.0
6
+ **Version:** 0.38.123.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.122.0
6
+ **Version:** 0.38.123.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.122.0
6
+ **Version:** 0.38.123.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.122",
3
+ "version": "0.38.123",
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.122.0
6
+ **Version:** 0.38.123.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.122.0
6
+ **Version:** 0.38.123.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.122.0
6
+ **Version:** 0.38.123.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.122",
3
+ "version": "0.38.123",
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.122.0
6
+ **Version:** 0.38.123.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.122.0
6
+ **Version:** 0.38.123.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.122.0
6
+ **Version:** 0.38.123.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.122",
3
+ "version": "0.38.123",
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.122.0
6
+ **Version:** 0.38.123.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.122.0
6
+ **Version:** 0.38.123.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.122.0
6
+ **Version:** 0.38.123.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.122.0
6
+ **Version:** 0.38.123.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.122.0
6
+ **Version:** 0.38.123.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.122.0
6
+ **Version:** 0.38.123.0
7
7
 
8
8
  ## OVERVIEW
9
9
  Test-Specification Alignment Engine — two-stage validation ensuring tests accurately reflect requirements and design specs.