phasegate 0.131.0 → 0.132.0

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/CHANGELOG.md CHANGED
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.132.0] - 2026-05-08
11
+
12
+ ### Fixed
13
+
14
+ - **WI-094 follow-up — `DriftReport` / `ConsistencyReport` / `DeadCodeReport` の `toHarnessError(s)` が `severity: 'error'` を hardcode していたため v0.131.0 の集計セマンティクス修正が L4-001/002/003 で実機に反映されなかった (post-publish dogfood で発見)** — `error catalog` の `defaultSeverity: warning` 宣言と各 report の `toHarnessError(s)` 出力 severity が乖離しており、aggregator が `severity !== 'warning'` で hasNonWarningError と判定して overall FAIL となっていた。
15
+ - **修正対象**:
16
+ - `scripts/harness/validator-system/domain/value-objects/drift-report.ts:47` — L4-001 drift error の severity を `'error'` → `'warning'`
17
+ - `scripts/harness/validator-system/domain/value-objects/consistency-report.ts:49` — L4-002 consistency error の severity を `'error'` → `'warning'`
18
+ - `scripts/harness/validator-system/domain/value-objects/dead-code-report.ts:46/54` — L4-003 dead-code error の severity を `'error'` → `'warning'` (unused export / unreachable code 双方)
19
+ - **dogfood 結果 (v0.131.0 の状態)**: `/private/tmp/phasegate-dogfood-wi094` で drift 2 件発生させて `validate --layer L4 --format human` を実行 → `[FAIL] L4-001` / overall FAIL ✗ / exit 1。期待は `[WARN] L4-001` / overall PASS ✓ / exit 0。原因は本 fix で解消。
20
+ - **後方互換**: `validate.failOnWarning: true` を設定している user の挙動は不変 (warning でも overall FAIL)。`failOnWarning: false` (default for `minimal` / `standard`) の user のみ exit code 0 に変わる。これは ADR-017 で承認済みの BREAKING の意図通りで、v0.131.0 で動かなかった部分が初めて動く形。
21
+ - **post-publish dogfood**: WI-094 description.md に v0.132.0 dogfood 結果を反映。
22
+
10
23
  ## [0.131.0] - 2026-05-08
11
24
 
12
25
  ### Changed (BREAKING for `standard` / `minimal` preset users)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phasegate",
3
- "version": "0.131.0",
3
+ "version": "0.132.0",
4
4
  "packageManager": "pnpm@10.30.1",
5
5
  "description": "Phasegate — AI-agnostic quality defense toolkit. Enforces structural integrity between design intent and code.",
6
6
  "license": "MIT",
@@ -43,10 +43,11 @@ export class ConsistencyReport {
43
43
  return this.mismatchPairs.length;
44
44
  }
45
45
 
46
+ // ADR-017 / WI-094: error catalog の defaultSeverity: warning と整合
46
47
  toHarnessErrors(): readonly HarnessErrorLike[] {
47
48
  return this.mismatchPairs.map((pair) => ({
48
49
  code: { value: 'L4-002', toString: () => 'L4-002' },
49
- severity: { value: 'error', toString: () => 'error' },
50
+ severity: { value: 'warning', toString: () => 'warning' },
50
51
  message: `レイヤー整合性違反: expected "${pair.expected}" but got "${pair.actual}" at ${pair.location}`,
51
52
  suggestion: '設計文書間のレイヤー依存方向を統一してください',
52
53
  }));
@@ -38,12 +38,13 @@ export class DeadCodeReport {
38
38
  return this.unusedExports.length > 0 || this.unreachableCode.length > 0;
39
39
  }
40
40
 
41
+ // ADR-017 / WI-094: error catalog の defaultSeverity: warning と整合
41
42
  toHarnessErrors(): readonly HarnessErrorLike[] {
42
43
  const errors: HarnessErrorLike[] = [];
43
44
  for (const exportId of this.unusedExports) {
44
45
  errors.push({
45
46
  code: { value: 'L4-003', toString: () => 'L4-003' },
46
- severity: { value: 'error', toString: () => 'error' },
47
+ severity: { value: 'warning', toString: () => 'warning' },
47
48
  message: `未使用エクスポート: ${exportId}`,
48
49
  suggestion: '未使用エクスポートを削除するか、他ファイルからimportしてください',
49
50
  });
@@ -51,7 +52,7 @@ export class DeadCodeReport {
51
52
  for (const loc of this.unreachableCode) {
52
53
  errors.push({
53
54
  code: { value: 'L4-003', toString: () => 'L4-003' },
54
- severity: { value: 'error', toString: () => 'error' },
55
+ severity: { value: 'warning', toString: () => 'warning' },
55
56
  message: `到達不能コード: ${loc.filePath}:${loc.range.startLine}-${loc.range.endLine}`,
56
57
  suggestion: '到達不能なコードブロックを削除してください',
57
58
  });
@@ -42,9 +42,10 @@ export class DriftReport {
42
42
  }
43
43
 
44
44
  toHarnessError(): HarnessErrorLike {
45
+ // ADR-017 / WI-094: error catalog の defaultSeverity: warning と整合
45
46
  return {
46
47
  code: { value: 'L4-001', toString: () => 'L4-001' },
47
- severity: { value: 'error', toString: () => 'error' },
48
+ severity: { value: 'warning', toString: () => 'warning' },
48
49
  message: `乖離検出 [${this.direction}] Unit: ${this.unitName}, Element: ${this.element}`,
49
50
  suggestion: this.recommendation,
50
51
  };