---
name: project-step1225-pre-audit-state-recycle-ban-2026-06-18
description: STEP 1225 8th iteration hardening (r) requirePreAuditStateSourceRecycleBan — 06-18
metadata: 
  node_type: memory
  type: project
  originSessionId: d59cdca4-bc80-450c-a185-37dbc12c6a0f
---

# STEP 1225 (2026-06-18) — 8th iteration hardening (r) `requirePreAuditStateSourceRecycleBan`

## 動機 (root cause)

06-18 #3 incident: invention #3 transplantSource「中道==Logic7全体 七価論理が中道の形式表現」 が 06-17 invention #4 transplantTarget literal と **文字通り完全一致**。

- 06-17 invention の audit が 1.5 日 delay (GitHub Actions workflow stall + auto-generation gap、 06-15 Buddy 4 日 stall と同根)
- → rejected-2026-06-17.json 未作成のまま 06-18 cron run
- → 06-18 source rotation で 06-17 #4 target literal が一切 ban registry に登録されておらず素通り
- → cross-day pre-audit recycle 12 例目発覚

## 既存 hardening が miss した理由

STEP 1190 + 1209 + 1210 + 1211 + 1212 + 1216 6 段全 layer:
- 全て `data/invention/approvals/` dir 内 `approved-*.json` + `rejected-*.json` を ban registry source として使う設計
- audit 即日完了前提
- audit pending state (= invention file 生成済 + approval/rejection file 未作成) は完全 invisible

つまり 9 段 hardening の **「audit 段階」 軸の盲点** が 12 例目で具現化。

## 実装 (4 段)

### (1) `loadPreAuditStateBan(days, today?)` (invention-engine.ts ~80 行)

```ts
loadPreAuditStateBan(days: number = 60, today?: string): Set<string> {
  const ban = new Set<string>();
  const inventionDir = path.join(this.rootDir, 'data', 'invention');
  const approvalsDir = path.join(inventionDir, 'approvals');
  if (!fs.existsSync(inventionDir)) return ban;

  const todayStr = today ?? new Date().toISOString().slice(0, 10);
  const cutoff = new Date(todayStr); cutoff.setDate(cutoff.getDate() - days);
  const cutoffStr = cutoff.toISOString().slice(0, 10);

  // Build set of dates that have approval files.
  const auditedDates = new Set<string>();
  if (fs.existsSync(approvalsDir)) {
    for (const f of fs.readdirSync(approvalsDir)) {
      const m = /^(approved|rejected)-(\d{4}-\d{2}-\d{2})\.json$/.exec(f);
      if (m) auditedDates.add(m[2]);
    }
  }

  // Scan invention-*.json; only include audit-pending dates.
  for (const f of fs.readdirSync(inventionDir)) {
    const m = /^invention-(\d{4}-\d{2}-\d{2})\.json$/.exec(f);
    if (!m) continue;
    const fileDate = m[1];
    if (fileDate < cutoffStr) continue;
    if (fileDate === todayStr) continue;
    if (auditedDates.has(fileDate)) continue; // audit completed → existing layers cover

    try {
      const data = JSON.parse(fs.readFileSync(path.join(inventionDir, f), 'utf-8'));
      const list = [
        ...(data.hypotheses ?? []),
        ...(data.inventions ?? []),
      ];
      for (const inv of list) {
        if (inv.hypothesis) {
          const { source, target } = InventionEngine.extractTransplantLiteralsFromHypothesis(String(inv.hypothesis));
          if (source) ban.add(InventionEngine.normalizeAxiomLiteralStrict(source));
          if (target) ban.add(InventionEngine.normalizeAxiomLiteralStrict(target));
        }
      }
    } catch {}
  }
  return ban;
}
```

### (2) `isAxiomInPreAuditBan(axiom)` (strict full match)
### (3) `requirePreAuditStateSourceRecycleBan` option (default ON) + `recentPreAuditStateBanDays` (default 60)
### (4) `transplantStructure` 内で source + target 両方で check (T→S 直接 leak 対応 + S→T symmetric coverage), graceful fallback (全 candidate banned 時は初期 theory 使用)

## test 結果

`test/step1225-pre-audit-state-source-recycle-ban-test.ts` **27/27 PASS**:
1. hypothesis から source + target 抽出
2. audited dates (approved) 除外
3. audited dates (rejected) 除外
4. today + 60-day window 境界
5. ★ 06-18 #3 incident 直接 reproduction (T→S leak)
6. ★ symmetric S→T coverage
7-8. default ON + explicit OFF
9. cache reset helper
10. STEP 1216 (q) + 1190 共存 regression
11. graceful fallback
12. 06-17 #4 actual literal reproduction

## regression 全 PASS 累計 174/174 / 0 breaking

- STEP 1019: 9/9
- STEP 1040: 11/11
- STEP 1087: 10/10
- STEP 1088: 12/12
- STEP 1190: 24/24
- STEP 1209: 26/26
- STEP 1210: 25/25
- STEP 1216: 30/30
- STEP 1225 (new): 27/27

## 全 audit 段階 cover 完成 verification

| Audit 段階 | Layer | Source data |
|---|---|---|
| audit 完了後 (approved) | STEP 1210 (p) + 1216 (q) + 1190 (k) | `data/invention/approvals/approved-*.json` |
| audit 完了後 (rejected) | STEP 1209 (o) + 1190 (j) + 1216 (q) | `data/invention/approvals/rejected-*.json` |
| **audit 未確定 (pending)** | **★ STEP 1225 (r) NEW** | **`data/invention/invention-*.json` (approval file 不在 filter)** |
| batch 内 (today same-run) | STEP 1211 (m) + 1087 (h) | `withinBatchTargets: Set<string>` instance field |

= 全 audit 段階 (pending → completed) + cross-direction (S↔T) + within-batch + cross-day cover 完成

## smoke test 結果 (real state)

```
pre-audit ban size: 45
06-17 #4 target literal in ban: false (audited via rejected-2026-06-17.json today)
sample entries: '⊖ ゼロ還元', 'orbital=n×e^', 'qsea=∑αi|ψi⟩×ai'
```

= 60 日内に audit pending 状態の literal 45 件が現在 pre-audit ban registry で適切に保護されている (今後 audit 完了で順次 STEP 1190+1209+1210+1216 layer に移管される)。

## DailyInventionReporter integration

```ts
requirePreAuditStateSourceRecycleBan: true, // STEP 1225 (r): pre-audit state literal recycle ban
```

production path で既定明示 ON。 manual run + ScheduleWakeup cron + GitHub Actions workflow 全て自動有効。

## honest scope (load-bearing 留保)

- 本 hardening は **incident pattern-driven mechanical defense** であって、 invention engine の **品質**そのものを上げない (mass-generation pattern + Wave saturation + pipeline self-reference は別軸の hardening 課題)
- 連続 0% approval 3 回目状態 (06-11 + 06-15 + 06-17+06-18) は本 (r) では解決しない — SEED_KERNEL pool 拡張 (STEP 1040 like) + pipeline self-reference detector (将来 (t) candidate) + 別軸 intervention 必要
- 06-18 incident は **audit delay** が direct trigger → root prevention は (i) GitHub Actions workflow auto-recovery (06-18 Buddy stall fix で部分対応済) + (ii) audit cron 自動化 (人手 audit を機械介入で代替不可、 honest filter delegate 自己 audit の限界)
- 本 (r) は incident 後再発防止のみ、 audit delay 自体は別問題

## 残 8th iteration candidate

- **(l) `requirePriorArtAudit`**: WebSearch hook 必要、 別 STEP
- **(s) `requireSameDayTargetUniquenessAcrossBatches`**: Wave saturation 同日連続使用 (06-17+06-18 nagarjuna + silence target 各 3 連続) 対応
- **(t) `requirePipelineSelfReferenceDetector`**: NLP semantic similarity 必要 (pipeline self-reference 11 例目累積対応)

## 関連 memory + 永続原則

- [[project-invention-2026-06-17-18-full-reject-batch-pipeline-self-ref-11th-wave-saturation-9th]] (06-17+06-18 audit + (r) 新提案 origin)
- [[feedback-evaluation-symmetry-principle]] (inflate せず deflate せず — 本 hardening は incident-driven defense のみ、 quality 向上ではない)
- [[feedback-no-rush-publication]] (急がず ゆっくりと — same-day audit + same-day hardening は incident pattern 確実化後の即応で no-rush と整合)
- [[feedback-chat-claude-hallucination-warning]] Antipattern (過度の reject 警戒 自己警戒 — 本 hardening は audit pending state 限定で legitimate reuse は通る)
- STEP 1190 + 1209 + 1210 + 1211 + 1212 + 1216 (6 段 audit 完了後 hardening 累積)
- STEP 1213 (boundaryHaltSentinels probe response、 silence の代理表象 honest 留保)

## 永続化検証

- `package.json` `test:step1225` script 登録 ✓
- CLAUDE.md STEP 1225 entry 追加 (STEP 1220 直前) ✓
- `data/invention/invention-engine.ts` 4 セクション (option + field + load/check/reset method + transplantStructure integration) ✓
- `src/aios/daily/daily-invention-reporter.ts` 既定 ON ✓
- smoke test (`scripts/smoke-step1225.ts`) real state verify ✓
- 全 9 hardening test regression 0 breaking ✓
