STEP 2179 · Readability Verdict Device Phase 0 · 2026-09-21 · rei-aios-d4

可読構造判定器 — Phase 0 再現

cowork-Claude が cowork-session で 完成させた 「可読構造判定器」 (Voynich・Rongorongo・Books of Hours 画像に対する QR / DataMatrix / PDF417 / 一次元 barcode の 有無 判定機器) の Phase 0 = そのまま 動かして 数値を expected/ と 突き合わせる 再現。 コード・閾値・prereg を 一切 変更せず、 環境差 (Linux Python 3.11 → Windows Python 3.13) の 影響を 実測。 結果: §6 の 件数目標 9/9 一致 ✓。 v3 (14 tags) + v3.1 (21 tags) の summary JSON byte-perfect。 ただし ctrl2 (L1+L2) に 48 件 の L2 field 差分 が 残存、 原因は 「参照実装の L1→L2 副作用」 仮説段階 (2 回 の 再現実行 と 1 file 分 の diff で 確認要、 未実施)。 §6/5 は 件数のみ を 見る acceptance のため 通過。

Attribution: [via 藤本さん / orig: cowork-Claude]
Handoff bundle: C:/Users/user/Downloads/readability-verdict-device-handoff.zip (2.47 MB, 41 files including src/, expected/, prereg/, controls/, reports/)
Route: cowork-Claude 完成 → 藤本さん が bundle 提示 → rei-aios-d4 tab で Phase 0 実行 → 本 page (§6 件数目標 9/9 一致、 v3+v3.1 summary byte-perfect、 ctrl2 (L1+L2) 48 件 field diff 残存 = 原因仮説段階)。

装置の型 (handoff §2 より)

内容
V 値域TRUE=読めた (門を通った payload) / FALSE=ない (領域の感度 ≥ 0.80 で 何も出なかった) / NEITHER=見えない (感度 < 0.80)
e 誤り率ZBar 3.97×10⁻⁴/試行、 zxing 0。 感度は 形式・寸法・劣化ごとに expected/
t 全域性どの画像にも必ず答えを返す
c 較正T_strong = 313.9 (写本を見る前に固定)、 保留検証で確認済み。 T_weak (125.6) は 過学習と判明し 無効

環境差分

項目期待 (requirements.txt)実測
OSLinux x86_64Windows 11 Pro 10.0.22621
Python3.11.153.13.2
numpy2.4.42.4.4 ✓
opencv-python-headless4.13.0.924.13.0.92 ✓
zxing-cpp3.1.13.1.1 ✓
pyzbar0.1.90.1.9 ✓ (Windows wheel bundles zbar.dll)
pylibdmtx0.1.100.1.10 ✓ (Windows wheel bundles libdmtx.dll、 setuptools 84.0.0 で distutils shim)
Pillow12.2.012.2.0 ✓

Skipped: v1 chain (gen_controls.py が /usr/share/fonts/**/*.ttf を要求、 Windows 提供不可、 §6 acceptance 対象外) / res2_calib + res2_calib_l2 (v1 ctrl/ 依存、 同上)。 WSL2 Ubuntu 24.04 は sudo password 要 (libzbar0 / libdmtx0t64 apt install) で Windows path に fallback。
環境対処 (source 変更なし): PYTHONUTF8=1 env var 設定 — Windows Python 3.13 の cp932 default は UTF-8 の 日本語入り prereg JSON を decode 失敗、 set -o pipefail と 併せて silent failure 検知。

§6 acceptance targets の 実測 (per HANDOFF §6)

#target期待実測結果
1v2 L1: voy 20 + rr 12 payload0 totalvoy 0 + rr 0MATCH
2v2 L2: voy max88.1 (f157)88.1 (voy/157.jpg)MATCH
3v2 L2: rr max282.9 (Mamari C 裏面)282.9 (Mamari C Verso)MATCH
4v2 L2: heldout 1963.256.226.a185.5185.5MATCH
5av2 ctrl2: L1 hits22/2722/27MATCH
5bv2 ctrl2: L1|L2(T_strong)24/2724/27MATCH
6v3.1 voy: matrix/stacked/linear FALSE0/72, 41/72, 32/720/72, 41/72, 32/72MATCH
7v3.1 boh: matrix/stacked/linear FALSE0/18, 3/18, 3/180/18, 3/18, 3/18MATCH
8v3.1 flat_vellum: matrix/stacked/linear FALSE0/9, 9/9, 9/90/9, 9/9, 9/9MATCH
9v3.1 rongorongo: all-family FALSE0/36 per family0/36 per familyMATCH

Byte-perfect 再現 の 実測

output filefilesdiff vs expected
res2_voy.json200 diffs (byte-perfect)
res2_rr.json120 diffs (byte-perfect)
res2_ctrl2_l2.json27 (L2-only)0 diffs (byte-perfect)
res2_heldout.json20 diffs (byte-perfect)
res2_ctrl2.json2748 L2 field diffs (see below)
res_v3_summary.json14 tags0 diffs (byte-perfect) — cells 126 値 + n_false 14 + corr 14 全一致
res_v31_summary.json21 tags0 diffs (byte-perfect) — cells 567 値 + n_false 63 + l1/l2 count 全一致

ctrl2 の 48 L2 field diffs — 原因は 仮説段階 (chat-Claude(Cowork) 2026-09-21 critique 反映)

訂正 (2026-09-21T20:20 頃、 chat-Claude(Cowork) via 藤本さん): 私 の 前 report 「参照実装 の L1→L2 副作用」 は まだ 仮説段階。 確定 する には (1) 参照実装 で ctrl2 を 2 回 実行 して 48 件 差分 が 決定的 に 再現するか (2) ctrl2_l2 が byte-perfect なので L1 通過後 の 画像/状態 diff を 1 file 分 取る、 の 2 検証 必要 (未実施)。 §6/5 acceptance は 件数のみ 見る ので 現状 通過、 但し Phase 1 で 数値 を regression test 固定する 前 に 「48 件 を 期待値 に 含めるか 除外するか」 判断 必要。

Cross-check で、 expected/ 自体 に inconsistency がある:

fileexpected/res2_ctrl2 L2 maxexpected/res2_ctrl2_l2 L2 maxobserved (両方)
pos_Aztec_clean.png3352.0919.4919.4 (一致)
pos_Aztec_vellum.png380.5165.8165.8 (一致)
pos_QRCode_clean.png2987.1 (推定)2987.12987.1 (一致)

Linux 元 run では L1 (zxingcpp read_barcodes with try_rotate/try_downscale) を 呼ぶと、 続く layer2 の 出力が 変わる 現象があった (同じ源画像なのに L1+L2 vs L2-only で 数値 が違う)。 Windows Python 3.13 の zxing-cpp 3.1.1 wheel では この副作用が発生せず、 L2 出力は L1 有無に関わらず 一定。

Phase 0 acceptance への 影響 なし: counts (§6/5a 22/27, §6/5b 24/27) は 一致、 判定 rule (T_strong = 313.9) は 変更なし、 L2-only path は byte-perfect。 handoff §5 「実装差 記録」 discipline に 従い 「detected implementation variance」 として 記録、 code 修正 は 一切 行わない。

ファイル

path内容
data/tabs/rei-aios-d4/readability-verdict-phase0/source/handoff bundle unpacked (41 files、 prereg SHA256 verified 3/3)
data/tabs/rei-aios-d4/readability-verdict-phase0/run/作業 dir (voy/, rr/, ctl_ms/, ctl_ms_jpg/, ctrl2/, nulls/, res2_*.json, inj/, inj31/, res_v3_summary.json, res_v31_summary.json)
data/tabs/rei-aios-d4/readability-verdict-phase0/DIFF_REPORT.md完全 diff 報告 (全 §6 項目)
data/tabs/rei-aios-d4/readability-verdict-phase0/run/compare.pyexpected vs observed 突合 script
data/tabs/rei-aios-d4/readability-verdict-phase0/run/driver.sh, driver_v3.sh, driver_v31.shv2 / v3 / v3.1 driver (set -eo pipefail、 PYTHONUTF8=1)

Phase 1+ の 準備

Phase 0 の 件数目標 9/9 一致 は 確認済。 Phase 1 (src/ → readability_verdict/ パッケージ化 + rvd CLI) は 藤本さん go 待ち per handoff §3。 起工前 に 未解決 の 2 点 (chat-Claude(Cowork) 2026-09-21 critique):

  1. Site page の 実体化 verify: public/tools/step-2179-.../ に file 実在、 dist-renderer/tools/step-2179-.../ は 本 revision で force-track 追加。 rei-aios.pages.dev の SPA fallback (200 with fallback template) と 区別 する ため 「ページ固有 <title> + 本文 数値 (88.1 / 282.9 / 185.5) grep」 で 確認 必要。
  2. ctrl2 48 件 field diff の 扱い: 参照実装 2 回 再実行 + L1 通過前後 diff で 原因 特定 → Phase 1 regression test 固定時 に 「期待値 に 含める / 除外する」 判断 必要。

Phase 2 (MCP tool 化) / Phase 3 (サイト掲載) は go 待ち per handoff §3。 判定ロジック は 変更禁止、 Phase 0 数値 を regression test として維持。