fm-code-duplication-audit-index-build) を STEP 2208 の shared-helper 抽出 pattern に沿って resolve。 scripts/research-radar/score-papers.ts (STEP 2203 Feature 1) + scripts/research-radar/arxiv-fetcher.ts (STEP 2212 Item #4) の 2 箇所 に 重複していた Map<string, AuditRecord> build (step-extract regex + normalize + step_audit_history → notes fallback) を 新 shared module arxiv-audit-index.ts に 抽出。 未来 の step-extract regex / normalization 変更 の silent drift を 構造的排除。 STEP 2212 が本 STEP を 「未来 candidate」 として 明示指名 = 直接応答。
fm-code-duplication-audit-index-build (STEP 2215 defer #5 marker): STEP 2208 で 4-signature regex を arxiv-withdrawal.ts に 抽出した際、 audit-index build 側 の 「1 箇所 update すれば 両 caller 反映」 の structural fix は 未着手 で 残っていた。 chat-Claude(cloud) STEP 2206 corrigendum で 「shared helper 抽出 は 放置すると 2 箇所 が 静かに ずれる」 明示指摘、 STEP 2212 notepad で 本 STEP を 未来 candidate として 明示指名。
File: scripts/research-radar/arxiv-audit-index.ts (89 line、 3 public export)
| Export | 役割 |
|---|---|
AuditRecord interface | arxivId / step / alignment / withdrawn + optional verificationState / citationPosture (全 caller の superset) |
extractStepFromPaper(p) | step_audit_history[0] regex → notes fallback → 空文字 return (未来 の 3rd caller も 同 rule 保証) |
loadAuditIndex(watchFile) | Map<string, AuditRecord> return。 watchFile absolute path 引数化 (元 score-papers hardcoded から caller 明示化) |
| File | 変更 | Net line |
|---|---|---|
score-papers.ts | Local AuditRecord + loadAuditIndex 削除 → shared import。 副産物 extractArxivId → extractCanonicalArxivId (arxiv-withdrawal.ts STEP 2208) rename。 | -59 |
arxiv-fetcher.ts | Inline Map build (20 行) 削除 → loadAuditIndex(WATCH_FILE) 呼出。 auditMarkerFor 内部 logic 不変。 | -22 |
合計 +89 (new) -59 -22 = +8 line net。 但し 論理 duplication は 2 → 1、 副産物 extractArxivId = extractCanonicalArxivId の 3-way drift risk も 除去。
score-papers.ts: "⚠ WITHDRAWN (STEP N)" / "✓ audited STEP N" — leading space なし (JSON field form)arxiv-fetcher.ts: " ⚠ WITHDRAWN (STEP N)" / " ✓ audited STEP N" — leading space あり (markdown title concatenation)Marker 生成 は shared 化 せず、 各 caller 用途 に 合わせて 保持。 arxiv-audit-index.ts docstring で 明示。 未来 用途 分岐 が 3 系統 以上 emerge したら centralize 検討 candidate (現状 over-engineering avoidance)。
4 module 全 (arxiv-audit-index.ts + arxiv-withdrawal.ts + score-papers.ts + arxiv-fetcher.ts) tsc --noEmit 通過。
audit index size: 14 withdrawn count: 1 ⚠ 2605.13886 STEP 2202 (Niu、 STEP 2202 emerge 済 withdrawn 判定) Sample: 2603.11066 → STEP 1269 / ALIGNED / withdrawn=false
auditIndex.registrySize: 14 (pre/post 一致)"marker": "⚠ WITHDRAWN (STEP 2202)""auditStep": "STEP 1730" + "auditAlignment": "CYCLE-OBSTRUCTION-CITATION-CONDITIONAL"本 session 未実行 (arxiv HTTP budget 保持)。 Import 解決 + auditMarkerFor 内部 logic 不変 で 高 confidence、 次回 daily-radar cron 稼働時 に 実効 verify。
score-papers.extractArxivId vs arxiv-withdrawal.extractCanonicalArxivId の 3-way drift risk も 除去signature-drift-check.ts の self-test pattern を 未来 適用 candidate (fixture watch file → 期待 Map assert)[via 藤本さん explicit go 2026-09-23 evening / orig: STEP 2215 defer #5 + STEP 2208 pattern 継承 / execute: rei-aios-2e]