Skip to content

feat(interp): 解曰摺頁 prototype——歷史解上紙(聖意不上,fail-closed) - #34

Merged
Crystal32378 merged 2 commits into
mainfrom
fable/interp-jieyue-prototype
Sep 17, 2026
Merged

Crystal32378 merged 2 commits into
mainfrom
fable/interp-jieyue-prototype

Conversation

@Crystal32378

Copy link
Copy Markdown
Owner

Prototype,不 merge。 回應 2026-09-14 審查 B 節:線上流程止於「拿到文言四句」,反思工具的承諾不成立。這支 PR 讓觀音的解曰以摺頁形式上紙,讓您和福在真紙上看到它,再決定要不要走這條路。

一個必須拍板的倫理判斷

觀音倉庫裡有兩欄:

  • 解曰(例「雖有址地。不如待時。營謀出入。切莫妄為。」)=把問題丟回給人的勸解 → 上
  • 聖意(例「求財五分 婚姻防捉 疾病難星 失物難尋」)=逐項吉凶預測格 → 不上

聖意違反紅線「反思工具,不做預言、不販賣恐懼」。它在 build source 就被排除,不是 UI 藏起來。這一刀砍掉一半資料,砍對邊。

資料流與紙分家(紙 frozen、pool interpretation: null 不動)

  • scripts/build-interpretation-pool.mjs — 獨立 fail-closed build,六道 gate:
    • G1 只收解曰|G2 只 VERIFIED/PROBABLE(UNRESOLVED/CANDIDATE 丟)|G3 含 □/壞字→整個 build fail|G4 狀態誠實不升級|G5 釘 edition|G6 禁改寫(emit 必須逐字=source)
    • 94/100 收錄(13 已核圖、81 待複核),6 首排除(Historical Editions Registry #12,20,35,44,65,77)
  • assets/interpretation-pool.guanyin.js — generated,byte-identical 重建
  • paper/arrival.html — slip 下方收合摺頁(off-paper,不在 #slipMount 內),預設關;版本對不上就整個不顯示(與 slip-render colophon 同一把鎖)

截圖(本次實抽,真紙)

收合(預設) 展開
解曰 艋舺龍山寺版・已核圖 ▸ 一行安靜地在紙下 解曰逐字+「據艋舺龍山寺《觀世音靈籤》…,人工核圖確認」

桌機與手機各抽一張,解曰隨籤變、狀態誠實(已核圖/待複核)、無旁白、console 乾淨。

刻意不做

  • 不上聖意(預測格)
  • 不做 AI 白話翻譯/改寫——解曰本身是歷史文本,一改寫就變 AI 解籤
  • 不因為只有 13 筆核圖就把 81 筆標 VERIFIED——誠實標「待複核」
  • 關帝(feat(guandi): historical interpretation layer — 解曰+聖意 100/100 #23 未過福驗)、六十甲子(349 CANDIDATE 無核圖、官方圖檔授權未清)本輪不上

與其他 PR 的關係

驗證

  • 既有 arrival 36/sound 68/slip 14/pool 60 全綠(未動)
  • 新增 test-interpretation-pool 19 項:聖意不洩漏、無 UNRESOLVED 洩漏、fail-closed gate、off-paper、不升級、不改寫、重建 byte-identical

🤖 Generated with Claude Code

Crystal32378 and others added 2 commits September 17, 2026 21:38
回應審查 B 節「拿到紙就停住」:觀音倉庫裡有解曰+聖意 200 筆,但只上「解曰」。

倫理刀口:聖意是逐項吉凶格(求財幾分/婚姻成不成/疾病凶吉)=預測register,
違反「反思工具,不做預言」定位——在 build source 就排除,不是 UI 藏起來。
解曰是「待時、莫妄為」式的勸解,把問題丟回給人,那才上。

資料流與紙分家(紙 frozen、pool interpretation:null 契約不動):
- scripts/build-interpretation-pool.mjs:獨立 fail-closed build。G1 只收解曰/
  G2 只 VERIFIED+PROBABLE(UNRESOLVED/CANDIDATE 丟)/G3 含□壞字整個 build fail/
  G4 狀態誠實不升級(13 已核圖照標,其餘 81 待複核)/G5 釘 edition/G6 禁改寫
  (emit 必須逐字等於 source)。94/100 收錄,6 首排除。
- assets/interpretation-pool.guanyin.js:generated,id-keyed,byte-identical 重建。
- arrival.html:slip 下方一個收合摺頁(off-paper,非 #slipMount 內),預設關;
  renderJieyue 版本對不上就整個不顯示(與 slip-render colophon 同一把鎖)。

未動:紙、draw pool、綁定、聲音、既有視覺。四套既有測試全綠;
新增 test-interpretation-pool 19 項(含聖意不洩漏、fail-closed、off-paper、不改寫)。

prototype,不 merge。關帝(#23 未過福驗)與六十甲子(349 CANDIDATE 無核圖、
官方圖檔授權未清)本輪不上,各等自己的 gate。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
方向已由福驗通過(聖意不上/解曰保留原文/離紙收合/已核圖・待複核分開)。
文案不動。四項工程窄修:

1) 精確版本鎖(取代 substring):
   - artifact 帶 edition_id + expected_slip_edition_title(=紙的 DRAW_POOL edition,exact)
   - assets/jieyue-guard.js:頁面與測試共用的唯一判準 resolve();schema/corpus/
     edition_id/slip edition_title/content_version 全 exact equality,content_version
     釘死(bound,非僅存在);任一不符整層不顯示。renderJieyue 改為只問 guard。

2) 逐籤 custody(堵住「兩段文字都在來源就通過」的洞):
   - data/corpora/guanyin/jieyue_custody.json:per-slip token=sha256(edition_id␟slip_no␟NFC(text))
     覆蓋全 100 解曰;build G7 逐筆比對,交換兩首/改字/換版都 fail
   - 每筆 artifact entry 帶 slip_no+custody;guard 另驗 id↔slip_no 綁定
   - custody 只以 --write-custody 有意識重生

3) 真實反例測試(scripts/test-interpretation-pool.mjs,29 項):實際注入並驗證——
   - 交換兩首解曰 → build fail(custody mismatch)
   - 可收錄文字混入 □ → build fail
   - edition 竄改 → build fail(G5)
   - build 失敗(指向真實 OUT/REPORT)→ 既有 artifact 與 report byte-identical 不被改寫
   - guard 真值表:edition_id/edition_title/content_version/corpus/status/custody 各反例 → 不顯示
   - guard 釘的 content_version === artifact content_version(drift 偵測)

4) 校正 INTERPRETATION-LAYER.md:舊 79/21、80/20、UNRESOLVED 20 籤清單標為
   2026-08 歷史快照;現況=100 解曰:94 PROBABLE+5 UNRESOLVED(12,20,35,65,77)+
   1 CANDIDATE(44);artifact 收 94、其中 13 可收錄且人工核圖。

未動:紙、draw pool interpretation:null、綁定、聲音、既有視覺、文案。
既有 arrival 36/sound 68/slip 14/pool 60 全綠;本層 29/29;真機抽籤解曰照常顯示。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Crystal32378

Copy link
Copy Markdown
Owner Author

福 re-review 窄修完成(commit e1b5146,未 merge)

文案維持原版(解曰 艋舺龍山寺版・已核圖/待複核,不加免責句)。四項工程照單修:

1 精確版本鎖 — 新增 assets/jieyue-guard.js,頁面與測試共用同一個 resolve()。schema/corpus_id/edition_id/expected_slip_edition_title(=紙的 DRAW_POOL edition)/content_version 全 exact equality,content_version 釘死(bound,不是「存在即可」)。任一不符 → 整層不顯示。renderJieyue 只問 guard。

2 逐籤 custody — data/corpora/guanyin/jieyue_custody.json,per-slip token = sha256(edition_id␟slip_no␟NFC(text))[:32],覆蓋全 100 解曰。build 新增 G7 逐筆比對;每筆 artifact entry 帶 slip_no+custody,guard 另驗 id ↔ slip_no。custody 僅 --write-custody 有意識重生。

3 反例測試(29/29,實際注入非只驗字串存在)

D 交換 #1↔#2 解曰            → build fail(custody mismatch)✓
D 可收錄文字混入 □          → build fail ✓
D edition 竄改              → build fail(G5)✓
D build 失敗指向真實檔      → artifact + report byte-identical 不被改寫 ✓(三項)
C guard 真值表:edition_id/edition_title/content_version/corpus/status/id↔slip_no 各反例 → 不顯示 ✓
C guard 釘的 content_version === artifact content_version(drift 偵測)✓

4 校正文件 — INTERPRETATION-LAYER.md 舊 79/21、80/20、UNRESOLVED 20 籤清單標為 2026-08 歷史快照;現況=100 解曰:94 PROBABLE + 5 UNRESOLVED(12,20,35,65,77)+ 1 CANDIDATE(44);artifact 收 94、其中 13 可收錄且人工核圖。

補:福遇到的唯讀 checkout deterministic rebuild EPERM 是資料夾寫入權限,非測試失敗;build/report 皆走 env 覆蓋(INTERP_SRC/OUT/REPORT/CUSTODY),可指向可寫隔離目錄重跑。

既有 arrival 36/sound 68/slip 14/pool 60 全綠;真機抽籤解曰照常顯示(桌機+手機)。停在 #34,未 merge、未 deploy,未動 #32/#33。

@Crystal32378
Crystal32378 merged commit c26694b into main Sep 17, 2026
3 checks passed
Crystal32378 added a commit that referenced this pull request Sep 18, 2026
福拆單後 #33 確定範圍:只退場公開路由,不刪 Apps Script/試算表/歷史回覆。
本次在 rebase 到 c26694b(含 #34 解曰層)後:

- vercel.json 由 routes[](status:301,filesystem 排序脆弱)改為現代 redirects/rewrites:
  - redirects:/index.html、/research、/research/、/research/index.html → /(permanent=308)
  - rewrites:/ → /paper/arrival.html(URL 不變,root 仍進 Arrival)
- scripts/test-routing.mjs(新):把新的 Vercel 路由真相變成可回歸的 15 項斷言
  (root=rewrite 非 redirect/四條 legacy 皆 permanent 到 //favicon 存在且被引用/
  解曰 guard·artifact·custody 不受影響且 content_version 仍綁定/index.html 與
  google-apps-script.gs 檔案保留=只退路由不刪資料)
- test-draw-pool T5 標題校正:index.html 現為「已退場的 legacy route(檔案保留)」,
  內容禁字檢查仍適用;路由真相移到 test-routing
- favicon.svg+arrival <link rel=icon>、README 指向 paper/arrival.html(沿用 #33 原提交)

未改:紙、draw pool、解曰三檔、綁定、聲音、Apps Script、試算表。
測試:routing 15/interp 29/arrival 36/sound 68/slip 14/pool 60 全綠。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Crystal32378 pushed a commit that referenced this pull request Nov 14, 2026
- 觀音:不加任何說明句(福 re-review 決定),頁面輸出與 main 相同
- 關帝:道藏本解曰多為斷語口吻,保留一句「前人的讀法,不是抽一的話、不是預測」
  +未核影像說明;是否保留列為待決事項
- 文件與測試同步

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rs8faWZpLCsmA8jc7Csp3m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant