Race Audit — Type A: 0 件 / Type B: 1 件 emerge STEP 2084

2026-09-17 JST · rei-aios-d8 tab · chat-Claude 提案 の race detection script 実行 + Type B miss meta-finding 発見

Type A: 0 件 unintentional Type B: 全履歴 5 hit / 実質 3 件 (1 本件 + 2 同機構) 5,849 commits scanned STEP 1905 --only 前提 に 部分的 破れ Gate = pre-push 実装済 Case 1 self-apply 44 milestone
★ STEP 2084 Supplement (2026-09-17T07:29、 chat-Claude 訂正 3 点 accept): 「Type B script は DRAFT」 の 元記述 訂正 = chat-Claude が (α) を 既 execute 済、 v3 script (substr(f[1],6) = 正しい hash extraction) で 全履歴 scan、 結果 5 hit を そのまま STEP 2084 に 追記 (別 arc 起票 なし、 chat-Claude 「1 command で 決着」 明示)。

Type B 全履歴 execute 結果 (chat-Claude v3、 5,849 commits scan)

commitUNMENTIONED種別
84c835d44 (2026-09-17)2083本件 の race。 唯一 の 明確 な 混入
446487ce0 (2026-09-06)1831Auto: site rebuild = 同一機構 の 古い実例
62442d67b (2026-09-04)1742同上
66ec58604 (2026-09-04)1747–1751「STEP 1746-1752」 の 範囲記法 で slug に 個別番号 が 出ないだけ = 偽陽性
dad5405bc (2026-09-04)1729, 1742freeze / archive の 一括 = 正当
Type B 定量化: 全履歴 5 hit、 実質 混入 = 1 件 (本件 STEP 2083) + 同機構 2 件 (Auto: site rebuild) = 3 件、 shared path に 限定。 偽陽性 1 件 (範囲記法) + 正当 1 件 (freeze/archive 一括)。 「Type B = 一定 の 不確定性」 は 定量化 完了 = 遡及 未 measure 状態 解除

v2 hash 訂正 audit (chat-Claude 訂正 accept)

Chat-Claude v2 script 問題: substr($0,8) で awk 出力 が 1 char shift、 c835d44f8 のような 先頭 2 文字 欠け hash 出力 (__C__ 5 文字 の ため hash は 6 文字目 から、 8 は over-shift)。 v3 で substr(f[1],6) に 修正。 私 STEP 2084 記述 内 v2 hash 転記 check 結果: 0 件 contamination confirmed (site page + notepad + STEP fragment + memory hook + sidecar 全 grep = 16 unique short hashes 抽出、 全 git rev-parse --verify で valid ref confirmed = 私 の Type A script は 直接 git log --format='%H' extract で awk substr issue 経由なし)。

Gate 実装 (chat-Claude 「pre-push または CI 側」 推奨 accept)

Chat-Claude 指摘: 「pre-commit に 検出器 を 入れると auto-stage している当の hook 自身 の 出力 を、 同 hook が 検査 = 自己検証 の 非自性 と 同型」 → pre-push または CI に 置く。 実装: .githooks/pre-push = Type B detection logic embed: Smoke test PASS: 既知 race commit 84c835d44 = ⚠ Type B race candidate: STEP(s) [2083] not mentioned (shared_files=15) 検出。 chat-Claude 5-hit table の 1 位 と exact match。

(β) 判断 revision (chat-Claude 順序推奨)

Chat-Claude: 「gate が 入れば (β) は 急がない。 gate = zero architectural cost + 可逆、 (β) = 数日 + 不可逆寄り。 順番 = gate → 運用しながら 頻度 見る → 本当に 必要 なら (β)。 gate と (β) を 同時 実行 = 失敗時 に どちら が 効いたか 分からなくなる」 = accept。

§Ⅰ 起点 と 前提

Chat-Claude 2026-09-17 提案 (STEP 2083 corrigendum land 直後): 「Race audit まず 1 本」 = STEP 2081 が peer STEP 2082 に 巻き込まれた race condition の 過去 遡及 頻度 measure。

Chat-Claude 予測: 「0 件なら 今回が 初回、 複数出るなら 混入 は 常態だった」 (Type A に 該当 = sidecar-crossing race)。

Chat-Claude 提案 script (verbatim):

git log --format='%H %s' | while read c rest; do
  n=$(git show --name-only --format='' "$c" \
      | grep -o 'data/tabs/rei-aios-[a-z0-9]*' | sort -u | wc -l)
  [ "$n" -gt 1 ] && echo "$c tabs=$n  $rest"
done

§Ⅱ Type A 結果 (chat-Claude script 実行、 5,849 commits)

Hit 10 (0.17%)、 全 intentional consolidation:

#commitnarrative marker (intentional signal)classification
12e31ff4b9「STEP 1993 arc CLOSE EXECUTEDarc close
2a4e3e406d「★ TAB ISOLATION EXCEPTION OVERRIDE ★ 藤本さん explicit approval」explicit exception
32d1837169「refs + arc chain」multi-arc chain
4492c3fd17「refs + arc chain」multi-arc chain
54031eb04e「(1)+(4) judgments 順番に」batch judgment
69637dd561「rei-aios-99 Phase D」phase batch
746e76d382「rei-aios-99 Phase C」phase batch
84f767374a「rei-aios-99 → rei-aios-87」handoff arrow
94a57fe025「逆参照 補完」cross-ref
10047e58489「defect 発見 + ZCE close arc」multi-arc close

Type A conclusion: 5,849 commits scan で 0 件 unintentional race。 「commit の 中身 = author の 作業」 前提 は Type A に関して preserved。 Chat-Claude 予測 「0 件」 counter に 該当 = 「今回 が Type A としての 初回」 の 前提 (但し 今回 の case は Type A ではない = 次 §Ⅲ)。

§Ⅲ ★★★ Type B miss meta-finding (script 検出範囲外)

重大 発見: chat-Claude script は sidecar-crossing race を 検出、 但し 「shared path files のみ の race」 は 検出範囲外。 STEP 2083 corrigendum が peer STEP 2082 (84c835d44) に 巻き込まれた実 emerge case が この Type B pattern に 該当、 chat-Claude script では hit しない。

Type B pattern の 実 emerge case (STEP 2083)

Timeline:

Race source: 私 の files は shared paths (public/tools/step-2081-*/, docs/notepad/, notes/steps/, docs/SITE_COVERAGE_MAP.md) = sidecar data/tabs/rei-aios-d8/ 変更 なし。 Peer commit は sidecar data/tabs/rei-aios-a6/ 1 tab のみ 触った + shared path files が index に present で 混入。

Chat-Claude script 条件 「2+ tab sidecar 触る」 は sidecar 1 tab のみ で hit しない = Type B miss pattern の 実 emerge 例

Race pattern の 2 分類

Typepatternchat-Claude script 検出実 emerge case
Type A2+ tab sidecar が 同 commit に 混入✓ 可 (「2+ tab sidecar 触る」 heuristic)0 件 unintentional (10 hits 全 intentional)
Type B1 tab の shared-path files が 別 tab の --only commit に 混入 (sidecar 触らず)✗ 不可 (script 検出範囲外)1 件 (STEP 2083 corrigendum、 今回)

Type B 拡張 script DRAFT (未 execute)

Sidecar data/tabs/rei-aios-d8/step-2084-race-audit/type-b-detection-script-draft-2026-09-17.sh = 4-factor heuristic (header_tab + body_tabs + shared_files + intent_markers)、 未 execute、 別 STEP で refine 後 execute 予定。

§Ⅳ 内訳信頼度 判定

Pattern信頼度根拠
Type A (sidecar-crossing)✅ 高5,849 commits scan で 0 件 unintentional confirmed、 「commit = author の 作業」 前提 preserved
Type B (shared-path race)⚠️ 一定 の 不確定性1 件 実 emerge + 遡及 未 measure = Type B script execute 待ち。 影響 scope = 「shared path files 内訳」 のみ (sidecar 内訳 は Type A で preserved)

過去 STEP land 内訳 (「files changed N (my M + auto-mirror K)」 form) の 影響: sidecar 内訳 は Type A 通過 = 信頼度 高、 shared path 内訳 は Type B 遡及 未 measure = 一定 の 不確定性 embed。 実際 の scope は Type B script 実 execute で 判定 (別 STEP defer)。

§Ⅴ 根本 fix 3 candidate (chat-Claude 提案、 別 STEP defer)

#fix approachtradeoffbase STEP
1git stash を 挟む簡単 / hook auto-stage (inbox merger + notepad mirror) の stash tree 経由 挙動 未 verify
2worktree 分離 (STEP 1670 拡張)Heavyweight / root cause fix / STEP 1658 で 先行実測済STEP 1670 Tab Isolation Protocol v0.1
3GIT_INDEX_FILE tab 別軽量 / pre-commit hook の env var honor 対応 未 verify

3 candidate 全 に verify 必要、 「土台 触る 発明」 で 慎重 design、 chat-Claude 追加 briefing 受けて 別 arc で 実行。

§Ⅵ STEP 1905 multi-tab discipline への 影響

STEP 1905 で `--only` を 選んだ 判断 の 土台: 他 tab の staging を 守る = shared .git/index race 対策。

本 audit で 発見: git commit --only は 「only」 を Type A pattern に 対して 保証、 Type B pattern に 対して 部分的 破れ。 shared path files は staged 状態 で 他 tab の --only commit tree に 混入する path が emerge。

未来 discipline candidate:

§Ⅶ Honest scope

本 audit で 「言えないこと」:
  1. Type A 5,849 commits 全 「commit = author の 作業」 前提 完全 preservation (Type A 検出範囲 内 のみ、 Type B pattern は 別 layer で 遡及 未 measure)
  2. Type B script DRAFT の 精度 validated (未 execute、 heuristic threshold 経験値 のみ、 別 STEP refine 必要)
  3. 根本 fix 3 candidate の 実 効果 verified (chat-Claude 提案 のみ、 実 implementation は 別 STEP arc)
  4. 過去 STEP land 内訳 の 全 信頼度 判定 (Type A 通過 = shared path 内訳 一定 不確定性 embed、 sidecar 内訳 は preserved)
  5. 5,849 commits の scan 完全性 (git log で 全 branch cover か = default branch main のみ scan、 別 branch race は 未 measure)

§Ⅷ 次 の 1 手 (別 STEP defer、 藤本さん judgment 待ち)

  1. (α) Type B 検出 script refine + 遡及 audit = script draft 精度 向上 + 過去 commit re-scan、 中規模 arc
  2. (β) 根本 fix 3 candidate 検討 開始 = git stash / worktree 分離 / GIT_INDEX_FILE の verify + 実 implementation、 大規模 arc
  3. (γ) peer session 事前 staging relay protocol = SendMessage 経由 で staging 事前通知、 軽量 protocol update

§Ⅸ Related STEP