---
name: project-step1380-ts-python-drift-check-2026-08-23
description: STEP 1380 TS/Python 決定表 drift 検知 CI — subprocess spawnSync で discovery-worker Python spec_table 実測 + rei-aios TS d8MultiTrialSpecTable との semantic parity 検証
metadata: 
  node_type: memory
  type: project
  originSessionId: 1f71dc26-eff6-41db-8142-70648b0a0ec2
  modified: 2026-08-22T22:02:17.429Z
---

# STEP 1380 — TS/Python 決定表 drift 検知 CI

Date: 2026-08-23
Status: 実装 + test 52/52 PASS
契機: STEP 1377 で 「TS/Python 実装間 決定表 一字一句同じ」 と 明示、manual 同期 lag / drift risk に systemic CI 対策

## 実装

Python 側 (discovery-worker/worker/fdr_gate.py):
- CLI に --spec-json flag 追加 (spec_table() を JSON dump、他 output なし)
- normal mode (trials_json + --fdr-q + --alpha) は required 化 (--spec-json と 排他)

TS 側 (rei-aios test/step1380-ts-python-drift-check-test.ts):
- spawnSync で Python fdr_gate.py --spec-json 実行
- 出力 JSON 解析 → d8MultiTrialSpecTable() と 比較
- Semantic contract 比較 (must-match): rule name / verdict / reason
- Documentation warn-only: condition string (language variations 許可)
- SKIP graceful: Python 未 install / discovery-worker missing / invocation 失敗

## Verify (52/52 PASS)

- rule 名 M1-M8 全 8 一致 / verdict 全 8 rule 一致 / reason 全 8 rule 一致
- activation subset 一致 = 5 値 (TRUE/FALSE/NEITHER/ZERO/BOTH)
- documented condition variations 8/8 (=== vs ==、≤ vs <=、かつ vs and、camelCase vs snake_case、JP vs EN)

## Design rationale

- Semantic contract (rule/verdict/reason) と documentation (condition string) 分離
- SKIP graceful = rei-aios は Python hard requirement 化しない
- Drift 発生時 detail 出力 = 即特定可能

## Honest scope

1. 「世界初」 主張ゼロ、Contract Testing (Fowler 2011) は 15 年前既知
2. subprocess Python 依存だが SKIP graceful で mitigation
3. Condition parity warn-only、v0.2 shared JSON schema candidate
4. rule 名一字違いも FAIL
5. Python fdr_gate CLI 拡張 backward compat 維持
6. GitHub Actions 統合は 別 STEP

## Site + 関連

- URL: https://rei-aios.pages.dev/tools/step-1380-ts-python-drift-check/
- STEP 1371/1377 (両 primitive origin)、1378 (同型 pattern)、1379 (別 primitive 同型 candidate)
- feedback-super-naming-siren-family-pattern 継承
