STEP 2220 — Signature drift 週次 cron 統合

2026-09-24 · rei-aios-2e · Session-day arc STEP 2215 defer #7 応答 · STEP 2217 caller audit fm-exposed 直接 resolve
Summary: STEP 2211 で 実装した signature-drift-check.ts (arxiv HTML markup drift の early warning) を scripts/research-radar/daily-radar.ts に 週次 slot で 統合。 STEP 2213 Item #6 の refresh-watchlist weekly gate pattern を そのまま 継承。 前 STEP 2217 caller audit で fm-exposed と 判定された 1 件 の 直接 resolve = fm-device-landed-without-caller marker の 2 STEP demonstration cycle 完了。

Implementation

File: scripts/research-radar/daily-radar.ts (+58 line net)

(1) State file gate

SIGNATURE_DRIFT_STATE_FILE = data/research-radar/signature-drift-check-last-run.txt、 signatureDriftCheckDue() = 7-day gap check、 fail-open (state 不在 / corrupt → due)。 refreshWatchlistDue() と 1:1 mirror。

(2) Conditional fetcher push + (3) Stamp on exit-0-only

runFetcher は execSync = success: true iff exit code 0。 signature-drift-check.ts exit code contract:

Exit意味Stamp?Retry behavior
0少なくとも 1 signature match (no drift)✓ 記録次 7 日 skip
1Zero signatures match (DRIFT DETECTED)✗次 daily-radar で retry (banner 毎日 emit until human fix)
2Fetch error✗次 daily-radar で retry (network 復帰 自動)

(4) Critical Alert 分岐 (drift 特別扱い)

stdout grep で 3 pattern 分岐:

Test

Type-check

daily-radar.ts errors count = 0。 pre-existing inspection-tail.ts errors は 無関係 preserved。

Gate function unit test (5 case)

CaseExpectActual
No state file → due (first run)truetrue ✓
Fresh timestamp (<7d)falsefalse ✓
Old timestamp (>7d)truetrue ✓
Corrupt (empty file)truetrue ✓
Corrupt (garbage)truetrue ✓

= 5/5 PASS、 fail-open behavior confirmed (state file 損失 = 次 daily-radar で auto retry)。

signature-drift-check.ts --offline sanity

引き続き exit 0 (no drift、 fixture match) confirmed。 daily-radar 統合 は default combined (offline + live) で 呼ばれる、 offline 単体 test は 統合 の precondition。

Full daily-radar E2E

本 session 未実行 (arxiv HTTP 実 fetch + 全 fetchers 起動 = 実運用 で verify、 次 cron cycle に 委譲)。 statement of confidence: gate function unit + signature-drift-check standalone verified、 統合 code は refresh-watchlist Item #6 の 1:1 mirror pattern = 追加 emergent risk 低。

fm-device-landed-without-caller demo cycle 完了

2 STEP resolution demonstration:
STEPSignature-drift-check.ts callerStatus
2211 (2026-09-23 land)manual only— (未 audit)
2217 (2026-09-24 audit)manual onlyfm EXPOSED
2220 (本 STEP)scripts/research-radar/daily-radar.ts (weekly slot)registered ✓
= fm-device-landed-without-caller marker の identify → resolve 2 STEP cycle、 未来 の 同型 fm 発見時 の reference case として preserve。

Effect

Honest scope

Attribution chain