STEP 1599 (v0.4 fix) — Comparator Framework · source_freshness with excluded-summary + kind split + provenance

2026-08-31 更新 · v0.1 (STEP 1599) → v0.2 (STEP 1605) → v0.3 (STEP 1606) → v0.4 (STEP 1608) で chat-Claude review 連続反映

v0.4 訂正 (chat-Claude second review 2026-08-31 pt ①)

v0.3 で site HTML の合計行文言だけ「cron only」に直したが、raw JSON 側の artifactSummary/unknownSummary には fresh/aging/stale/dead/flowing の数値が残っていた = chat-Claude 指摘「chat 側が読むのは JSON なので、計器としては未修正と同じ」正しい。 v0.4 で ExcludedKindSummary { total, verdict: "N/A", reason } に置換、 raw JSON 側で数値を消去。 schemaVersion 3 → 4。

さらに SourceRecord.excludedFromAggregate: boolean を per-record にも追加、 downstream が cron records のみ抽出可能に。

chat-Claude STEP 1599 review 3 点 (2026-08-30) 応答

  1. ① bimodal は「発見」ではなく機構の必然 — v0.1 で ★ を付けて「bimodal 発見」と書いた。閾値 fresh≤30h / stale 31-72h の設計上、中間帯は 42h 幅のみで日次 cron が壊れた瞬間しか通らない → 72 source 中 0 件は期待値。 訂正: ★ 削除、honestScope に「threshold-design artefact」明記、per-source cron interval 正規化を v0.3+ TODO 化。
  2. ② 静的 artifact を母集団から外すべきakizuki-wireup-catalog / session-snapshots のような STEP 途中生成物が 72 母数を水増しし dead=42 (58%) を実態より悪く見せた。 訂正: SourceRecord.kind: 'cron' | 'artifact' | 'unknown' 追加、summary を cronSummary / artifactSummary / unknownSummary の 3 段に分離、artifact は cron health 集計から除外。
  3. ③ Timestamp 食い違い — 私の chat 応答本文で「2026-08-30 22:56 UTC」と書いたのは記述ミス (別 run ではない、現在時刻からの誤推定)。実 generatedAt = 2026-08-30T14:53:28.404Z (JST 23:53:28)、site JSON が真実。site page には時刻書いていなかったので site 側訂正なし、chat 上のみ訂正済。

実装 v0.2 (STEP 1605 追加)

scripts/comparator/
├── lib/
│   ├── types.ts                — v0.2: SourceKind + KindSummary + schemaVersion 2
│   ├── discover.ts             — 変更なし
│   └── classify-kind.ts        — NEW: KNOWN_CRON + KNOWN_ARTIFACTS allowlist + heuristic
├── gauges/
│   └── freshness.ts            — kind 分類 → 3 段 summary
└── run-freshness.ts            — v0.2 output format

test/step1605-freshness-v02-kind-split-test.ts  — 30/30 PASS (10 section)
test/step1599-comparator-freshness-test.ts      — 24/24 PASS (v0.2 schema 対応 update)

kind 判定 order

  1. Explicit KNOWN_CRON allowlist (28 source: arxiv-recent, hf-models 等)
  2. Explicit KNOWN_ARTIFACTS denylist (23 source: session-snapshots, akizuki-wireup-catalog 等)
  3. Heuristic: scripts/{fetch,generate,build}-{source}*.ts or scripts/**/*{source}*-fetcher.ts 存在 → cron
  4. Fallback: unknown

実測 v0.3 (2026-08-31, 72 source)

★ v0.3 訂正 (chat-Claude STEP 1605 review pt ①): 合計行を削除し「cron only の集計が load-bearing」と明示。 Cross-kind の合計は artifact 除外原則と矛盾するので、母集団 72 は「レコード数」としてのみ扱う。

KindTotalFreshAgingStaleDeadFlowing備考
cron501700258load-bearing 集計 (これのみ health 指標)
artifact22N/AN/AN/AN/AN/Acron health から除外 (STEP one-shot 生成物、verdict 算定対象外)
unknown0classifier 全 source 判定成功

参考: artifact 22 本の内訳 (verdict は計算されるが集計しない): fresh 0 / dead 17 / flowing 5。 「dead 17」は「70+ 日前の STEP 生成物」であり fetcher 停止ではない。 v0.1/v0.2 で「合計 dead 42」と書いたのは artifact 混入で「実質的な不健全さ」を過大表現していた (chat-Claude 指摘)。 v0.3 で明示的に artifact 行を N/A にして分離。

★ kindSource provenance breakdown (v0.3 追加, chat-Claude review pt ②)

「分類根拠が出力に残っていないと heuristic 揺れで dead 率が理由不明のまま動く」への応答。 各 record に kindSource が付与され、report 全体で分布可視:

kindSourceCount意味
allowlist49KNOWN_CRON 明示 (私が curated した 50 source の内 49 が実在)
denylist22KNOWN_ARTIFACTS 明示 (curated 23 の内 22 実在)
heuristic-script1scripts/**/*{source}*.ts 自動検出: solar-wind のみ
unknown-fallback03 段全て miss (実測 0 = curated が十分)

★ 意味: 72 中 71 本が curated (allowlist+denylist)、heuristic 判定は 1 本 (solar-wind) のみ。 chat-Claude 懸念「heuristic の揺れで dead 率が動く」の実測影響は 1/72 = 1.4% 以下、次 STEP で curated に組み入れれば 0 化可能。

★ 本当の fetcher bug 8 本 (cron kind + FLOWING = header 欠落)

crossref · impossibility-equations · lmfdb · multi-sensor-fusion · paranormal-occult · semantic-scholar · wic-economy · wic-events

これらは cron / build 側 script が実在しつつ generatedAt header を書いていない = fetcher 側の header 統一漏れ。 v0.1 で 「FLOWING 13」と一括報告したが、うち 5 (akizuki-wireup-catalog / session-snapshots / ibm-quantum / collatz-buchi-mod25(-spot)) は artifact = header 不要。 chat-Claude 指摘通り、絞り込むと bug 数は 13 → 8。

★ Cron dead top 5 by age

SourceAge備考
oeis2659h (~111 日)fetch-oeis-stream.ts あり
microbe-gallery2510h (~105 日)fetch-microbe-gallery.ts あり
genesis-stage1695h (~70 日)classify-theories-by-genesis-stage.ts
mdnst1695h (~70 日)generate-mdnst-snapshot.ts
millennium-raa1695h (~70 日)analyze-millennium-with-raa.ts

script は実在するが実行されていない source 群。「dev:build が回っていない期間」 or 「該当 script が build target から外れている」 の 2 種のうちどちらか (次 STEP 調査候補)。

Cron fresh 17 (Launcher 系統一致)

activity-log · arxiv-edu · arxiv-recent · buddy · crypto · edu-news · eric · gbif-recent · github-edu · hf-models · jquants · ligo-events · manifold · nasa-sdo · quakes · wiki-edits · wiki-pageviews

bimodal ★ 削除の理由 (chat-Claude review ① 応答)

v0.1 で「aging=0, stale=0 は bimodal 発見」と★を付けた。 chat-Claude 指摘通り、これは閾値設計の直接帰結で発見ではない:

中間帯を意味のある帯にする方法: threshold を per-source cron interval の倍数で正規化 (例: fresh ≤ 1.5 × interval)。 これは v0.3+ の課題 (別 STEP 候補)、v0.2 では global threshold 維持し honestScope で明示。

検査票 Round 012 進捗 (v0.2 訂正版)

#計器状態
1source_freshness✅ v0.2 (STEP 1605 fix) — cron 50 / artifact 22 分離、fetcher bug 8 本特定
2harvest_lag✅ v0.1 (STEP 1601, arXiv 9 feeds 全 TRUE)
3dedup_collision⏳ 次 STEP

chat-Claude 直 fetch URL:

Honest scope (v0.2, 8 件)

  1. ローカル data/{source}/latest.json のみ読む。外部 API 呼出 0、真値照合 0。「file が新しい」を測る、「content が正しい」は測らない。
  2. Verdict は鮮度のみ。source が返す data の質は無関係。
  3. kind=cron が load-bearing metric。 kind=artifact は一回きり STEP 出力 = 別集計で cron health と混ぜない (chat-Claude STEP 1599 review 2026-08-30)。
  4. kind=unknown = classifier 未判定 (allowlist/denylist/heuristic 全て miss)。 第 3 bucket として reported、失敗ではない。
  5. NEITHER 帯 (30-72h) は 42h 幅のみ = 通過は構造的に稀。「bimodal 発見」は v0.1 の誇張、v0.2 で訂正。
  6. Per-source 正規化 (weekend-only feed, sub-hour cadence, 週次 refresh 等) は v0.3+ 課題。v0.2 は global threshold 維持。
  7. FLOWING on cron = 真の fetcher bug (header 欠落)。 FLOWING on artifact = 正常 (STEP 出力に timestamp 不要)。
  8. harvest_lag は STEP 1601 別 gauge。 dedup_collision は次 STEP。

Related